This commit is contained in:
Adina Țeudan 2021-06-03 14:34:44 +03:00
parent f17e6ab034
commit d264d937fb
8 changed files with 32 additions and 5 deletions

View File

@ -49,6 +49,10 @@
></textarea>
</div>
<mat-checkbox class="watermark" color="primary" formControlName="watermarkEnabled">
{{ 'add-dossier-dialog.form.watermark' | translate }}
</mat-checkbox>
<div class="due-date">
<mat-checkbox
(change)="hasDueDate = !hasDueDate"

View File

@ -1,7 +1,11 @@
@import '../../../../../assets/styles/red-variables';
.watermark {
margin-top: 24px;
}
.due-date {
margin-top: 16px;
margin-top: 8px;
min-height: 34px;
display: flex;
flex-direction: row;

View File

@ -30,7 +30,8 @@ export class AddDossierDialogComponent {
downloadFileTypes: [null],
reportTypes: [null],
description: [null],
dueDate: [null]
dueDate: [null],
watermarkEnabled: [true]
},
{
validators: control =>
@ -114,7 +115,8 @@ export class AddDossierDialogComponent {
dueDate: this.hasDueDate ? this.dossierForm.get('dueDate').value : undefined,
dossierTemplateId: this.dossierForm.get('dossierTemplateId').value,
downloadFileTypes: this.dossierForm.get('downloadFileTypes').value,
reportTypes: this.dossierForm.get('reportTypes').value
reportTypes: this.dossierForm.get('reportTypes').value,
watermarkEnabled: this.dossierForm.get('watermarkEnabled').value
};
}
}

View File

@ -45,6 +45,10 @@
></textarea>
</div>
<mat-checkbox class="watermark" color="primary" formControlName="watermarkEnabled">
{{ 'edit-dossier-dialog.general-info.form.watermark' | translate }}
</mat-checkbox>
<div class="due-date">
<mat-checkbox
(change)="hasDueDate = !hasDueDate"

View File

@ -1,7 +1,11 @@
@import '../../../../../../assets/styles/red-variables';
.watermark {
margin-top: 24px;
}
.due-date {
margin-top: 16px;
margin-top: 8px;
min-height: 34px;
display: flex;
flex-direction: row;

View File

@ -67,7 +67,8 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti
Validators.required
],
description: [this.dossierWrapper.description],
dueDate: [this.dossierWrapper.dueDate]
dueDate: [this.dossierWrapper.dueDate],
watermarkEnabled: [this.dossierWrapper.watermarkEnabled]
});
this.hasDueDate = !!this.dossierWrapper.dueDate;
}
@ -77,6 +78,7 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti
dossierName: this.dossierWrapper.dossierName,
dossierTemplateId: this.dossierWrapper.dossierTemplateId,
description: this.dossierWrapper.description,
watermarkEnabled: this.dossierWrapper.watermarkEnabled,
dueDate: this.dossierWrapper.dueDate
});
}
@ -86,6 +88,7 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti
...this.dossierWrapper.dossier,
dossierName: this.dossierForm.get('dossierName').value,
description: this.dossierForm.get('description').value,
watermarkEnabled: this.dossierForm.get('watermarkEnabled').value,
dueDate: this.hasDueDate ? this.dossierForm.get('dueDate').value : undefined,
dossierTemplateId: this.dossierForm.get('dossierTemplateId').value
};

View File

@ -90,6 +90,10 @@ export class DossierWrapper {
return this.dossier.memberIds.length;
}
get watermarkEnabled(): boolean {
return this.dossier.watermarkEnabled;
}
hasStatus(status: string) {
return this._files.find(f => f.status === status);
}

View File

@ -151,6 +151,7 @@
"label": "Description",
"placeholder": "Enter Description"
},
"watermark": "Watermark application on redacted documents",
"due-date": "Due Date",
"template": "Dossier Template"
},
@ -191,6 +192,7 @@
"label": "Description",
"placeholder": "Enter Description"
},
"watermark": "Watermark application on redacted documents",
"due-date": "Due Date",
"template": "Dossier Template"
}