Show or hide motion id in amendment list by config

Hides the motion id in the list of amendments if the given config was
enabled or disabled
This commit is contained in:
Sean 2020-09-16 12:48:12 +02:00
parent 04477d9ebd
commit df2e26c3ed
2 changed files with 16 additions and 6 deletions

View File

@ -59,11 +59,13 @@
{{ motion.submitters }}
</span>
<span *ngIf="motion.submitters.length">
&middot;
<span *ngIf="showSequentialNumber">
<span *ngIf="motion.submitters.length">
&middot;
</span>
<span>{{ 'Sequential number' | translate }}</span>
{{ motion.id }}
</span>
<span>{{ 'Sequential number' | translate }}</span>
{{ motion.id }}
</div>
<!-- State -->

View File

@ -13,6 +13,7 @@ import { AmendmentFilterListService } from '../../services/amendment-filter-list
import { AmendmentSortListService } from '../../services/amendment-sort-list.service';
import { StorageService } from 'app/core/core-services/storage.service';
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
import { ConfigService } from 'app/core/ui-services/config.service';
import { LinenumberingService } from 'app/core/ui-services/linenumbering.service';
import { OverlayService } from 'app/core/ui-services/overlay.service';
import { ItemVisibilityChoices } from 'app/shared/models/agenda/item';
@ -51,6 +52,8 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
*/
public itemVisibility = ItemVisibilityChoices;
public showSequentialNumber: boolean;
/**
* Column defintiion
*/
@ -85,7 +88,7 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
* @param motionRepo get the motions
* @param motionSortService the default motion sorter
*
* @param configService get config vars
* @param Service get config vars
*/
public constructor(
titleService: Title,
@ -102,7 +105,8 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
private motionExport: MotionExportService,
private linenumberingService: LinenumberingService,
private pdfExport: MotionPdfExportService,
private overlayService: OverlayService
private overlayService: OverlayService,
private configService: ConfigService
) {
super(titleService, translate, matSnackBar, storage);
super.setTitle('Amendments');
@ -124,6 +128,10 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
} else {
this.amendmentFilterService.parentMotionId = undefined;
}
this.configService
.get<boolean>('motions_show_sequential_numbers')
.subscribe(show => (this.showSequentialNumber = show));
}
/**