Merge branch 'master' into VM/RED-6774
This commit is contained in:
commit
219b37f797
@ -68,6 +68,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p class="heading download-includes">{{ 'add-edit-clone-dossier-template.form.apply-updates-default.heading' | translate }}</p>
|
||||||
|
<div class="iqser-input-group">
|
||||||
|
<mat-checkbox color="primary" formControlName="applyDictionaryUpdatesToAllDossiersByDefault">
|
||||||
|
{{ 'add-edit-clone-dossier-template.form.apply-updates-default.description' | translate }}
|
||||||
|
</mat-checkbox>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="heading download-includes">{{ 'download-includes' | translate }}</p>
|
<p class="heading download-includes">{{ 'download-includes' | translate }}</p>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<redaction-select
|
<redaction-select
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export class AddEditCloneDossierTemplateDialogComponent extends BaseDialogCompon
|
|||||||
) {
|
) {
|
||||||
super(_dialogRef, !!data && !data.clone);
|
super(_dialogRef, !!data && !data.clone);
|
||||||
this.dossierTemplate = this._dossierTemplatesService.find(this.data?.dossierTemplateId);
|
this.dossierTemplate = this._dossierTemplatesService.find(this.data?.dossierTemplateId);
|
||||||
this.form = this._getForm();
|
this.form = this.#getForm();
|
||||||
this.initialFormValue = this.form.getRawValue();
|
this.initialFormValue = this.form.getRawValue();
|
||||||
this.hasValidFrom = !!this.dossierTemplate?.validFrom;
|
this.hasValidFrom = !!this.dossierTemplate?.validFrom;
|
||||||
this.hasValidTo = !!this.dossierTemplate?.validTo;
|
this.hasValidTo = !!this.dossierTemplate?.validTo;
|
||||||
@ -113,18 +113,19 @@ export class AddEditCloneDossierTemplateDialogComponent extends BaseDialogCompon
|
|||||||
this._lastValidTo = this._previousValidTo || this._lastValidTo;
|
this._lastValidTo = this._previousValidTo || this._lastValidTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _getForm() {
|
#getForm() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
name: [this._getCloneName(), Validators.required],
|
name: [this.#getCloneName(), Validators.required],
|
||||||
description: [this.dossierTemplate?.description],
|
description: [this.dossierTemplate?.description],
|
||||||
validFrom: [
|
validFrom: [
|
||||||
this.dossierTemplate?.validFrom ? dayjs(this.dossierTemplate?.validFrom).toDate() : null,
|
this.dossierTemplate?.validFrom ? dayjs(this.dossierTemplate?.validFrom).toDate() : null,
|
||||||
this._requiredIfValidator(() => this.hasValidFrom),
|
this.#requiredIfValidator(() => this.hasValidFrom),
|
||||||
],
|
],
|
||||||
validTo: [
|
validTo: [
|
||||||
this.dossierTemplate?.validTo ? dayjs(this.dossierTemplate?.validTo).toDate() : null,
|
this.dossierTemplate?.validTo ? dayjs(this.dossierTemplate?.validTo).toDate() : null,
|
||||||
this._requiredIfValidator(() => this.hasValidTo),
|
this.#requiredIfValidator(() => this.hasValidTo),
|
||||||
],
|
],
|
||||||
|
applyDictionaryUpdatesToAllDossiersByDefault: [this.dossierTemplate?.applyDictionaryUpdatesToAllDossiersByDefault],
|
||||||
downloadFileTypes: [this.dossierTemplate?.downloadFileTypes || ['PREVIEW', 'REDACTED']],
|
downloadFileTypes: [this.dossierTemplate?.downloadFileTypes || ['PREVIEW', 'REDACTED']],
|
||||||
keepHiddenText: [this.dossierTemplate?.keepHiddenText],
|
keepHiddenText: [this.dossierTemplate?.keepHiddenText],
|
||||||
keepImageMetadata: [this.dossierTemplate?.keepImageMetadata],
|
keepImageMetadata: [this.dossierTemplate?.keepImageMetadata],
|
||||||
@ -132,7 +133,7 @@ export class AddEditCloneDossierTemplateDialogComponent extends BaseDialogCompon
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private _getCloneName(): string {
|
#getCloneName(): string {
|
||||||
if (!this.data?.clone) {
|
if (!this.data?.clone) {
|
||||||
return this.dossierTemplate?.name;
|
return this.dossierTemplate?.name;
|
||||||
}
|
}
|
||||||
@ -157,7 +158,7 @@ export class AddEditCloneDossierTemplateDialogComponent extends BaseDialogCompon
|
|||||||
return `Copy of ${nameOfClonedTemplate}`;
|
return `Copy of ${nameOfClonedTemplate}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _requiredIfValidator(predicate) {
|
#requiredIfValidator(predicate) {
|
||||||
return (formControl: AbstractControl) => {
|
return (formControl: AbstractControl) => {
|
||||||
if (!formControl.parent) {
|
if (!formControl.parent) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -260,7 +260,7 @@ export class WatermarkScreenComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async #loadDocument() {
|
async #loadDocument() {
|
||||||
const filename = `blank-${this.#config.WATERMARK_PREVIEW_PAPER_FORMAT}.pdf`;
|
const filename = `blank-${this.#config.WATERMARK_PREVIEW_PAPER_FORMAT || 'a4'}.pdf`;
|
||||||
const request = this._http.get(`/assets/pdftron/${filename}`, {
|
const request = this._http.get(`/assets/pdftron/${filename}`, {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
});
|
});
|
||||||
|
|||||||
@ -282,13 +282,11 @@ export class SearchScreenComponent extends ListingComponent<ISearchListItem> imp
|
|||||||
}: IMatchedDocument): ISearchListItem {
|
}: IMatchedDocument): ISearchListItem {
|
||||||
const file = this._filesMapService.get(dossierId, fileId);
|
const file = this._filesMapService.get(dossierId, fileId);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
console.error('Missing file');
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dossier = this._dossiersCacheService.get(dossierId);
|
const dossier = this._dossiersCacheService.get(dossierId);
|
||||||
if (!dossier) {
|
if (!dossier) {
|
||||||
console.error('Missing dossier');
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,11 @@
|
|||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
"valid-from": "Gültig ab",
|
"valid-from": "Gültig ab",
|
||||||
"valid-to": "Gültig bis"
|
"valid-to": "Gültig bis",
|
||||||
|
"apply-updates-default": {
|
||||||
|
"heading": "",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"save": "Dossier-Vorlage speichern",
|
"save": "Dossier-Vorlage speichern",
|
||||||
"title": "{type, select, edit{Dossier-Vorlage {name} bearbeiten} create{Dossier-Vorlage erstellen} clone{} other{}}"
|
"title": "{type, select, edit{Dossier-Vorlage {name} bearbeiten} create{Dossier-Vorlage erstellen} clone{} other{}}"
|
||||||
|
|||||||
@ -61,7 +61,11 @@
|
|||||||
"title": "Keep overlapping elements"
|
"title": "Keep overlapping elements"
|
||||||
},
|
},
|
||||||
"valid-from": "Valid from",
|
"valid-from": "Valid from",
|
||||||
"valid-to": "Valid to"
|
"valid-to": "Valid to",
|
||||||
|
"apply-updates-default": {
|
||||||
|
"heading": "Entity configuration",
|
||||||
|
"description": "Apply dictionary updates to all dossiers by default"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"save": "Save Dossier Template",
|
"save": "Save Dossier Template",
|
||||||
"title": "{type, select, edit{Edit {name}} create{Create} clone{Clone} other{}} Dossier Template"
|
"title": "{type, select, edit{Edit {name}} create{Create} clone{Clone} other{}} Dossier Template"
|
||||||
|
|||||||
@ -23,7 +23,7 @@ AVAILABLE_OLD_NOTIFICATIONS_MINUTES="${AVAILABLE_OLD_NOTIFICATIONS_MINUTES:-60}"
|
|||||||
NOTIFICATIONS_THRESHOLD="${NOTIFICATIONS_THRESHOLD:-1000}"
|
NOTIFICATIONS_THRESHOLD="${NOTIFICATIONS_THRESHOLD:-1000}"
|
||||||
BASE_TRANSLATIONS_DIRECTORY="${BASE_TRANSLATIONS_DIRECTORY:-/assets/i18n/redact/}"
|
BASE_TRANSLATIONS_DIRECTORY="${BASE_TRANSLATIONS_DIRECTORY:-/assets/i18n/redact/}"
|
||||||
THEME="${THEME:-theme-template}"
|
THEME="${THEME:-theme-template}"
|
||||||
WATERMARK_PREVIEW_PAPER_FORMAT="${WATERMARK_PREVIEW_PAPER_FORMAT:a4}"
|
WATERMARK_PREVIEW_PAPER_FORMAT="${WATERMARK_PREVIEW_PAPER_FORMAT:-a4}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ echo '{
|
|||||||
"AVAILABLE_NOTIFICATIONS_DAYS":"'"$AVAILABLE_NOTIFICATIONS_DAYS"'",
|
"AVAILABLE_NOTIFICATIONS_DAYS":"'"$AVAILABLE_NOTIFICATIONS_DAYS"'",
|
||||||
"AVAILABLE_OLD_NOTIFICATIONS_MINUTES":"'"$AVAILABLE_OLD_NOTIFICATIONS_MINUTES"'",
|
"AVAILABLE_OLD_NOTIFICATIONS_MINUTES":"'"$AVAILABLE_OLD_NOTIFICATIONS_MINUTES"'",
|
||||||
"NOTIFICATIONS_THRESHOLD":"'"$NOTIFICATIONS_THRESHOLD"'",
|
"NOTIFICATIONS_THRESHOLD":"'"$NOTIFICATIONS_THRESHOLD"'",
|
||||||
"WATERMARK_PREVIEW_PAPER_FORMAT":"'"$WATERMARK_PREVIEW_PAPER_FORMAT"'",
|
"WATERMARK_PREVIEW_PAPER_FORMAT":"'"$WATERMARK_PREVIEW_PAPER_FORMAT"'"
|
||||||
}' > /usr/share/nginx/html/ui/assets/config/config.json
|
}' > /usr/share/nginx/html/ui/assets/config/config.json
|
||||||
|
|
||||||
echo 'Env variables: '
|
echo 'Env variables: '
|
||||||
|
|||||||
@ -19,6 +19,7 @@ export class DossierTemplate implements IDossierTemplate, IListable {
|
|||||||
readonly keepHiddenText: boolean;
|
readonly keepHiddenText: boolean;
|
||||||
readonly keepImageMetadata: boolean;
|
readonly keepImageMetadata: boolean;
|
||||||
readonly keepOverlappingObjects: boolean;
|
readonly keepOverlappingObjects: boolean;
|
||||||
|
readonly applyDictionaryUpdatesToAllDossiersByDefault: boolean;
|
||||||
|
|
||||||
constructor(dossierTemplate: IDossierTemplate) {
|
constructor(dossierTemplate: IDossierTemplate) {
|
||||||
this.createdBy = dossierTemplate.createdBy;
|
this.createdBy = dossierTemplate.createdBy;
|
||||||
@ -36,6 +37,7 @@ export class DossierTemplate implements IDossierTemplate, IListable {
|
|||||||
this.keepHiddenText = dossierTemplate.keepHiddenText;
|
this.keepHiddenText = dossierTemplate.keepHiddenText;
|
||||||
this.keepImageMetadata = dossierTemplate.keepImageMetadata;
|
this.keepImageMetadata = dossierTemplate.keepImageMetadata;
|
||||||
this.keepOverlappingObjects = dossierTemplate.keepOverlappingObjects;
|
this.keepOverlappingObjects = dossierTemplate.keepOverlappingObjects;
|
||||||
|
this.applyDictionaryUpdatesToAllDossiersByDefault = dossierTemplate.applyDictionaryUpdatesToAllDossiersByDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
get isActive(): boolean {
|
get isActive(): boolean {
|
||||||
|
|||||||
@ -60,4 +60,5 @@ export interface IDossierTemplate {
|
|||||||
* Overlapping elements in the document can potentially contain hidden sensitive information
|
* Overlapping elements in the document can potentially contain hidden sensitive information
|
||||||
*/
|
*/
|
||||||
readonly keepOverlappingObjects: boolean;
|
readonly keepOverlappingObjects: boolean;
|
||||||
|
readonly applyDictionaryUpdatesToAllDossiersByDefault: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "redaction",
|
"name": "redaction",
|
||||||
"version": "4.128.0",
|
"version": "4.129.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user