From 0d652dcb2739db424092d00134eca488f17bf856 Mon Sep 17 00:00:00 2001 From: mchouliara Date: Fri, 23 Aug 2024 17:07:40 +0300 Subject: [PATCH] add plan workflow model, fix wording + disabled form rules in plan status, description status --- .../plan-workflow/plan-workflow-persist.ts | 18 ++++++++ .../core/model/plan-workflow/plan-workflow.ts | 18 ++++++++ .../app/core/query/plan-workflow.lookup.ts | 21 +++++++++ .../description-status-editor.component.html | 26 +++++------ .../description-status-editor.component.ts | 2 +- .../description-status-listing.component.html | 6 +-- .../plan-status-editor.component.ts | 2 +- frontend/src/assets/i18n/baq.json | 40 +++++++++++++++++ frontend/src/assets/i18n/de.json | 40 +++++++++++++++++ frontend/src/assets/i18n/en.json | 44 ++++++++++++++++++- frontend/src/assets/i18n/es.json | 40 +++++++++++++++++ frontend/src/assets/i18n/gr.json | 40 +++++++++++++++++ frontend/src/assets/i18n/hr.json | 40 +++++++++++++++++ frontend/src/assets/i18n/pl.json | 40 +++++++++++++++++ frontend/src/assets/i18n/pt.json | 40 +++++++++++++++++ frontend/src/assets/i18n/sk.json | 40 +++++++++++++++++ frontend/src/assets/i18n/sr.json | 40 +++++++++++++++++ frontend/src/assets/i18n/tr.json | 40 +++++++++++++++++ 18 files changed, 517 insertions(+), 20 deletions(-) create mode 100644 frontend/src/app/core/model/plan-workflow/plan-workflow-persist.ts create mode 100644 frontend/src/app/core/model/plan-workflow/plan-workflow.ts create mode 100644 frontend/src/app/core/query/plan-workflow.lookup.ts diff --git a/frontend/src/app/core/model/plan-workflow/plan-workflow-persist.ts b/frontend/src/app/core/model/plan-workflow/plan-workflow-persist.ts new file mode 100644 index 000000000..c2cfe328e --- /dev/null +++ b/frontend/src/app/core/model/plan-workflow/plan-workflow-persist.ts @@ -0,0 +1,18 @@ +import { BaseEntityPersist } from "@common/base/base-entity.model"; +import { Guid } from "@common/types/guid"; + +export interface PlanWorkflowPersist extends BaseEntityPersist { + name: string; + description: string; + definition: PlanWorkflowDefinitionPersist; +} + +export interface PlanWorkflowDefinitionPersist { + startingStatusId: Guid; + statusTransitions: PlanWorkflowDefinitionTransitionPersist[]; +} + +export interface PlanWorkflowDefinitionTransitionPersist { + fromStatus: Guid; + toStatus: Guid; +} \ No newline at end of file diff --git a/frontend/src/app/core/model/plan-workflow/plan-workflow.ts b/frontend/src/app/core/model/plan-workflow/plan-workflow.ts new file mode 100644 index 000000000..3a6c9121d --- /dev/null +++ b/frontend/src/app/core/model/plan-workflow/plan-workflow.ts @@ -0,0 +1,18 @@ +import { BaseEntity } from "@common/base/base-entity.model"; +import { PlanStatus } from "../plan-status/plan-status"; + +export interface PlanWorkflow extends BaseEntity { + name: string; + description: string; + definition: PlanWorkflowDefinition; +} + +export interface PlanWorkflowDefinition { + startingStatus: PlanStatus; + statusTransitions: PlanWorkflowDefinitionTransition[]; +} + +export interface PlanWorkflowDefinitionTransition { + fromStatus: PlanStatus; + toStatus: PlanStatus; +} \ No newline at end of file diff --git a/frontend/src/app/core/query/plan-workflow.lookup.ts b/frontend/src/app/core/query/plan-workflow.lookup.ts new file mode 100644 index 000000000..32d579281 --- /dev/null +++ b/frontend/src/app/core/query/plan-workflow.lookup.ts @@ -0,0 +1,21 @@ +import { Lookup } from "@common/model/lookup"; +import { Guid } from "@common/types/guid"; +import { IsActive } from "../common/enum/is-active.enum"; + +export class PlanWorkflowLookup extends Lookup implements PlanWorkflowFilter{ + ids: Guid[]; + excludedIds: Guid[]; + like: string; + isActive: IsActive[]; + + constructor() { + super(); + } +} + +export interface PlanWorkflowFilter { + ids: Guid[]; + excludedIds: Guid[]; + like: string; + isActive: IsActive[]; +} \ No newline at end of file diff --git a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.html b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.html index aef400cf1..5d285eec8 100644 --- a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.html +++ b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.html @@ -6,18 +6,18 @@
- +
@@ -28,7 +28,7 @@
- {{'PLAN-STATUS-EDITOR.FIELDS.NAME' | translate}} + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.NAME' | translate}} {{formGroup.controls.name.getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} @@ -36,7 +36,7 @@
- {{'PLAN-STATUS-EDITOR.FIELDS.INTERNAL-STATUS' | translate}}* + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.INTERNAL-STATUS' | translate}}* {{enumUtils.toDescriptionStatusString(internalStatus)}} @@ -45,11 +45,11 @@
-

{{'PLAN-STATUS-EDITOR.FIELDS.DESCRIPTION' | translate}}

+

{{'DESCRIPTION-STATUS-EDITOR.FIELDS.DESCRIPTION' | translate}}

@@ -63,13 +63,13 @@

- {{'PLAN-STATUS-EDITOR.FIELDS.AUTHORIZATION' | translate}} + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.AUTHORIZATION' | translate}}

- {{'PLAN-STATUS-EDITOR.FIELDS.EDIT' | translate}} + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.EDIT' | translate}}
- {{'PLAN-STATUS-EDITOR.FIELDS.ROLES' | translate}}* + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.ROLES' | translate}}* {{enumUtils.toAppRoleString(userRole)}} @@ -79,7 +79,7 @@
- {{'PLAN-STATUS-EDITOR.FIELDS.PLAN-ROLES' | translate}}* + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.PLAN-ROLES' | translate}}* {{enumUtils.toPlanUserRoleString(planRole)}} @@ -89,11 +89,11 @@
- {{'PLAN-STATUS-EDITOR.FIELDS.ALLOW-AUTHENTICATED' | translate}} + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.ALLOW-AUTHENTICATED' | translate}} {{editAuthenticationForm.controls.allowAuthenticated.getError('backendError').message}}
- {{'PLAN-STATUS-EDITOR.FIELDS.ALLOW-ANONYMOUS' | translate}} + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.ALLOW-ANONYMOUS' | translate}} {{editAuthenticationForm.controls.allowAnonymous.getError('backendError').message}}
diff --git a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.ts b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.ts index ceb7f816e..1c045470d 100644 --- a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.ts +++ b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.component.ts @@ -96,7 +96,7 @@ export class DescriptionStatusEditorComponent extends BaseEditor
@@ -55,11 +55,11 @@
diff --git a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.ts b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.ts index d752c0e31..f999d7a0b 100644 --- a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.ts +++ b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.ts @@ -97,7 +97,7 @@ export class PlanStatusEditorComponent extends BaseEditor