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.hash = null;
|
||||||
descriptionTemplate.code = null;
|
descriptionTemplate.code = null;
|
||||||
descriptionTemplate.isActive = IsActive.Active;
|
descriptionTemplate.isActive = IsActive.Active;
|
||||||
|
descriptionTemplate.belongsToCurrentTenant = true;
|
||||||
return descriptionTemplate;
|
return descriptionTemplate;
|
||||||
}));
|
}));
|
||||||
} else if (newversion != null) {
|
} else if (newversion != null) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</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')]">
|
<button mat-raised-button class="create-btn" *ngIf="authService.hasPermission(authService.permissionEnum.EditDescriptionTemplate)" [routerLink]="[routerUtils.generateUrl('/description-templates/new')]">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
{{'DESCRIPTION-TEMPLATE-LISTING.CREATE-DESCRIPTION-TEMPLATE' | translate}}
|
{{'DESCRIPTION-TEMPLATE-LISTING.CREATE-DESCRIPTION-TEMPLATE' | translate}}
|
||||||
|
|
|
@ -224,7 +224,7 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
||||||
}
|
}
|
||||||
|
|
||||||
public canClone(descriptionTemplate: DescriptionTemplate): boolean {
|
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 {
|
public canViewVersions(descriptionTemplate: DescriptionTemplate): boolean {
|
||||||
|
|
|
@ -202,6 +202,7 @@ export class DescriptionEditorEntityResolver extends BaseEditorResolver {
|
||||||
description.id = null;
|
description.id = null;
|
||||||
description.hash = null;
|
description.hash = null;
|
||||||
description.isActive = IsActive.Active;
|
description.isActive = IsActive.Active;
|
||||||
|
description.belongsToCurrentTenant = true;
|
||||||
description.status = DescriptionStatusEnum.Draft;
|
description.status = DescriptionStatusEnum.Draft;
|
||||||
description.plan = plan;
|
description.plan = plan;
|
||||||
description.planDescriptionTemplate = {
|
description.planDescriptionTemplate = {
|
||||||
|
|
Loading…
Reference in New Issue