diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html index f41353146..cc8b6956e 100644 --- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html +++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.html @@ -9,8 +9,7 @@ [selectionEnabled]="true" [tableColConfigs]="tableColConfigs" [tableHeaderLabel]="tableHeaderLabel" - > - + >
-
- - - - {{ 'dossier-overview.table-header.title' | translate: { length: (screenStateService.displayedLength$ | async) || 0 } }} - - - - - -
- -
- -
- - - - - - - - - - - - -
-
+ + + + + diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts index 6a1e7dc12..b5fbc916e 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts @@ -36,6 +36,7 @@ import { workloadTranslations } from '../../translations/workload-translations'; import { fileStatusTranslations } from '../../translations/file-status-translations'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { CircleButtonTypes } from '@iqser/common-ui'; +import { TableColConfig } from '@shared/components/table-col-name/table-col-name.component'; @Component({ templateUrl: './dossier-overview-screen.component.html', @@ -49,15 +50,47 @@ export class DossierOverviewScreenComponent private readonly _lastOpenedFileKey = 'Dossier-Recent-' + this.activeDossier.dossierId; protected readonly _primaryKey = 'filename'; readonly circleButtonTypes = CircleButtonTypes; + protected readonly _tableHeaderLabel = _('dossier-overview.table-header.title'); readonly itemSize = 80; collapsedDetails = false; actionConfigs: ActionConfig[]; dossierAttributes: DossierAttributeWithValue[] = []; + tableColConfigs: TableColConfig[] = [ + { + label: _('dossier-overview.table-col-names.name'), + withSort: true, + column: 'filename' + }, + { + label: _('dossier-overview.table-col-names.added-on'), + withSort: true, + column: 'added' + }, + { + label: _('dossier-overview.table-col-names.needs-work') + }, + { + label: _('dossier-overview.table-col-names.assigned-to'), + withSort: true, + class: 'user-column', + column: 'reviewerName' + }, + { + label: _('dossier-overview.table-col-names.pages'), + withSort: true, + column: 'pages' + }, + { + label: _('dossier-overview.table-col-names.status'), + withSort: true, + class: 'flex-end', + column: 'statusSort' + } + ]; @ViewChild(DossierDetailsComponent, { static: false }) private readonly _dossierDetailsComponent: DossierDetailsComponent; private _lastScrollPosition: number; - @ViewChild('needsWorkTemplate', { read: TemplateRef, static: true }) private readonly _needsWorkTemplate: TemplateRef; @ViewChild('fileInput') private _fileInput: ElementRef; diff --git a/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts b/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts index 6f8e09b6c..bc6e54542 100644 --- a/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts +++ b/apps/red-ui/src/app/modules/shared/base/base-listing.component.ts @@ -50,7 +50,7 @@ export abstract class BaseListingComponent extends AutoUnsubscribeComponent i } private get _sortedDisplayedEntities$(): Observable { - return this.sortingService.sortingOptionChanged$.pipe( + return this.sortingService.sortingOption$.pipe( switchMap(() => this.screenStateService.displayedEntities$.pipe(map(entities => this.sortingService.defaultSort(entities)))) ); } diff --git a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.html b/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.html index 4671398a0..da89f5a0d 100644 --- a/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.html +++ b/apps/red-ui/src/app/modules/shared/components/table-col-name/table-col-name.component.html @@ -2,12 +2,11 @@ {{ label }} -
- - -
+ + +
+ + +
+
diff --git a/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html b/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html index 689a69a0d..bf7465f3f 100644 --- a/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html +++ b/apps/red-ui/src/app/modules/shared/components/table-header/table-header.component.html @@ -10,7 +10,7 @@ {{ tableHeaderLabel | translate: { length: (screenStateService.displayedLength$ | async) } }} - + diff --git a/apps/red-ui/src/app/services/sorting.service.ts b/apps/red-ui/src/app/services/sorting.service.ts index f78954f67..4b5fa976e 100644 --- a/apps/red-ui/src/app/services/sorting.service.ts +++ b/apps/red-ui/src/app/services/sorting.service.ts @@ -19,7 +19,7 @@ export interface SortingOption { }) export class SortingService { private readonly _sortingOption$ = new BehaviorSubject(null); - readonly sortingOptionChanged$ = this._sortingOption$.asObservable(); + readonly sortingOption$ = this._sortingOption$.asObservable(); get sortingOption(): SortingOption { return this._sortingOption$.getValue(); diff --git a/apps/red-ui/src/app/utils/sorters/status-sorter.ts b/apps/red-ui/src/app/utils/sorters/status-sorter.ts index bb840b6ef..1e826c787 100644 --- a/apps/red-ui/src/app/utils/sorters/status-sorter.ts +++ b/apps/red-ui/src/app/utils/sorters/status-sorter.ts @@ -5,7 +5,7 @@ const byStatus = (a: StatusSorterItem, b: StatusSorterItem) => { const x = typeof a === 'string' ? a : a.key; const y = typeof b === 'string' ? b : b.key; - return (StatusSorter[x] = StatusSorter[y]); + return StatusSorter[x] - StatusSorter[y]; }; export const StatusSorter = { diff --git a/libs/common-ui b/libs/common-ui index 3625e2951..4004c4c8f 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 3625e295161fddd62c6f8f45623279773bbb8a16 +Subproject commit 4004c4c8f9a31d0c8dd548e5a1fad62f1f472daa