From e1dec1f5c85b308e5b6b14db9c288fbd334a00cf Mon Sep 17 00:00:00 2001 From: mchouliara Date: Mon, 2 Sep 2024 11:15:41 +0300 Subject: [PATCH] description listing > fix bug on invite user on description w/o blueprint --- .../invitation/dialog/plan-invitation-dialog.component.html | 2 +- .../app/ui/plan/plan-editor-blueprint/plan-editor.model.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html b/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html index e81e922ae..652569ad4 100644 --- a/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html +++ b/frontend/src/app/ui/plan/invitation/dialog/plan-invitation-dialog.component.html @@ -9,7 +9,7 @@
- +
diff --git a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts index a6752e335..5994f394a 100644 --- a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts +++ b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.model.ts @@ -45,7 +45,7 @@ export class PlanEditorModel extends BaseEditorModel implements PlanPersist { this.accessType = item.accessType; if (item?.planUsers) { item.planUsers.filter(x => x.isActive === IsActive.Active).map(x => this.users.push(new PlanUserEditorModel(this.validationErrorModel).fromModel(x))); } - item.blueprint.definition.sections.forEach(section => { + item?.blueprint?.definition?.sections?.forEach(section => { if (section.hasTemplates) { const isNew = (item.id == null); const sectionTemplatesFromPlan = item.planDescriptionTemplates?.filter(x => x.sectionId == section.id && x.isActive == IsActive.Active) || []; @@ -208,7 +208,7 @@ export class PlanPropertiesEditorModel implements PlanPropertiesPersist { fromModel(item: PlanProperties, planReferences: PlanReference[], planBlueprint: PlanBlueprint): PlanPropertiesEditorModel { - planBlueprint.definition.sections.forEach(section => { + planBlueprint?.definition?.sections?.forEach(section => { section.fields?.forEach(field => { if (field.category !== PlanBlueprintFieldCategory.System) { this.planBlueprintValues.set(field.id, new PlanBlueprintValueEditorModel(this.validationErrorModel).fromModel(