Working edit dossier dictionary display name

This commit is contained in:
Adina Țeudan 2021-08-16 09:10:52 +03:00
parent 60545315cd
commit 69620b0b7e
3 changed files with 4 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<div class="header-wrapper">
<div class="heading">
<div>{{ dossierWrapper.type?.label || ('edit-dossier-dialog.nav-items.dossier-dictionary' | translate) }}</div>
<div>{{ dossierWrapper.type?.label }}</div>
<div class="small-label stats-subtitle">
<div>
<mat-icon svgIcon="red:entries"></mat-icon>
@ -10,10 +10,7 @@
</div>
<div class="display-name">
<div
[translateParams]="{ type: dossierWrapper.type?.label ? 'edit' : 'set' }"
[translate]="'edit-dossier-dialog.dictionary.display-name.edit'"
></div>
<div translate="edit-dossier-dialog.dictionary.display-name.edit"></div>
<iqser-editable-input
(save)="updateDisplayName($event)"
[buttonsType]="circleButtonTypes.default"

View File

@ -51,7 +51,7 @@ export class EditDossierDictionaryComponent implements EditDossierSectionInterfa
async updateDisplayName(label: string) {
const typeValue: Dictionary = { ...this.dossierWrapper.type, label };
await this._dictionaryControllerService
.updateType(typeValue, this.dossierWrapper.dossierTemplateId, 'dossier_redaction')
.updateType(typeValue, this.dossierWrapper.dossierTemplateId, 'dossier_redaction', this.dossierWrapper.dossierId)
.toPromise();
await this._appStateService.updateDossierDictionary(this.dossierWrapper.dossierTemplateId, this.dossierWrapper.dossierId);
this.updateDossier.emit();

View File

@ -798,7 +798,7 @@
"dictionary": {
"display-name": {
"cancel": "Cancel",
"edit": "{type, select, edit{Edit} set{Set} other{}} Display Name",
"edit": "Edit Display Name",
"placeholder": "Enter Display Name",
"save": "Save Display Name"
},