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 = [
|
const dossierTemplateIdRoutes: IqserRoutes = [
|
||||||
{ path: '', redirectTo: 'info', pathMatch: 'full' },
|
{ 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',
|
path: 'entities',
|
||||||
children: entityRoutes,
|
children: entityRoutes,
|
||||||
@ -55,11 +66,6 @@ const dossierTemplateIdRoutes: IqserRoutes = [
|
|||||||
path: '',
|
path: '',
|
||||||
component: BaseDossierTemplateScreenComponent,
|
component: BaseDossierTemplateScreenComponent,
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
path: 'info',
|
|
||||||
loadComponent: () => import('./screens/info/dossier-template-info-screen/dossier-template-info-screen.component'),
|
|
||||||
canDeactivate: [PendingChangesGuard],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'entity-rules',
|
path: 'entity-rules',
|
||||||
loadComponent: () => import('./screens/rules/rules-screen/rules-screen.component'),
|
loadComponent: () => import('./screens/rules/rules-screen/rules-screen.component'),
|
||||||
|
|||||||
@ -13,5 +13,13 @@
|
|||||||
[tooltip]="'dossier-templates-listing.action.clone' | translate"
|
[tooltip]="'dossier-templates-listing.action.clone' | translate"
|
||||||
icon="iqser:copy"
|
icon="iqser:copy"
|
||||||
></iqser-circle-button>
|
></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>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export class DossierTemplateActionsComponent implements OnInit {
|
|||||||
@Input() dossierTemplateId: string;
|
@Input() dossierTemplateId: string;
|
||||||
|
|
||||||
readonly currentUser = getCurrentUser<User>();
|
readonly currentUser = getCurrentUser<User>();
|
||||||
|
readonly enableEdit = this._route.routeConfig?.path !== 'info';
|
||||||
dossierTemplate: DossierTemplate;
|
dossierTemplate: DossierTemplate;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user