Merge branch 'RED-10028' into 'master'

RED-10028: added OPTIMIZED_PREVIEW file type in download selection.

See merge request redactmanager/red-ui!574
This commit is contained in:
Valentin-Gabriel Mihai 2024-09-23 11:25:01 +02:00
commit 76403ef8ea
10 changed files with 29 additions and 14 deletions

View File

@ -28,7 +28,7 @@ import { MatIcon } from '@angular/material/icon';
import { SelectComponent } from '@shared/components/select/select.component'; import { SelectComponent } from '@shared/components/select/select.component';
import { MatSuffix } from '@angular/material/form-field'; import { MatSuffix } from '@angular/material/form-field';
const downloadTypes = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'].map(type => ({ const downloadTypes = ['ORIGINAL', 'PREVIEW', 'OPTIMIZED_PREVIEW', 'DELTA_PREVIEW', 'REDACTED'].map(type => ({
key: type, key: type,
label: downloadTypesTranslations[type], label: downloadTypesTranslations[type],
})); }));

View File

@ -42,12 +42,16 @@ export class EditDossierDownloadPackageComponent
{ {
#existsWatermarks$: Observable<boolean>; #existsWatermarks$: Observable<boolean>;
form: FormGroup; form: FormGroup;
downloadTypes: { key: DownloadFileType; label: string }[] = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'].map( downloadTypes: { key: DownloadFileType; label: string }[] = [
(type: DownloadFileType) => ({ 'ORIGINAL',
'PREVIEW',
'OPTIMIZED_PREVIEW',
'DELTA_PREVIEW',
'REDACTED',
].map((type: DownloadFileType) => ({
key: type, key: type,
label: downloadTypesTranslations[type], label: downloadTypesTranslations[type],
}), }));
);
availableReportTypes: IReportTemplate[] = []; availableReportTypes: IReportTemplate[] = [];
readonly roles = Roles; readonly roles = Roles;
@Input() dossier: Dossier; @Input() dossier: Dossier;

View File

@ -71,12 +71,16 @@ export class AddDossierDialogComponent extends BaseDialogComponent implements On
readonly roles = Roles; readonly roles = Roles;
readonly iconButtonTypes = IconButtonTypes; readonly iconButtonTypes = IconButtonTypes;
hasDueDate = false; hasDueDate = false;
readonly downloadTypes: { key: DownloadFileType; label: string }[] = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'].map( readonly downloadTypes: { key: DownloadFileType; label: string }[] = [
(type: DownloadFileType) => ({ 'ORIGINAL',
'PREVIEW',
'OPTIMIZED_PREVIEW',
'DELTA_PREVIEW',
'REDACTED',
].map((type: DownloadFileType) => ({
key: type, key: type,
label: downloadTypesTranslations[type], label: downloadTypesTranslations[type],
}), }));
);
dossierTemplates: IDossierTemplate[]; dossierTemplates: IDossierTemplate[];
availableReportTypes: IReportTemplate[] = []; availableReportTypes: IReportTemplate[] = [];
dossierTemplateId: string; dossierTemplateId: string;

View File

