description template listing > fix clone action condition
This commit is contained in:
parent
313662587d
commit
1587a413cf
|
@ -124,7 +124,7 @@ export class DescriptionTemplateEditorResolver extends BaseEditorResolver {
|
|||
descriptionTemplate.hash = null;
|
||||
descriptionTemplate.code = null;
|
||||
descriptionTemplate.isActive = IsActive.Active;
|
||||
|
||||
descriptionTemplate.belongsToCurrentTenant = true;
|
||||
return descriptionTemplate;
|
||||
}));
|
||||
} else if (newversion != null) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<div class="col-auto" *ngIf="canCreateNew()">
|
||||
<button mat-raised-button class="create-btn" *ngIf="authService.hasPermission(authService.permissionEnum.EditDescriptionTemplate)" [routerLink]="[routerUtils.generateUrl('/description-templates/new')]">
|
||||
<mat-icon>add</mat-icon>
|
||||
{{'DESCRIPTION-TEMPLATE-LISTING.CREATE-DESCRIPTION-TEMPLATE' | translate}}
|
||||
|
|
|
@ -224,7 +224,7 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
|||
}
|
||||
|
||||
public canClone(descriptionTemplate: DescriptionTemplate): boolean {
|
||||
return descriptionTemplate.belongsToCurrentTenant != false && this.hasPermission(AppPermission.CloneDescriptionTemplate, descriptionTemplate);
|
||||
return this.hasPermission(AppPermission.CloneDescriptionTemplate, descriptionTemplate);
|
||||
}
|
||||
|
||||
public canViewVersions(descriptionTemplate: DescriptionTemplate): boolean {
|
||||
|
|
|
@ -202,6 +202,7 @@ export class DescriptionEditorEntityResolver extends BaseEditorResolver {
|
|||
description.id = null;
|
||||
description.hash = null;
|
||||
description.isActive = IsActive.Active;
|
||||
description.belongsToCurrentTenant = true;
|
||||
description.status = DescriptionStatusEnum.Draft;
|
||||
description.plan = plan;
|
||||
description.planDescriptionTemplate = {
|
||||
|
|
Loading…
Reference in New Issue