added missing owner hint when edit dossier dialog is opened and there is no owner set
This commit is contained in:
parent
3db3a6a1c4
commit
7a00abf841
@ -1,4 +1,4 @@
|
||||
import { ChangeDetectorRef, Component, Inject, Injector, ViewChild } from '@angular/core';
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, Inject, Injector, ViewChild } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { EditDossierGeneralInfoComponent } from './general-info/edit-dossier-general-info.component';
|
||||
@ -23,7 +23,7 @@ type Section = 'dossierInfo' | 'downloadPackage' | 'dossierDictionary' | 'member
|
||||
templateUrl: './edit-dossier-dialog.component.html',
|
||||
styleUrls: ['./edit-dossier-dialog.component.scss'],
|
||||
})
|
||||
export class EditDossierDialogComponent extends BaseDialogComponent {
|
||||
export class EditDossierDialogComponent extends BaseDialogComponent implements AfterViewInit {
|
||||
readonly navItems: { key: Section; title?: string; sideNavTitle?: string }[];
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
activeNav: Section;
|
||||
@ -89,6 +89,12 @@ export class EditDossierDialogComponent extends BaseDialogComponent {
|
||||
this.activeNav = _data.section || 'dossierInfo';
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
if (!this._dossier.ownerId) {
|
||||
this._toaster.error(_('edit-dossier-dialog.missing-owner'));
|
||||
}
|
||||
}
|
||||
|
||||
get activeNavItem(): { key: string; title?: string } {
|
||||
return this.navItems.find(item => item.key === this.activeNav);
|
||||
}
|
||||
|
||||
@ -146,15 +146,6 @@
|
||||
"plural": ""
|
||||
},
|
||||
"annotation-actions": {
|
||||
"resize": {
|
||||
"label": "Größe ändern"
|
||||
},
|
||||
"resize-accept": {
|
||||
"label": "Größe speichern"
|
||||
},
|
||||
"resize-cancel": {
|
||||
"label": "Größenänderung abbrechen"
|
||||
},
|
||||
"accept-recommendation": {
|
||||
"label": "Empfehlung annehmen"
|
||||
},
|
||||
@ -956,6 +947,7 @@
|
||||
}
|
||||
},
|
||||
"header": "{dossierName} bearbeiten",
|
||||
"missing-owner": "",
|
||||
"nav-items": {
|
||||
"choose-download": "Wählen Sie die Dokumente für Ihr Download-Paket aus:",
|
||||
"deleted-documents": "Gelöschte Dokumente",
|
||||
|
||||
@ -296,7 +296,6 @@
|
||||
"suggestion-add": "Suggested redaction",
|
||||
"suggestion-add-dictionary": "Suggested dictionary add",
|
||||
"suggestion-change-legal-basis": "Suggested change legal basis",
|
||||
"suggestion-force-redaction": "Suggestion force redaction",
|
||||
"suggestion-force-redaction": "Suggestion force hint",
|
||||
"suggestion-recategorize-image": "Suggested recategorize image",
|
||||
"suggestion-remove": "Suggested local removal",
|
||||
@ -967,6 +966,7 @@
|
||||
}
|
||||
},
|
||||
"header": "Edit {dossierName}",
|
||||
"missing-owner": "You cannot edit the dossier because the owner is missing!",
|
||||
"nav-items": {
|
||||
"choose-download": "Choose what is included at download:",
|
||||
"deleted-documents": "Deleted Documents",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user