@ -90,7 +90,7 @@ export class DownloadDialogComponent extends IqserDialogComponent<DownloadDialog
} }
get #formDownloadTypes() { get #formDownloadTypes() {
return ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'] return ['ORIGINAL', 'PREVIEW', 'OPTIMIZED_PREVIEW', 'DELTA_PREVIEW', 'REDACTED']
.map((type: DownloadFileType) => ({ .map((type: DownloadFileType) => ({
key: type, key: type,
label: downloadTypesForDownloadTranslations[type], label: downloadTypesForDownloadTranslations[type],

View File

@ -4,6 +4,7 @@ import { DownloadFileType } from '@red/domain';
export const downloadTypesTranslations: { [key in DownloadFileType]: string } = { export const downloadTypesTranslations: { [key in DownloadFileType]: string } = {
ORIGINAL: _('download-type.original'), ORIGINAL: _('download-type.original'),
PREVIEW: _('download-type.preview'), PREVIEW: _('download-type.preview'),
OPTIMIZED_PREVIEW: _('download-type.optimized-preview'),
REDACTED: _('download-type.redacted'), REDACTED: _('download-type.redacted'),
ANNOTATED: _('download-type.annotated'), ANNOTATED: _('download-type.annotated'),
FLATTEN: _('download-type.flatten'), FLATTEN: _('download-type.flatten'),
@ -13,6 +14,7 @@ export const downloadTypesTranslations: { [key in DownloadFileType]: string } =
export const downloadTypesForDownloadTranslations: { [key in DownloadFileType]: string } = { export const downloadTypesForDownloadTranslations: { [key in DownloadFileType]: string } = {
ORIGINAL: _('download-type.original'), ORIGINAL: _('download-type.original'),
PREVIEW: _('download-type.preview'), PREVIEW: _('download-type.preview'),
OPTIMIZED_PREVIEW: _('download-type.optimized-preview'),
REDACTED: _('download-type.redacted-only'), REDACTED: _('download-type.redacted-only'),
ANNOTATED: _('download-type.annotated'), ANNOTATED: _('download-type.annotated'),
FLATTEN: _('download-type.flatten'), FLATTEN: _('download-type.flatten'),

View File

@ -1167,6 +1167,7 @@
"delta-preview": "Delta-PDF", "delta-preview": "Delta-PDF",
"flatten": "Verflachte PDF", "flatten": "Verflachte PDF",
"label": "{length} Dokumenten{length, plural, one{typ} other{typen}}", "label": "{length} Dokumenten{length, plural, one{typ} other{typen}}",
"optimized-preview": "Optimized Preview PDF",
"original": "Optimierte PDF", "original": "Optimierte PDF",
"preview": "Vorschau-PDF", "preview": "Vorschau-PDF",
"redacted": "Geschwärzte PDF", "redacted": "Geschwärzte PDF",

View File

@ -1167,6 +1167,7 @@
"delta-preview": "Delta PDF", "delta-preview": "Delta PDF",
"flatten": "Flatten PDF", "flatten": "Flatten PDF",
"label": "{length} document {length, plural, one{version} other{versions}}", "label": "{length} document {length, plural, one{version} other{versions}}",
"optimized-preview": "Optimized Preview PDF",
"original": "Optimized PDF", "original": "Optimized PDF",
"preview": "Preview PDF", "preview": "Preview PDF",
"redacted": "Redacted PDF", "redacted": "Redacted PDF",

View File

@ -1167,6 +1167,7 @@
"delta-preview": "Delta PDF", "delta-preview": "Delta PDF",
"flatten": "PDF verflachen", "flatten": "PDF verflachen",
"label": "{length} document {length, plural, one{version} other{versions}}", "label": "{length} document {length, plural, one{version} other{versions}}",
"optimized-preview": "Optimized Preview PDF",
"original": "Optimiertes PDF", "original": "Optimiertes PDF",
"preview": "PDF-Vorschau", "preview": "PDF-Vorschau",
"redacted": "geschwärztes PDF", "redacted": "geschwärztes PDF",

View File

@ -1167,6 +1167,7 @@
"delta-preview": "Delta PDF", "delta-preview": "Delta PDF",
"flatten": "Flatten PDF", "flatten": "Flatten PDF",
"label": "{length} document {length, plural, one{version} other{versions}}", "label": "{length} document {length, plural, one{version} other{versions}}",
"optimized-preview": "Optimized Preview PDF",
"original": "Optimized PDF", "original": "Optimized PDF",
"preview": "Preview PDF", "preview": "Preview PDF",
"redacted": "Redacted PDF", "redacted": "Redacted PDF",

View File

@ -3,6 +3,7 @@ export const DownloadFileTypes = {
FLATTEN: 'FLATTEN', FLATTEN: 'FLATTEN',
ORIGINAL: 'ORIGINAL', ORIGINAL: 'ORIGINAL',
PREVIEW: 'PREVIEW', PREVIEW: 'PREVIEW',
OPTIMIZED_PREVIEW: 'OPTIMIZED_PREVIEW',
REDACTED: 'REDACTED', REDACTED: 'REDACTED',
DELTA_PREVIEW: 'DELTA_PREVIEW', DELTA_PREVIEW: 'DELTA_PREVIEW',
} as const; } as const;