Merge branch 'master' into VM/RED-8748

This commit is contained in:
Valentin Mihai 2024-04-18 17:38:14 +03:00
commit b157980d8a
5 changed files with 23 additions and 16 deletions

View File

@ -11,6 +11,7 @@ import { DictionaryService } from '@services/entity-services/dictionary.service'
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { WatermarkService } from '@services/entity-services/watermark.service';
import { FileAttributesService } from '@services/entity-services/file-attributes.service';
import { getConfig } from '@iqser/common-ui';
export function templateExistsWhenEnteringAdmin(): CanActivateFn {
return async function (route: ActivatedRouteSnapshot): Promise<boolean> {
@ -20,12 +21,15 @@ export function templateExistsWhenEnteringAdmin(): CanActivateFn {
const defaultColorsService = inject(DefaultColorsService);
const watermarksService = inject(WatermarkService);
const router = inject(Router);
const isDocumine = getConfig().IS_DOCUMINE;
const dossierTemplate = inject(DossierTemplateStatsService).get(dossierTemplateId);
await firstValueFrom(fileAttributesService.loadFileAttributesConfig(dossierTemplateId));
await firstValueFrom(dictionaryService.loadDictionaryDataForDossierTemplate(dossierTemplateId));
await firstValueFrom(defaultColorsService.loadForDossierTemplate(dossierTemplateId));
await firstValueFrom(watermarksService.loadForDossierTemplate(dossierTemplateId));
if (!isDocumine) {
await firstValueFrom(watermarksService.loadForDossierTemplate(dossierTemplateId));
}
if (!dossierTemplate) {
await router.navigate(['main', 'admin', 'dossier-templates']);
return false;
@ -46,6 +50,7 @@ export function templateExistsWhenEnteringDossierList(): CanActivateFn {
const dictionaryService = inject(DictionaryService);
const defaultColorsService = inject(DefaultColorsService);
const watermarksService = inject(WatermarkService);
const isDocumine = getConfig().IS_DOCUMINE;
await firstValueFrom(dashboardStatsService.loadForTemplate(dossierTemplateId));
await firstValueFrom(dossierTemplatesService.loadDossierTemplate(dossierTemplateId));
@ -59,7 +64,9 @@ export function templateExistsWhenEnteringDossierList(): CanActivateFn {
await firstValueFrom(fileAttributesService.loadFileAttributesConfig(dossierTemplateId));
await firstValueFrom(dictionaryService.loadDictionaryDataForDossierTemplate(dossierTemplateId));
await firstValueFrom(defaultColorsService.loadForDossierTemplate(dossierTemplateId));
await firstValueFrom(watermarksService.loadForDossierTemplate(dossierTemplateId));
if (!isDocumine) {
await firstValueFrom(watermarksService.loadForDossierTemplate(dossierTemplateId));
}
return true;
};
}

View File

@ -1903,7 +1903,7 @@
"pdf-viewer": {
"text-popup": {
"actions": {
"search": "Search for selection"
"search": "Search for selected text"
}
},
"toggle-layers": "{active, select, true{Disable} false{Enable} other{}} layout grid",
@ -2015,8 +2015,8 @@
"label-bulk": ""
},
"only-here": {
"description": "Do not annotate the term at this position in the current document.",
"description-bulk": "Do not auto-annotate the selected terms at this position in the current document.",
"description": "Do not annotate the term at this position in this document.",
"description-bulk": "Do not auto-annotate the selected terms at this position in this document.",
"label": "Remove here"
}
},
@ -2044,7 +2044,7 @@
"false-positive": {
"description": "Mark this redaction as a false-positive. The term will not be redacted in this dossier if it occurs in the same context.",
"description-bulk": "Mark these redactions as false-positives. The terms will not be redacted in this dossier if they occur in the same context.",
"extraOptionDescription": "Dossier template access is required to reverse this action. As a regular user you can only reverse it for the current dossier.",
"extraOptionDescription": "Dossier template access is required to reverse this action. As a regular user you can only reverse it for this dossier.",
"extraOptionLabel": "Apply to all active and future dossiers",
"label": "Remove from dossier in this context"
},
@ -2056,8 +2056,8 @@
"label-bulk": "Remove from dossier"
},
"only-here": {
"description": "Do not {type, select, hint{annotate} other{redact}} the term at this position in the current document.",
"description-bulk": "Do not redact the selected terms at this position in the current document.",
"description": "Do not {type, select, hint{annotate} other{redact}} the term at this position in this document.",
"description-bulk": "Do not redact the selected terms at this position in this document.",
"label": "Remove here"
}
}

View File

@ -1903,7 +1903,7 @@
"pdf-viewer": {
"text-popup": {
"actions": {
"search": "Search for selection"
"search": "Search for selected text"
}
},
"toggle-layers": "{active, select, true{Disable} false{Enable} other{}} layout grid",
@ -2015,8 +2015,8 @@
"label-bulk": ""
},
"only-here": {
"description": "Do not annotate the term at this position in the current document.",
"description-bulk": "Do not auto-annotate the selected terms at this position in the current document.",
"description": "Do not annotate the term at this position in this document.",
"description-bulk": "Do not auto-annotate the selected terms at this position in this document.",
"label": "Remove here"
}
},
@ -2044,7 +2044,7 @@
"false-positive": {
"description": "Mark this redaction as a false-positive. The term will not be redacted in this dossier if it occurs in the same context.",
"description-bulk": "Mark these redactions as false-positives. The terms will not be redacted in this dossier if they occur in the same context.",
"extraOptionDescription": "Dossier template access is required to reverse this action. As a regular user you can only reverse it for the current dossier.",
"extraOptionDescription": "Dossier template access is required to reverse this action. As a regular user you can only reverse it for this dossier.",
"extraOptionLabel": "Apply to all active and future dossiers",
"label": "Remove from dossier in this context"
},
@ -2056,8 +2056,8 @@
"label-bulk": "Remove from dossier"
},
"only-here": {
"description": "Do not {type, select, hint{annotate} other{redact}} the term at this position in the current document.",
"description-bulk": "Do not redact the selected terms at this position in the current document.",
"description": "Do not {type, select, hint{annotate} other{redact}} the term at this position in this document.",
"description-bulk": "Do not redact the selected terms at this position in this document.",
"label": "Remove here"
}
}

View File

@ -1903,7 +1903,7 @@
"pdf-viewer": {
"text-popup": {
"actions": {
"search": "Search for selection"
"search": "Search for selected text"
}
},
"toggle-layers": "{active, select, true{Disable} false{Enable} other{}} layout grid",

View File

@ -1903,7 +1903,7 @@
"pdf-viewer": {
"text-popup": {
"actions": {
"search": "Search for selection"
"search": "Search for selected text"
}
},
"toggle-layers": "{active, select, true{Disable} false{Enable} other{}} layout grid",