DM-604 hide watermark options & skip dossier_redaction dictionary
This commit is contained in:
parent
e8fe6f37de
commit
5d97da46cb
@ -1,16 +1,19 @@
|
||||
import { Injectable, Injector, ProviderToken } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';
|
||||
import { FilesMapService } from '@services/files/files-map.service';
|
||||
import { FilesService } from '@services/files/files.service';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { getConfig } from '@iqser/common-ui';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { DOSSIER_ID, DOSSIER_TEMPLATE_ID } from '@red/domain';
|
||||
import { DossiersService } from '@services/dossiers/dossiers.service';
|
||||
import { DictionaryService } from '@services/entity-services/dictionary.service';
|
||||
import { DossierDictionariesMapService } from '@services/entity-services/dossier-dictionaries-map.service';
|
||||
import { TenantsService } from '@iqser/common-ui/lib/tenants';
|
||||
import { FilesMapService } from '@services/files/files-map.service';
|
||||
import { FilesService } from '@services/files/files.service';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class DossierFilesGuard implements CanActivate {
|
||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||
|
||||
constructor(
|
||||
private readonly _injector: Injector,
|
||||
private readonly _tenantsService: TenantsService,
|
||||
@ -45,7 +48,7 @@ export class DossierFilesGuard implements CanActivate {
|
||||
async loadDossierData(dossierId: string, dossierTemplateId: string) {
|
||||
const promises = [];
|
||||
|
||||
if (!this._dictionaryMapService.has(dossierId)) {
|
||||
if (!this._dictionaryMapService.has(dossierId) && !this.isDocumine) {
|
||||
const dictionaryPromise = this._dictionaryService.loadDossierDictionary(dossierTemplateId, dossierId);
|
||||
promises.push(dictionaryPromise);
|
||||
}
|
||||
|
||||
@ -52,12 +52,14 @@
|
||||
</div>
|
||||
|
||||
<redaction-watermark-selector
|
||||
*ngIf="!config.IS_DOCUMINE"
|
||||
[dossierTemplateId]="dossierTemplateId"
|
||||
[label]="'dossier-watermark-selector.watermark' | translate"
|
||||
formControlName="watermarkId"
|
||||
></redaction-watermark-selector>
|
||||
|
||||
<redaction-watermark-selector
|
||||
*ngIf="!config.IS_DOCUMINE"
|
||||
[dossierTemplateId]="dossierTemplateId"
|
||||
[label]="'dossier-watermark-selector.preview' | translate"
|
||||
formControlName="previewWatermarkId"
|
||||
@ -83,7 +85,7 @@
|
||||
<div class="flex">
|
||||
<redaction-select
|
||||
[height]="165"
|
||||
[label]="'report-type.label' | translate : { length: reportTemplateIdsLength }"
|
||||
[label]="'report-type.label' | translate: { length: reportTemplateIdsLength }"
|
||||
[optionTemplate]="reportTemplateOptionTemplate"
|
||||
[options]="availableReportTypes"
|
||||
[valueMapper]="reportTemplateValueMapper"
|
||||
@ -94,7 +96,7 @@
|
||||
<redaction-select
|
||||
*deny="roles.getRss"
|
||||
[height]="165"
|
||||
[label]="'download-type.label' | translate : { length: downloadFileTypesLength }"
|
||||
[label]="'download-type.label' | translate: { length: downloadFileTypesLength }"
|
||||
[options]="downloadTypes"
|
||||
formControlName="downloadFileTypes"
|
||||
></redaction-select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user