RED-3800 - default sort for justifications
This commit is contained in:
parent
97ac6da843
commit
15f02b3db0
@ -7,6 +7,7 @@ import {
|
||||
ListingComponent,
|
||||
listingProvidersFactory,
|
||||
LoadingService,
|
||||
SortingOrders,
|
||||
TableColumnConfig,
|
||||
} from '@iqser/common-ui';
|
||||
import { DOSSIER_TEMPLATE_ID, Justification } from '@red/domain';
|
||||
@ -31,8 +32,8 @@ export class JustificationsScreenComponent extends ListingComponent<Justificatio
|
||||
readonly circleButtonTypes = CircleButtonTypes;
|
||||
readonly tableHeaderLabel = _('justifications-listing.table-header');
|
||||
readonly tableColumnConfigs: TableColumnConfig<Justification>[] = [
|
||||
{ label: _('justifications-listing.table-col-names.name'), width: '2fr' },
|
||||
{ label: _('justifications-listing.table-col-names.reason') },
|
||||
{ label: _('justifications-listing.table-col-names.name'), width: '2fr', sortByKey: 'name' },
|
||||
{ label: _('justifications-listing.table-col-names.reason'), sortByKey: 'reason' },
|
||||
{ label: _('justifications-listing.table-col-names.description'), width: '2fr' },
|
||||
];
|
||||
readonly #currentUser = getCurrentUser();
|
||||
@ -54,6 +55,10 @@ export class JustificationsScreenComponent extends ListingComponent<Justificatio
|
||||
async ngOnInit(): Promise<void> {
|
||||
this._loadingService.start();
|
||||
await firstValueFrom(this._justificationService.loadAll(this.#dossierTemplateId));
|
||||
this.sortingService.setSortingOption({
|
||||
column: 'name',
|
||||
order: SortingOrders.asc,
|
||||
});
|
||||
this._loadingService.stop();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user