Can edit project dictionary
This commit is contained in:
parent
29ef80f7cd
commit
dbf0d6cc8b
@ -12,10 +12,9 @@ import { PermissionsService } from '../../../../services/permissions.service';
|
||||
styleUrls: ['./dossier-dictionary-dialog.component.scss']
|
||||
})
|
||||
export class DossierDictionaryDialogComponent {
|
||||
canEdit = false;
|
||||
@ViewChild('dictionaryManager', { static: false }) private _dictionaryManager: DictionaryManagerComponent;
|
||||
|
||||
canEdit: boolean = false;
|
||||
|
||||
constructor(
|
||||
public permissionsService: PermissionsService,
|
||||
public dialogRef: MatDialogRef<DossierDictionaryDialogComponent>,
|
||||
|
||||
@ -1 +1,5 @@
|
||||
<redaction-dictionary-manager [initialDictionaryEntries]="projectWrapper.type?.entries || []" [withFloatingActions]="false"></redaction-dictionary-manager>
|
||||
<redaction-dictionary-manager
|
||||
[canEdit]="canEdit"
|
||||
[initialDictionaryEntries]="projectWrapper.type?.entries || []"
|
||||
[withFloatingActions]="false"
|
||||
></redaction-dictionary-manager>
|
||||
|
||||
@ -14,13 +14,16 @@ import { PermissionsService } from '../../../../../services/permissions.service'
|
||||
export class EditProjectDictionaryComponent implements EditProjectSectionInterface {
|
||||
@Input() projectWrapper: ProjectWrapper;
|
||||
@Output() updateProject = new EventEmitter<any>();
|
||||
canEdit = false;
|
||||
@ViewChild(DictionaryManagerComponent, { static: false }) private _dictionaryManager: DictionaryManagerComponent;
|
||||
|
||||
constructor(
|
||||
private readonly _appStateService: AppStateService,
|
||||
private readonly _dictionarySaveService: DictionarySaveService,
|
||||
private readonly _permissionsService: PermissionsService
|
||||
) {}
|
||||
) {
|
||||
this.canEdit = this._permissionsService.isProjectMember(this.projectWrapper) || this._permissionsService.isAdmin();
|
||||
}
|
||||
|
||||
get changed() {
|
||||
return this._dictionaryManager.hasChanges;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user