RED-9605: show edit dossier template button on other screens.
This commit is contained in:
parent
366f8cd2bf
commit
a091a96b69
@ -47,6 +47,17 @@ const entityRoutes: IqserRoutes = [
|
||||
|
||||
const dossierTemplateIdRoutes: IqserRoutes = [
|
||||
{ path: '', redirectTo: 'info', pathMatch: 'full' },
|
||||
{
|
||||
path: 'info',
|
||||
component: BaseDossierTemplateScreenComponent,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
canDeactivate: [PendingChangesGuard],
|
||||
loadComponent: () => import('./screens/info/dossier-template-info-screen/dossier-template-info-screen.component'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'entities',
|
||||
children: entityRoutes,
|
||||
@ -55,11 +66,6 @@ const dossierTemplateIdRoutes: IqserRoutes = [
|
||||
path: '',
|
||||
component: BaseDossierTemplateScreenComponent,
|
||||
children: [
|
||||
{
|
||||
path: 'info',
|
||||
loadComponent: () => import('./screens/info/dossier-template-info-screen/dossier-template-info-screen.component'),
|
||||
canDeactivate: [PendingChangesGuard],
|
||||
},
|
||||
{
|
||||
path: 'entity-rules',
|
||||
loadComponent: () => import('./screens/rules/rules-screen/rules-screen.component'),
|
||||
|
||||
@ -13,5 +13,13 @@
|
||||
[tooltip]="'dossier-templates-listing.action.clone' | translate"
|
||||
icon="iqser:copy"
|
||||
></iqser-circle-button>
|
||||
|
||||
<iqser-circle-button
|
||||
*ngIf="enableEdit"
|
||||
[buttonId]="'edit-dossier-template-btn'"
|
||||
[routerLink]="dossierTemplate.routerLink"
|
||||
[tooltip]="'dossier-templates-listing.action.edit' | translate"
|
||||
icon="iqser:edit"
|
||||
></iqser-circle-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -20,6 +20,7 @@ export class DossierTemplateActionsComponent implements OnInit {
|
||||
@Input() dossierTemplateId: string;
|
||||
|
||||
readonly currentUser = getCurrentUser<User>();
|
||||
readonly enableEdit = this._route.routeConfig?.path !== 'info';
|
||||
dossierTemplate: DossierTemplate;
|
||||
|
||||
constructor(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user