diff --git a/apps/red-ui/src/app/components/sorting/sorting.component.ts b/apps/red-ui/src/app/components/sorting/sorting.component.ts
index 8cea9ef94..c49a538eb 100644
--- a/apps/red-ui/src/app/components/sorting/sorting.component.ts
+++ b/apps/red-ui/src/app/components/sorting/sorting.component.ts
@@ -6,28 +6,16 @@ export class SortingOption {
column: string;
}
-const SORTING_OPTIONS = {
+const SORTING_OPTIONS: { [key: string]: SortingOption[] } = {
+ 'project-listing': [
+ { label: 'sorting.recent.label', order: 'desc', column: 'projectDate' },
+ { label: 'sorting.alphabetically.label', order: 'asc', column: 'project.projectName' }
+ ],
'project-overview': [
- {
- label: 'sorting.recent.label',
- order: 'desc',
- column: 'added'
- },
- {
- label: 'sorting.alphabetically.label',
- order: 'asc',
- column: 'filename'
- },
- {
- label: 'sorting.number-of-pages.label',
- order: 'asc',
- column: 'numberOfPages'
- },
- {
- label: 'sorting.number-of-analyses.label',
- order: 'desc',
- column: 'numberOfAnalyses'
- }
+ { label: 'sorting.recent.label', order: 'desc', column: 'added' },
+ { label: 'sorting.alphabetically.label', order: 'asc', column: 'filename' },
+ { label: 'sorting.number-of-pages.label', order: 'asc', column: 'numberOfPages' },
+ { label: 'sorting.number-of-analyses.label', order: 'desc', column: 'numberOfAnalyses' }
]
};
diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html
index eeb8b2417..6938c8a87 100644
--- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html
+++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html
@@ -74,13 +74,12 @@
[class.active]="bulkSelectActive"
(click)="toggleBulkSelect()"
>
-
-
-
- {{ option.label | translate }}
-
-
-
+
+
@@ -89,6 +88,10 @@
{
@@ -125,6 +121,10 @@ export class ProjectListingScreenComponent implements OnInit {
this.bulkSelectActive = !this.bulkSelectActive;
}
+ public sortingOptionChanged(option: SortingOption) {
+ this.sortingOption = option;
+ }
+
public getProjectStatusConfig(pw: ProjectWrapper) {
const obj = pw.files.reduce((acc, file) => {
const status = file.status;
diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html
index 486f1308e..8ac32aad1 100644
--- a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html
+++ b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html
@@ -119,6 +119,10 @@