From 83091ee4284e064de95a367b28a4f2d606b84687 Mon Sep 17 00:00:00 2001 From: mchouliara Date: Wed, 28 Aug 2024 13:38:24 +0300 Subject: [PATCH] small fixes plan blueprint editor --- .../editor/plan-blueprint-editor.component.html | 4 ++-- .../editor/plan-blueprint-editor.component.ts | 10 +++------- .../editor/plan-blueprint-editor.model.ts | 3 ++- .../editor/plan-blueprint-editor.resolver.ts | 13 ++++++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html index e6d22caff..50b2e6f33 100644 --- a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html +++ b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.html @@ -106,7 +106,7 @@
{{'PLAN-BLUEPRINT-EDITOR.FIELDS.CATEGORY' | translate}} - + {{enumUtils.toPlanBlueprintFieldCategoryString(fieldCategory)}} {{field.get('category').getError('backendError').message}} @@ -116,7 +116,7 @@
{{'PLAN-BLUEPRINT-EDITOR.FIELDS.SYSTEM-FIELD-TYPE' | translate}} - + {{enumUtils.toPlanBlueprintSystemFieldTypeString(systemFieldType)}} {{field.get('systemFieldType').getError('backendError').message}} diff --git a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.ts b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.ts index 522004cc9..8fad7f69e 100644 --- a/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.ts +++ b/frontend/src/app/ui/admin/plan-blueprint/editor/plan-blueprint-editor.component.ts @@ -180,13 +180,9 @@ export class PlanBlueprintEditorComponent extends BaseEditor this.breadcrumbService.addIdResolvedValue(cloneid, x.label)), takeUntil(this._destroyed), map((blueprint: PlanBlueprint) => { - blueprint.id = null; - blueprint.hash = null; - blueprint.code = null; - blueprint.isActive = IsActive.Active; - return blueprint; + return { + ...blueprint, + id: null, + hash: null, + code: null, + isActive: IsActive.Active, + belongsToCurrentTenant: true + } })); } else if (newversion != null) { return this.planBlueprintService.getSingle(Guid.parse(newversion), fields).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(newversion, x.label)), takeUntil(this._destroyed));