diff --git a/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java b/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java index 290500fce..14aad3de9 100644 --- a/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java +++ b/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java @@ -29,6 +29,11 @@ public class DescriptionStatusEntity extends TenantScopedBaseEntity { private String description; public static final String _description = "description"; + @Column(name = "action", length = DescriptionStatusEntity._nameLength, nullable = true) + private String action; + public static final String _action = "action"; + public static final int _actionLength = 250; + @Column(name = "created_at", nullable = false) private Instant createdAt; public static final String _createdAt = "createdAt"; @@ -74,6 +79,14 @@ public class DescriptionStatusEntity extends TenantScopedBaseEntity { this.createdAt = createdAt; } + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + public Instant getUpdatedAt() { return this.updatedAt; } diff --git a/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java b/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java index 6837d381d..39e3529e2 100644 --- a/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java +++ b/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java @@ -29,6 +29,11 @@ public class PlanStatusEntity extends TenantScopedBaseEntity { private String description; public static final String _description = "description"; + @Column(name = "action", length = PlanStatusEntity._actionLength, nullable = true) + private String action; + public static final String _action = "action"; + public static final int _actionLength = 250; + @Column(name = "created_at", nullable = false) private Instant createdAt; public static final String _createdAt = "createdAt"; @@ -67,6 +72,14 @@ public class PlanStatusEntity extends TenantScopedBaseEntity { public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description;} + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + public Instant getCreatedAt() { return this.createdAt; } diff --git a/backend/core/src/main/java/org/opencdmp/model/builder/descriptionstatus/DescriptionStatusBuilder.java b/backend/core/src/main/java/org/opencdmp/model/builder/descriptionstatus/DescriptionStatusBuilder.java index fea2d62ed..cf01a84d1 100644 --- a/backend/core/src/main/java/org/opencdmp/model/builder/descriptionstatus/DescriptionStatusBuilder.java +++ b/backend/core/src/main/java/org/opencdmp/model/builder/descriptionstatus/DescriptionStatusBuilder.java @@ -56,6 +56,7 @@ public class DescriptionStatusBuilder extends BaseBuilder m.setIsActive(d.getIsActive()); if (fields.hasField(this.asIndexer(PlanStatus._description))) m.setDescription(d.getDescription()); + if (fields.hasField(this.asIndexer(PlanStatus._action))) + m.setAction(d.getAction()); if (fields.hasField(this.asIndexer(PlanStatus._internalStatus))) m.setInternalStatus(d.getInternalStatus()); if (fields.hasField(this.asIndexer(PlanStatus._hash))) diff --git a/backend/core/src/main/java/org/opencdmp/model/descriptionstatus/DescriptionStatus.java b/backend/core/src/main/java/org/opencdmp/model/descriptionstatus/DescriptionStatus.java index 3279b5a86..45c7094d8 100644 --- a/backend/core/src/main/java/org/opencdmp/model/descriptionstatus/DescriptionStatus.java +++ b/backend/core/src/main/java/org/opencdmp/model/descriptionstatus/DescriptionStatus.java @@ -16,6 +16,9 @@ public class DescriptionStatus { public final static String _description = "description"; private String description; + public static final String _action = "action"; + private String action; + public final static String _createdAt = "createdAt"; private Instant createdAt; @@ -46,6 +49,14 @@ public class DescriptionStatus { public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + public Instant getCreatedAt() { return this.createdAt; } public void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } diff --git a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionstatus/DescriptionStatusPersist.java b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionstatus/DescriptionStatusPersist.java index db27eb606..e7ac7deb0 100644 --- a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionstatus/DescriptionStatusPersist.java +++ b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionstatus/DescriptionStatusPersist.java @@ -27,6 +27,9 @@ public class DescriptionStatusPersist { private String description; public final static String _description = "description"; + private String action; + public static final String _action = "action"; + private org.opencdmp.commons.enums.DescriptionStatus internalStatus; public final static String _internalStatus = "internalStatus"; @@ -46,6 +49,14 @@ public class DescriptionStatusPersist { public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + public org.opencdmp.commons.enums.DescriptionStatus getInternalStatus() { return internalStatus; } public void setInternalStatus(org.opencdmp.commons.enums.DescriptionStatus internalStatus) { this.internalStatus = internalStatus; } @@ -93,6 +104,10 @@ public class DescriptionStatusPersist { .iff(() -> !this.isEmpty(item.getName())) .must(() -> this.lessEqualLength(item.getName(), DescriptionStatusEntity._nameLength)) .failOn(DescriptionStatusPersist._name).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{DescriptionStatusPersist._name}, LocaleContextHolder.getLocale())), + this.spec() + .iff(() -> !this.isEmpty(item.getAction())) + .must(() -> this.lessEqualLength(item.getAction(), DescriptionStatusEntity._actionLength)) + .failOn(DescriptionStatusPersist._action).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{DescriptionStatusPersist._action}, LocaleContextHolder.getLocale())), this.spec() .iff(() -> item.getInternalStatus() == org.opencdmp.commons.enums.DescriptionStatus.Finalized) .must(() -> !this.isNull(item.getDefinition())) diff --git a/backend/core/src/main/java/org/opencdmp/model/persist/planstatus/PlanStatusPersist.java b/backend/core/src/main/java/org/opencdmp/model/persist/planstatus/PlanStatusPersist.java index 65f6781f1..e20b8dea0 100644 --- a/backend/core/src/main/java/org/opencdmp/model/persist/planstatus/PlanStatusPersist.java +++ b/backend/core/src/main/java/org/opencdmp/model/persist/planstatus/PlanStatusPersist.java @@ -26,6 +26,9 @@ public class PlanStatusPersist { private String description; public static final String _description = "description"; + private String action; + public static final String _action = "action"; + private org.opencdmp.commons.enums.PlanStatus internalStatus; public static final String _internalStatus = "internalStatus"; @@ -53,6 +56,14 @@ public class PlanStatusPersist { public void setDescription(String description) { this.description = description; } + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + public org.opencdmp.commons.enums.PlanStatus getInternalStatus() { return this.internalStatus; } public void setInternalStatus(org.opencdmp.commons.enums.PlanStatus internalStatus) { this.internalStatus = internalStatus; } @@ -105,6 +116,10 @@ public class PlanStatusPersist { .iff(() -> !this.isEmpty(item.getName())) .must(() -> this.lessEqualLength(item.getName(), PlanStatusEntity._nameLength)) .failOn(org.opencdmp.model.persist.planstatus.PlanStatusPersist._name).failWith(this.messageSource.getMessage("Validation_MaxLength", new Object[]{org.opencdmp.model.persist.planstatus.PlanStatusPersist._name}, LocaleContextHolder.getLocale())), + this.spec() + .iff(() -> !this.isEmpty(item.getAction())) + .must(() -> this.lessEqualLength(item.getAction(), PlanStatusEntity._actionLength)) + .failOn(PlanStatusPersist._action).failWith(this.messageSource.getMessage("Validation_MaxLength", new Object[]{org.opencdmp.model.persist.planstatus.PlanStatusPersist._action}, LocaleContextHolder.getLocale())), this.spec() .iff(() -> item.getInternalStatus() == org.opencdmp.commons.enums.PlanStatus.Finalized) .must(() -> !this.isNull(item.getDefinition())) diff --git a/backend/core/src/main/java/org/opencdmp/model/planstatus/PlanStatus.java b/backend/core/src/main/java/org/opencdmp/model/planstatus/PlanStatus.java index b5be3d177..606fd2613 100644 --- a/backend/core/src/main/java/org/opencdmp/model/planstatus/PlanStatus.java +++ b/backend/core/src/main/java/org/opencdmp/model/planstatus/PlanStatus.java @@ -16,6 +16,9 @@ public class PlanStatus { public final static String _description = "description"; private String description; + public static final String _action = "action"; + private String action; + public final static String _createdAt = "createdAt"; private Instant createdAt; @@ -61,6 +64,14 @@ public class PlanStatus { public void setDescription(String description) { this.description = description; } + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + public PlanStatusDefinition getDefinition() { return this.definition; } diff --git a/backend/core/src/main/java/org/opencdmp/query/DescriptionStatusQuery.java b/backend/core/src/main/java/org/opencdmp/query/DescriptionStatusQuery.java index 7f0e42822..eb9bae2c3 100644 --- a/backend/core/src/main/java/org/opencdmp/query/DescriptionStatusQuery.java +++ b/backend/core/src/main/java/org/opencdmp/query/DescriptionStatusQuery.java @@ -188,6 +188,8 @@ public class DescriptionStatusQuery extends QueryBase { return DescriptionStatusEntity._name; else if (item.match(DescriptionStatus._description)) return DescriptionStatusEntity._description; + else if (item.match(DescriptionStatus._action)) + return DescriptionStatusEntity._action; else if (item.match(DescriptionStatus._createdAt)) return DescriptionStatusEntity._createdAt; else if (item.match(DescriptionStatus._updatedAt)) @@ -210,6 +212,7 @@ public class DescriptionStatusQuery extends QueryBase { item.setId(QueryBase.convertSafe(tuple, columns, DescriptionStatusEntity._id, UUID.class)); item.setName(QueryBase.convertSafe(tuple, columns, DescriptionStatusEntity._name, String.class)); item.setDescription(QueryBase.convertSafe(tuple, columns, DescriptionStatusEntity._description, String.class)); + item.setAction(QueryBase.convertSafe(tuple, columns, DescriptionStatusEntity._action, String.class)); item.setTenantId(QueryBase.convertSafe(tuple, columns, DescriptionStatusEntity._tenantId, UUID.class)); item.setCreatedAt(QueryBase.convertSafe(tuple, columns, DescriptionStatusEntity._createdAt, Instant.class)); item.setUpdatedAt(QueryBase.convertSafe(tuple, columns, DescriptionStatusEntity._updatedAt, Instant.class)); diff --git a/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java b/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java index 46daf0ea5..503757bfa 100644 --- a/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java +++ b/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java @@ -187,6 +187,8 @@ public class PlanStatusQuery extends QueryBase { return PlanStatusEntity._description; else if (item.match(PlanStatus._name)) return PlanStatusEntity._name; + else if (item.match(PlanStatus._action)) + return PlanStatusEntity._action; else if (item.match(PlanStatus._internalStatus)) return PlanStatusEntity._internalStatus; else if (item.prefix(PlanStatus._definition)) @@ -211,6 +213,7 @@ public class PlanStatusQuery extends QueryBase { item.setDescription(QueryBase.convertSafe(tuple, columns, PlanStatusEntity._description, String.class)); item.setDefinition(QueryBase.convertSafe(tuple, columns, PlanStatusEntity._definition, String.class)); item.setName(QueryBase.convertSafe(tuple, columns, PlanStatusEntity._name, String.class)); + item.setAction(QueryBase.convertSafe(tuple, columns, PlanStatusEntity._action, String.class)); item.setInternalStatus(QueryBase.convertSafe(tuple, columns, PlanStatusEntity._internalStatus, org.opencdmp.commons.enums.PlanStatus.class)); item.setCreatedAt(QueryBase.convertSafe(tuple, columns, PlanStatusEntity._createdAt, Instant.class)); item.setUpdatedAt(QueryBase.convertSafe(tuple, columns, PlanStatusEntity._updatedAt, Instant.class)); diff --git a/backend/core/src/main/java/org/opencdmp/service/descriptionstatus/DescriptionStatusServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/descriptionstatus/DescriptionStatusServiceImpl.java index 98180a847..cc8804647 100644 --- a/backend/core/src/main/java/org/opencdmp/service/descriptionstatus/DescriptionStatusServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/descriptionstatus/DescriptionStatusServiceImpl.java @@ -100,6 +100,7 @@ public class DescriptionStatusServiceImpl implements DescriptionStatusService { data.setName(model.getName()); data.setDescription(model.getDescription()); + data.setAction(model.getAction()); data.setInternalStatus(model.getInternalStatus()); data.setDefinition(this.xmlHandlingService.toXml(this.buildDescriptionStatusDefinitionEntity(model.getDefinition()))); data.setUpdatedAt(Instant.now()); @@ -165,7 +166,7 @@ public class DescriptionStatusServiceImpl implements DescriptionStatusService { List availableTransitions = definition.getStatusTransitions().stream().filter(x -> x.getFromStatusId().equals(description.getStatusId())).collect(Collectors.toList()); if (!this.conventionService.isListNullOrEmpty(availableTransitions)){ DescriptionStatusQuery query = this.queryFactory.query(DescriptionStatusQuery.class).authorize(AuthorizationFlags.AllExceptPublic).isActive(IsActive.Active).ids(availableTransitions.stream().map(DescriptionWorkflowDefinitionTransitionEntity::getToStatusId).distinct().toList()); - FieldSet fieldSet = new BaseFieldSet().ensure(DescriptionStatus._id).ensure(DescriptionStatus._name).ensure(DescriptionStatus._internalStatus); + FieldSet fieldSet = new BaseFieldSet().ensure(DescriptionStatus._id).ensure(DescriptionStatus._name).ensure(DescriptionStatus._action).ensure(DescriptionStatus._internalStatus); return this.builderFactory.builder(DescriptionStatusBuilder.class).authorize(AuthorizationFlags.AllExceptPublic).build(fieldSet, query.collectAs(fieldSet)); } diff --git a/backend/core/src/main/java/org/opencdmp/service/planstatus/PlanStatusServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/planstatus/PlanStatusServiceImpl.java index f4dce1f98..d9bdb9e5f 100644 --- a/backend/core/src/main/java/org/opencdmp/service/planstatus/PlanStatusServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/planstatus/PlanStatusServiceImpl.java @@ -31,7 +31,6 @@ import org.opencdmp.errorcode.ErrorThesaurusProperties; import org.opencdmp.event.EventBroker; import org.opencdmp.model.builder.planstatus.PlanStatusBuilder; import org.opencdmp.model.deleter.PlanStatusDeleter; -import org.opencdmp.model.descriptionstatus.DescriptionStatus; import org.opencdmp.model.persist.planstatus.PlanStatusDefinitionAuthorizationItemPersist; import org.opencdmp.model.persist.planstatus.PlanStatusDefinitionAuthorizationPersist; import org.opencdmp.model.persist.planstatus.PlanStatusDefinitionPersist; @@ -104,6 +103,7 @@ public class PlanStatusServiceImpl implements PlanStatusService { data.setName(model.getName()); data.setDescription(model.getDescription()); + data.setAction(model.getAction()); data.setInternalStatus(model.getInternalStatus()); data.setDefinition(this.xmlHandlingService.toXml(this.buildPlanStatusDefinitionEntity(model.getDefinition()))); data.setUpdatedAt(Instant.now()); @@ -175,7 +175,7 @@ public class PlanStatusServiceImpl implements PlanStatusService { List availableTransitions = definition.getStatusTransitions().stream().filter(x -> x.getFromStatusId().equals(plan.getStatusId())).collect(Collectors.toList()); if (!this.conventionService.isListNullOrEmpty(availableTransitions)){ PlanStatusQuery query = this.queryFactory.query(PlanStatusQuery.class).authorize(AuthorizationFlags.AllExceptPublic).isActives(IsActive.Active).ids(availableTransitions.stream().map(PlanWorkflowDefinitionTransitionEntity::getToStatusId).distinct().toList()); - FieldSet fieldSet = new BaseFieldSet().ensure(DescriptionStatus._id).ensure(DescriptionStatus._name).ensure(DescriptionStatus._internalStatus); + FieldSet fieldSet = new BaseFieldSet().ensure(PlanStatus._id).ensure(PlanStatus._name).ensure(PlanStatus._action).ensure(PlanStatus._internalStatus); return this.builderFactory.builder(PlanStatusBuilder.class).authorize(AuthorizationFlags.AllExceptPublic).build(fieldSet, query.collectAs(fieldSet)); } diff --git a/frontend/src/app/core/model/description-status/description-status-persist.ts b/frontend/src/app/core/model/description-status/description-status-persist.ts index 10600041a..c04a65154 100644 --- a/frontend/src/app/core/model/description-status/description-status-persist.ts +++ b/frontend/src/app/core/model/description-status/description-status-persist.ts @@ -5,6 +5,7 @@ import { DescriptionStatusDefinition } from "./description-status"; export interface DescriptionStatusPersist extends BaseEntityPersist { name: string; description: string; + action: string; internalStatus: DescriptionStatusEnum; definition: DescriptionStatusDefinition; } \ No newline at end of file diff --git a/frontend/src/app/core/model/description-status/description-status.ts b/frontend/src/app/core/model/description-status/description-status.ts index 72dcdd733..2c93bddb9 100644 --- a/frontend/src/app/core/model/description-status/description-status.ts +++ b/frontend/src/app/core/model/description-status/description-status.ts @@ -7,6 +7,7 @@ import { BaseEntity } from "@common/base/base-entity.model"; export interface DescriptionStatus extends BaseEntity{ name: string; description: string; + action: string; internalStatus: DescriptionStatusEnum; definition: DescriptionStatusDefinition; } diff --git a/frontend/src/app/core/model/plan-status/plan-status-persist.ts b/frontend/src/app/core/model/plan-status/plan-status-persist.ts index 03ca3beb9..166a445a3 100644 --- a/frontend/src/app/core/model/plan-status/plan-status-persist.ts +++ b/frontend/src/app/core/model/plan-status/plan-status-persist.ts @@ -5,6 +5,7 @@ import { PlanStatusDefinition } from "./plan-status"; export interface PlanStatusPersist extends BaseEntityPersist { name: string; description: string; + action: string; internalStatus: PlanStatusEnum; definition: PlanStatusDefinition; } \ No newline at end of file diff --git a/frontend/src/app/core/model/plan-status/plan-status.ts b/frontend/src/app/core/model/plan-status/plan-status.ts index cf29f9b00..1bee49e28 100644 --- a/frontend/src/app/core/model/plan-status/plan-status.ts +++ b/frontend/src/app/core/model/plan-status/plan-status.ts @@ -7,6 +7,7 @@ import { BaseEntity } from "@common/base/base-entity.model"; export interface PlanStatus extends BaseEntity{ name: string; description: string; + action: string; internalStatus: PlanStatusEnum; definition: PlanStatusDefinition; } 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 5d78c660e..bb61d6afb 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 @@ -44,6 +44,14 @@ {{formGroup.controls.internalStatus.getError('backendError').message}} +
+ + {{'DESCRIPTION-STATUS-EDITOR.FIELDS.ACTION' | translate}} + + {{formGroup.controls.action.getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +

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

diff --git a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.model.ts b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.model.ts index 7b7600b8a..54975ddd8 100644 --- a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.model.ts +++ b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.model.ts @@ -13,6 +13,7 @@ import { Guid } from "@common/types/guid"; export class DescriptionStatusEditorModel extends BaseEditorModel implements DescriptionStatusPersist { name: string; description: string; + action: string; internalStatus: DescriptionStatusEnum; definition: DescriptionStatusDefinition; @@ -21,6 +22,7 @@ export class DescriptionStatusEditorModel extends BaseEditorModel implements Des super.fromModel(item); this.name = item?.name; this.description = item?.description; + this.action = item?.action this.internalStatus = item?.internalStatus; this.definition = item?.definition; } @@ -34,6 +36,7 @@ export class DescriptionStatusEditorModel extends BaseEditorModel implements Des id: [{ value: this.id, disabled }, context.getValidation('id').validators], name: [{value: this.name, disabled}, context.getValidation('name').validators], description: [{value: this.description, disabled}, context.getValidation('description').validators], + action: [{value: this.action, disabled}, context.getValidation('action').validators], internalStatus: [{value: this.internalStatus, disabled}, context.getValidation('internalStatus').validators], hash: [{ value: this.hash, disabled: disabled }, context.getValidation('hash').validators], definition: this.buildDefinitionForm({context, disabled}), @@ -70,6 +73,7 @@ export class DescriptionStatusEditorModel extends BaseEditorModel implements Des baseValidationArray.push({ key: 'id', validators: [BackendErrorValidator(this.validationErrorModel, 'id')] }); baseValidationArray.push({ key: 'name', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'name')] }); baseValidationArray.push({ key: 'description', validators: [BackendErrorValidator(this.validationErrorModel, 'description')] }); + baseValidationArray.push({ key: 'action', validators: [BackendErrorValidator(this.validationErrorModel, 'action')] }); baseValidationArray.push({ key: 'internalStatus', validators: [BackendErrorValidator(this.validationErrorModel, 'internalStatus')] }); baseValidationArray.push({ key: 'hash', validators: [] }); baseValidationArray.push({ key: 'definition', validators: [BackendErrorValidator(this.validationErrorModel, 'definition')] }); diff --git a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.resolver.ts b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.resolver.ts index e86e04d64..4e6b2db41 100644 --- a/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.resolver.ts +++ b/frontend/src/app/ui/admin/description-status/editor/description-status-editor/description-status-editor.resolver.ts @@ -20,6 +20,7 @@ export class DescriptionStatusEditorResolver extends BaseEditorResolver{ nameof(x => x.id), nameof(x => x.name), nameof(x => x.description), + nameof(x => x.action), nameof(x => x.internalStatus), nameof(x => x.definition), [nameof(x => x.definition), nameof(x => x.authorization)].join('.'), diff --git a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor.resolver.ts b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor.resolver.ts index 94c2d91ec..3397b4910 100644 --- a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor.resolver.ts +++ b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor.resolver.ts @@ -20,6 +20,7 @@ export class PlanStatusEditorResolver extends BaseEditorResolver{ nameof(x => x.id), nameof(x => x.name), nameof(x => x.description), + nameof(x => x.action), nameof(x => x.internalStatus), nameof(x => x.definition), [nameof(x => x.definition), nameof(x => x.authorization)].join('.'), diff --git a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.html b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.html index f1ac7f599..ed16242e9 100644 --- a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.html +++ b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.component.html @@ -44,6 +44,14 @@ {{formGroup.controls.internalStatus.getError('backendError').message}}
+
+ + {{'PLAN-STATUS-EDITOR.FIELDS.ACTION' | translate}} + + {{formGroup.controls.action.getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +

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

diff --git a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.model.ts b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.model.ts index ab599d3a9..05e86971b 100644 --- a/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.model.ts +++ b/frontend/src/app/ui/admin/plan-status/editor/plan-status-editor/plan-status-editor.model.ts @@ -14,6 +14,7 @@ import { Guid } from "@common/types/guid"; export class PlanStatusEditorModel extends BaseEditorModel implements PlanStatusPersist { name: string; description: string; + action: string; internalStatus: PlanStatusEnum; definition: PlanStatusDefinition; @@ -22,6 +23,7 @@ export class PlanStatusEditorModel extends BaseEditorModel implements PlanStatus super.fromModel(item); this.name = item?.name; this.description = item?.description; + this.action = item?.action; this.internalStatus = item?.internalStatus; this.definition = item?.definition; } @@ -35,6 +37,7 @@ export class PlanStatusEditorModel extends BaseEditorModel implements PlanStatus id: [{ value: this.id, disabled }, context.getValidation('id').validators], name: [{value: this.name, disabled}, context.getValidation('name').validators], description: [{value: this.description, disabled}, context.getValidation('description').validators], + action: [{value: this.action, disabled}, context.getValidation('action').validators], internalStatus: [{value: this.internalStatus, disabled}, context.getValidation('internalStatus').validators], hash: [{ value: this.hash, disabled: disabled }, context.getValidation('hash').validators], definition: this.buildDefinitionForm({context, disabled}), @@ -71,6 +74,7 @@ export class PlanStatusEditorModel extends BaseEditorModel implements PlanStatus baseValidationArray.push({ key: 'id', validators: [BackendErrorValidator(this.validationErrorModel, 'id')] }); baseValidationArray.push({ key: 'name', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'name')] }); baseValidationArray.push({ key: 'description', validators: [BackendErrorValidator(this.validationErrorModel, 'description')] }); + baseValidationArray.push({ key: 'action', validators: [BackendErrorValidator(this.validationErrorModel, 'action')] }); baseValidationArray.push({ key: 'internalStatus', validators: [BackendErrorValidator(this.validationErrorModel, 'internalStatus')] }); baseValidationArray.push({ key: 'hash', validators: [] }); baseValidationArray.push({ key: 'definition', validators: [BackendErrorValidator(this.validationErrorModel, 'definition')] }); diff --git a/frontend/src/app/ui/description/editor/description-editor.component.html b/frontend/src/app/ui/description/editor/description-editor.component.html index 36eb1c76d..3236cc668 100644 --- a/frontend/src/app/ui/description/editor/description-editor.component.html +++ b/frontend/src/app/ui/description/editor/description-editor.component.html @@ -68,7 +68,7 @@ - +
diff --git a/frontend/src/app/ui/description/overview/description-overview.component.html b/frontend/src/app/ui/description/overview/description-overview.component.html index 49d3fea4c..50f552ae6 100644 --- a/frontend/src/app/ui/description/overview/description-overview.component.html +++ b/frontend/src/app/ui/description/overview/description-overview.component.html @@ -146,7 +146,7 @@
-

{{ status.name }}

+

{{ status.action?.length > 0 ? status.action : status.name }}

diff --git a/frontend/src/app/ui/plan/overview/plan-overview.component.html b/frontend/src/app/ui/plan/overview/plan-overview.component.html index a99dba19e..74170457c 100644 --- a/frontend/src/app/ui/plan/overview/plan-overview.component.html +++ b/frontend/src/app/ui/plan/overview/plan-overview.component.html @@ -193,7 +193,7 @@
-

{{ status.name }}

+

{{ status.action?.length > 0 ? status.action : status.name }}

diff --git a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html index 763495708..f7dd906ab 100644 --- a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html +++ b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html @@ -53,7 +53,7 @@
- +
diff --git a/frontend/src/assets/i18n/baq.json b/frontend/src/assets/i18n/baq.json index 89761b5c7..649acdd9e 100644 --- a/frontend/src/assets/i18n/baq.json +++ b/frontend/src/assets/i18n/baq.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/de.json b/frontend/src/assets/i18n/de.json index ba43e596c..7ad641499 100644 --- a/frontend/src/assets/i18n/de.json +++ b/frontend/src/assets/i18n/de.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/en.json b/frontend/src/assets/i18n/en.json index 85d18b7f0..9677d6d2b 100644 --- a/frontend/src/assets/i18n/en.json +++ b/frontend/src/assets/i18n/en.json @@ -908,6 +908,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -960,6 +961,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/es.json b/frontend/src/assets/i18n/es.json index 513b16f36..f91ee3045 100644 --- a/frontend/src/assets/i18n/es.json +++ b/frontend/src/assets/i18n/es.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/gr.json b/frontend/src/assets/i18n/gr.json index dc676f477..72a5f3d56 100644 --- a/frontend/src/assets/i18n/gr.json +++ b/frontend/src/assets/i18n/gr.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/hr.json b/frontend/src/assets/i18n/hr.json index d5bfde899..92d59b0a6 100644 --- a/frontend/src/assets/i18n/hr.json +++ b/frontend/src/assets/i18n/hr.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/pl.json b/frontend/src/assets/i18n/pl.json index 6028c5c9b..47168c8b3 100644 --- a/frontend/src/assets/i18n/pl.json +++ b/frontend/src/assets/i18n/pl.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/pt.json b/frontend/src/assets/i18n/pt.json index 717b5176a..517ea2d0d 100644 --- a/frontend/src/assets/i18n/pt.json +++ b/frontend/src/assets/i18n/pt.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/sk.json b/frontend/src/assets/i18n/sk.json index f461753f5..8b3f76541 100644 --- a/frontend/src/assets/i18n/sk.json +++ b/frontend/src/assets/i18n/sk.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/sr.json b/frontend/src/assets/i18n/sr.json index 7d615e167..e8a4345fb 100644 --- a/frontend/src/assets/i18n/sr.json +++ b/frontend/src/assets/i18n/sr.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", diff --git a/frontend/src/assets/i18n/tr.json b/frontend/src/assets/i18n/tr.json index 88a9bb0ff..babff7c4a 100644 --- a/frontend/src/assets/i18n/tr.json +++ b/frontend/src/assets/i18n/tr.json @@ -910,6 +910,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization", @@ -953,6 +954,7 @@ "FIELDS": { "NAME": "Name", "DESCRIPTION": "Description", + "ACTION": "Action", "DEFINITION": "Definition", "INTERNAL-STATUS": "Internal Status", "AUTHORIZATION": "Authorization",