107873: Shorten paginationId

I chose 2 characters instead of one in case a 'SUCCEEDED' process status
is added in the future. 'SUCCEEDED' could encompass both 'COMPLETED' and
'FAILED' processes, but it's paginationId would clash with 'SCHEDULED'
(both start with 's'). By choosing the first 2 characters of the status,
this clash does not occur (ids would be 'sc' and 'su').
This commit is contained in:
Andreas Awouters
2024-01-23 08:22:22 +01:00
parent 492f4c22fc
commit 907f2e83e6

View File

@@ -71,7 +71,10 @@ export class ProcessOverviewTableComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.paginationId = 'processOverviewTable' + this.processStatus; // Creates an ID from the first 2 characters of the process status.
// Should two process status values ever start with the same substring,
// increase the number of characters until the ids are distinct.
this.paginationId = this.processStatus.toLowerCase().substring(0,2);
let defaultPaginationOptions = Object.assign(new PaginationComponentOptions(), { let defaultPaginationOptions = Object.assign(new PaginationComponentOptions(), {
id: this.paginationId, id: this.paginationId,