Read only indicator
This commit is contained in:
parent
6fecb84aa5
commit
0a3e56747e
@ -17,6 +17,11 @@
|
|||||||
{{ activeNavItem.title | translate }}
|
{{ activeNavItem.title | translate }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="activeNavItem.readonly" class="read-only all-caps-label primary">
|
||||||
|
<mat-icon class="mr-8" svgIcon="red:read-only"></mat-icon>
|
||||||
|
{{ 'readonly' | translate }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<redaction-edit-dossier-general-info
|
<redaction-edit-dossier-general-info
|
||||||
*ngIf="activeNav === 'dossierInfo'"
|
*ngIf="activeNav === 'dossierInfo'"
|
||||||
[dossier]="dossier"
|
[dossier]="dossier"
|
||||||
|
|||||||
@ -41,3 +41,15 @@ redaction-edit-dossier-dictionary {
|
|||||||
.stats-subtitle {
|
.stats-subtitle {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.read-only {
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
right: 32px;
|
||||||
|
top: 108px;
|
||||||
|
|
||||||
|
mat-icon {
|
||||||
|
height: 14px;
|
||||||
|
width: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -20,13 +20,20 @@ import { dossiersServiceProvider } from '@services/entity-services/dossiers.serv
|
|||||||
|
|
||||||
type Section = 'dossierInfo' | 'downloadPackage' | 'dossierDictionary' | 'members' | 'dossierAttributes' | 'deletedDocuments';
|
type Section = 'dossierInfo' | 'downloadPackage' | 'dossierDictionary' | 'members' | 'dossierAttributes' | 'deletedDocuments';
|
||||||
|
|
||||||
|
interface NavItem {
|
||||||
|
key: Section;
|
||||||
|
title?: string;
|
||||||
|
sideNavTitle?: string;
|
||||||
|
readonly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './edit-dossier-dialog.component.html',
|
templateUrl: './edit-dossier-dialog.component.html',
|
||||||
styleUrls: ['./edit-dossier-dialog.component.scss'],
|
styleUrls: ['./edit-dossier-dialog.component.scss'],
|
||||||
providers: [dossiersServiceProvider],
|
providers: [dossiersServiceProvider],
|
||||||
})
|
})
|
||||||
export class EditDossierDialogComponent extends BaseDialogComponent implements AfterViewInit {
|
export class EditDossierDialogComponent extends BaseDialogComponent implements AfterViewInit {
|
||||||
navItems: { key: Section; title?: string; sideNavTitle?: string; readonly?: boolean }[] = [];
|
navItems: NavItem[] = [];
|
||||||
readonly iconButtonTypes = IconButtonTypes;
|
readonly iconButtonTypes = IconButtonTypes;
|
||||||
activeNav: Section;
|
activeNav: Section;
|
||||||
readonly dossier$: Observable<Dossier>;
|
readonly dossier$: Observable<Dossier>;
|
||||||
@ -65,7 +72,7 @@ export class EditDossierDialogComponent extends BaseDialogComponent implements A
|
|||||||
this.activeNav = _data.section || 'dossierInfo';
|
this.activeNav = _data.section || 'dossierInfo';
|
||||||
}
|
}
|
||||||
|
|
||||||
get activeNavItem(): { key: string; title?: string } {
|
get activeNavItem(): NavItem {
|
||||||
return this.navItems.find(item => item.key === this.activeNav);
|
return this.navItems.find(item => item.key === this.activeNav);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +187,6 @@ export class EditDossierDialogComponent extends BaseDialogComponent implements A
|
|||||||
{
|
{
|
||||||
key: 'deletedDocuments',
|
key: 'deletedDocuments',
|
||||||
sideNavTitle: _('edit-dossier-dialog.nav-items.deleted-documents'),
|
sideNavTitle: _('edit-dossier-dialog.nav-items.deleted-documents'),
|
||||||
readonly: !this._permissionsService.canHardDeleteOrRestore(this._dossier),
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user