- {{ download.filename }}
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
index 41207582a..1bb7b56ac 100644
--- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
+++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts
@@ -1,4 +1,4 @@
-import { Component, forwardRef, Injector, OnInit, TemplateRef, ViewChild } from '@angular/core';
+import { Component, forwardRef, Injector, OnInit } from '@angular/core';
import { FileDownloadService } from '@upload-download/services/file-download.service';
import { DownloadStatusWrapper } from '@upload-download/model/download-status.wrapper';
import { DownloadControllerService } from '@redaction/red-ui-http';
@@ -16,11 +16,12 @@ import { RouterHistoryService } from '@services/router-history.service';
export class DownloadsListScreenComponent extends ListingComponent implements OnInit {
readonly circleButtonTypes = CircleButtonTypes;
readonly tableHeaderLabel = _('downloads-list.table-header.title');
- tableColumnConfigs: TableColumnConfig[];
- @ViewChild('filenameTemplate', { static: true }) filenameTemplate: TemplateRef;
- @ViewChild('sizeTemplate', { static: true }) sizeTemplate: TemplateRef;
- @ViewChild('creationDateTemplate', { static: true }) creationDateTemplate: TemplateRef;
- @ViewChild('statusTemplate', { static: true }) statusTemplate: TemplateRef;
+ readonly tableColumnConfigs: TableColumnConfig[] = [
+ { label: _('downloads-list.table-col-names.name'), width: '2fr' },
+ { label: _('downloads-list.table-col-names.size') },
+ { label: _('downloads-list.table-col-names.date') },
+ { label: _('downloads-list.table-col-names.status') }
+ ];
constructor(
protected readonly _injector: Injector,
@@ -33,7 +34,6 @@ export class DownloadsListScreenComponent extends ListingComponent {
@@ -50,15 +50,6 @@ export class DownloadsListScreenComponent extends ListingComponent d.storageId);
await this._downloadControllerService.deleteDownload({ storageIds }).toPromise();
diff --git a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html
index 74c84e850..772400920 100644
--- a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html
+++ b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.html
@@ -40,62 +40,58 @@
>
-
-
+
+
+
+
+ {{ download.filename }}
+
+
+
+
+
+ {{ download.size }}
+
+
+
+
+
+ {{ download.creationDate | date: 'd MMM. yyyy, hh:mm a' }}
+
+
+
+
+
+
+
+ {{ download.status }}
+
+
-
-
- {{ download.size }}
-
-
-
-
- {{ download.creationDate | date: 'd MMM. yyyy, hh:mm a' }}
-
-
-
-
- {{ download.status }}
-
-
-
- {{ entity.dossierName }}
+
+
+
+
-
+ {{ entity.dossierName }}
+
+
+
+
+ {{ entity.memberIds.length }}
+
+
+
+ {{ entity.date | date: 'mediumDate' }}
+
+
+
+ {{ entity.dueDate | date: 'mediumDate' }}
+
+
-
-
- {{ entity.memberIds.length }}
+
+
-
-
-
-
-
-
-
diff --git a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss
index e69de29bb..b0ed00292 100644
--- a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss
+++ b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.scss
@@ -0,0 +1,3 @@
+.stats-subtitle {
+ margin-top: 4px;
+}
diff --git a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts
index bed1882f5..bdec52e11 100644
--- a/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts
+++ b/apps/red-ui/src/app/modules/admin/screens/trash/trash-screen.component.ts
@@ -1,4 +1,4 @@
-import { ChangeDetectionStrategy, Component, forwardRef, Injector, OnInit, TemplateRef, ViewChild } from '@angular/core';
+import { ChangeDetectionStrategy, Component, forwardRef, Injector, OnInit } from '@angular/core';
import { IDossier } from '@redaction/red-ui-http';
import {
CircleButtonTypes,
@@ -35,11 +35,12 @@ export class TrashScreenComponent extends ListingComponent impl
readonly circleButtonTypes = CircleButtonTypes;
readonly tableHeaderLabel = _('trash.table-header.title');
readonly canRestoreSelected$ = this._canRestoreSelected$;
- tableColumnConfigs: TableColumnConfig[];
- @ViewChild('filenameTemplate', { static: true }) filenameTemplate: TemplateRef;
- @ViewChild('ownerTemplate', { static: true }) ownerTemplate: TemplateRef;
- @ViewChild('deletedTimeTemplate', { static: true }) deletedTimeTemplate: TemplateRef;
- @ViewChild('restoreDateTemplate', { static: true }) restoreDateTemplate: TemplateRef;
+ readonly tableColumnConfigs: TableColumnConfig[] = [
+ { label: _('trash.table-col-names.name'), sortByKey: 'searchKey' },
+ { label: _('trash.table-col-names.owner'), class: 'user-column' },
+ { label: _('trash.table-col-names.deleted-on'), sortByKey: 'softDeletedTime' },
+ { label: _('trash.table-col-names.time-to-restore'), sortByKey: 'softDeletedTime' }
+ ];
constructor(
protected readonly _injector: Injector,
@@ -62,7 +63,6 @@ export class TrashScreenComponent extends ListingComponent impl
disabledFn = (dossier: DossierListItem) => !dossier.canRestore;
async ngOnInit(): Promise {
- this._configureTableColumns();
this._loadingService.start();
await this._loadDossiersData();
this.sortingService.setSortingOption({
@@ -95,31 +95,6 @@ export class TrashScreenComponent extends ListingComponent impl
this._loadingService.loadWhile(this._restore(dossiers));
}
- private _configureTableColumns() {
- this.tableColumnConfigs = [
- {
- label: _('trash.table-col-names.name'),
- sortByKey: 'searchKey',
- template: this.filenameTemplate
- },
- {
- label: _('trash.table-col-names.owner'),
- class: 'user-column',
- template: this.ownerTemplate
- },
- {
- label: _('trash.table-col-names.deleted-on'),
- sortByKey: 'softDeletedTime',
- template: this.deletedTimeTemplate
- },
- {
- label: _('trash.table-col-names.time-to-restore'),
- sortByKey: 'softDeletedTime',
- template: this.restoreDateTemplate
- }
- ];
- }
-
private _getRestoreDate(softDeletedTime: string): string {
return moment(softDeletedTime).add(this._configService.values.DELETE_RETENTION_HOURS, 'hours').toISOString();
}
diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts
index af6a37ec1..5c390ea88 100644
--- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts
+++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/config.service.ts
@@ -110,7 +110,7 @@ export class ConfigService {
{
label: fileStatusTranslations[FileStatuses.APPROVED],
enterFn: this._approveFn(reloadDossiers),
- enterPredicate: (file: File) => this._permissionsService.isReadyForApproval(file),
+ enterPredicate: (file: File) => this._permissionsService.isReadyForApproval(file) && file.canBeApproved,
key: FileStatuses.APPROVED,
color: '#48C9F7'
}
diff --git a/libs/common-ui b/libs/common-ui
index 85d22fbcc..551db967e 160000
--- a/libs/common-ui
+++ b/libs/common-ui
@@ -1 +1 @@
-Subproject commit 85d22fbcc9b3673d11dbf542e3b6ee16c7791d84
+Subproject commit 551db967e2d747932579464f00e4e497c91dc628
+
+
+
+
+
+ {{ entity.softDeletedTime | date: 'd MMM. yyyy, hh:mm a' }}
+
+
+
+
+
-
-
+ {{ entity.restoreDate | date: 'timeFromNow' }}
-
-
- {{ entity.date | date: 'mediumDate' }}
-
-
-
- {{ entity.dueDate | date: 'mediumDate' }}
+
-
-
-
-
- {{ entity.softDeletedTime | date: 'd MMM. yyyy, hh:mm a' }}
-
-
-
-
-
- {{ entity.restoreDate | date: 'timeFromNow' }}
-
-
-