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 242c00288..42dffad37 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 @@ -3,7 +3,7 @@
- +
- {{fieldIndex + 1}} - drag_indicator + {{fieldIndex + 1}} + drag_indicator
- +
{{'PLAN-BLUEPRINT-EDITOR.FIELDS.CATEGORY' | translate}} @@ -114,101 +114,97 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
- @switch(field.get('category').value){ - @case(planBlueprintSectionFieldCategory.System){ -
- - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.SYSTEM-FIELD-TYPE' | translate}} - - {{enumUtils.toPlanBlueprintSystemFieldTypeString(systemFieldType)}} - - {{field.get('systemFieldType').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
- } - @case(planBlueprintSectionFieldCategory.Extra){ -
- - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.DATA-TYPE' | translate}} - - - {{enumUtils.toPlanBlueprintExtraFieldDataTypeString(extraFieldDataType)}} - - - {{field.get('dataType').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
- } - @case(planBlueprintSectionFieldCategory.ReferenceType){ -
- - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.REFERENCE-TYPE' | translate}} - - {{field.get('referenceTypeId').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
- } - } - @if(field.get('category').value != null){ -
- - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-LABEL' | translate}} - - {{field.get('label').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-PLACEHOLDER' | translate}} - - {{field.get('placeholder').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-DESCRIPTION' | translate}} - - {{field.get('description').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.SEMANTICS' | translate}} - - - {{field.get('semantics').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - -
-
- @if (isMandatorySystemField(field?.value)) { - - } - @else { - {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-REQUIRED' | translate}} - } - {{field.get('required').getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} -
- } + @switch(field.get('category').value){ + @case(planBlueprintSectionFieldCategory.System){ +
+ + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.SYSTEM-FIELD-TYPE' | translate}} + + {{enumUtils.toPlanBlueprintSystemFieldTypeString(systemFieldType)}} + + {{field.get('systemFieldType').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+ } + @case(planBlueprintSectionFieldCategory.Extra){ +
+ + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.DATA-TYPE' | translate}} + + + {{enumUtils.toPlanBlueprintExtraFieldDataTypeString(extraFieldDataType)}} + + + {{field.get('dataType').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+ } + @case(planBlueprintSectionFieldCategory.ReferenceType){ +
+ + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.REFERENCE-TYPE' | translate}} + + {{field.get('referenceTypeId').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+ } + } + @if(field.get('category').value != null){ +
+ + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-LABEL' | translate}} + + {{field.get('label').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-PLACEHOLDER' | translate}} + + {{field.get('placeholder').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-DESCRIPTION' | translate}} + + {{field.get('description').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.SEMANTICS' | translate}} + + + {{field.get('semantics').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
+
+ @if (isMandatorySystemField(field?.value)) { + + } + @else { + {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-REQUIRED' | translate}} + } + {{field.get('required').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} +
+ }
- @if(field.get('category').value === planBlueprintSectionFieldCategory.ReferenceType){ -
- {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-MULTIPLE-SELECT' | translate}} - {{field.get('multipleSelect')?.getError('backendError').message}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} -
- } + @if(field.get('category').value === planBlueprintSectionFieldCategory.ReferenceType){ +
+ {{'PLAN-BLUEPRINT-EDITOR.FIELDS.FIELD-MULTIPLE-SELECT' | translate}} + {{field.get('multipleSelect')?.getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} +
+ }
@@ -263,8 +259,8 @@
- {{descriptionTemplateIndex + 1}} - drag_indicator + {{descriptionTemplateIndex + 1}} + drag_indicator
@@ -364,5 +360,4 @@
- - + \ No newline at end of file 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 4cafa9fde..46776e27e 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 @@ -70,27 +70,27 @@ export class PlanBlueprintEditorComponent extends BaseEditor = new Map; public descriptionTemplateGroupIdsConfigBySection: Map = new Map; - PlanBlueprintStatus = PlanBlueprintStatus; + PlanBlueprintStatus = PlanBlueprintStatus; isNew = true; isClone = false; isNewVersion = false; isDeleted = false; - belongsToCurrentTenant = true; + belongsToCurrentTenant = true; - protected get isTransient(): boolean { - return this.isNew || this.isClone || this.isNewVersion; - } + protected get isTransient(): boolean { + return this.isNew || this.isClone || this.isNewVersion; + } - protected get hideEditActions(): boolean { - return (this.isDeleted || this.isFinalized || !this.authService.hasPermission(AppPermission.EditPlanBlueprint) || !this.belongsToCurrentTenant) && !this.isNewVersion; - } + protected get hideEditActions(): boolean { + return (this.isDeleted || this.isFinalized || !this.authService.hasPermission(AppPermission.EditPlanBlueprint) || !this.belongsToCurrentTenant) && !this.isNewVersion; + } - protected get canDownloadXML(): boolean { - return (this.formGroup.get('status').value === PlanBlueprintStatus.Finalized) && !this.isTransient; - } + protected get canDownloadXML(): boolean { + return (this.formGroup.get('status').value === PlanBlueprintStatus.Finalized) && !this.isTransient; + } protected get canDelete(): boolean { - return !this.isDeleted && !this.isTransient && this.belongsToCurrentTenant && this.hasPermission(this.authService.permissionEnum.DeletePlanBlueprint); + return !this.isDeleted && !this.isTransient && this.belongsToCurrentTenant && this.hasPermission(this.authService.permissionEnum.DeletePlanBlueprint); } protected get canFinalize(): boolean { @@ -175,14 +175,14 @@ export class PlanBlueprintEditorComponent extends BaseEditor successFunction(data), error: (error) => this.onCallbackError(error) - }); + }); } prepareForm(data: PlanBlueprint) { try { this.editorModel = data ? new PlanBlueprintEditorModel().fromModel(data) : new PlanBlueprintEditorModel(); this.isDeleted = data ? data.isActive === IsActive.Inactive : false; - this.belongsToCurrentTenant = this.isNew || data.belongsToCurrentTenant; + this.belongsToCurrentTenant = this.isNew || data.belongsToCurrentTenant; this.buildForm(); @@ -235,7 +235,7 @@ export class PlanBlueprintEditorComponent extends BaseEditor onSuccess ? onSuccess(complete) : this.onCallbackSuccess(complete), error: (error) => this.onCallbackError(error) - }); + }); } } @@ -410,8 +410,8 @@ export class PlanBlueprintEditorComponent extends BaseEditor { - if (section.get('id').value === sectionId){ - if (this.usedDescriptionTemplateGroupIdsBySection.get(sectionId)){ + if (section.get('id').value === sectionId) { + if (this.usedDescriptionTemplateGroupIdsBySection.get(sectionId)) { excludedGroupIds = this.usedDescriptionTemplateGroupIdsBySection.get(sectionId); } else { this.usedDescriptionTemplateGroupIdsBySection.set(sectionId, excludedGroupIds); @@ -494,7 +494,7 @@ export class PlanBlueprintEditorComponent extends BaseEditor -1) { groupIds.splice(index, 1); @@ -513,7 +513,7 @@ export class PlanBlueprintEditorComponent extends BaseEditor