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

This commit is contained in:
Nicoleta Panaghiu 2024-09-23 11:58:39 +03:00
parent 036bfa2878
commit e57d54a755
10 changed files with 29 additions and 14 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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