diff --git a/backend/core/src/main/java/org/opencdmp/commons/enums/annotation/AnnotationEntityType.java b/backend/core/src/main/java/org/opencdmp/commons/enums/annotation/AnnotationEntityType.java new file mode 100644 index 000000000..95acf8a6a --- /dev/null +++ b/backend/core/src/main/java/org/opencdmp/commons/enums/annotation/AnnotationEntityType.java @@ -0,0 +1,33 @@ +package org.opencdmp.commons.enums.annotation; + +import com.fasterxml.jackson.annotation.JsonValue; +import org.opencdmp.commons.enums.EnumUtils; +import org.opencdmp.data.converters.enums.DatabaseEnum; + +import java.util.Map; + +public enum AnnotationEntityType implements DatabaseEnum { + Description(EntityType.description), + Plan(EntityType.plan); + private final String value; + + public static class EntityType { + public static final String description = "description"; + public static final String plan = "plan"; + } + + AnnotationEntityType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + private static final Map map = EnumUtils.getEnumValueMap(AnnotationEntityType.class); + + public static AnnotationEntityType of(String i) { + return map.get(i); + } +} diff --git a/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java b/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java index b4a088daa..8df77a337 100644 --- a/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java +++ b/backend/core/src/main/java/org/opencdmp/commons/notification/NotificationProperties.java @@ -11,11 +11,13 @@ public class NotificationProperties { private UUID planInvitationExistingUserType; private UUID planModifiedType; private UUID planFinalisedType; + private UUID planAnnotationCreatedType; + private UUID planAnnotationStatusChangedType; private UUID descriptionCreatedType; private UUID descriptionModifiedType; private UUID descriptionFinalisedType; - private UUID descriptionAnnotationCreated; - private UUID descriptionAnnotationStatusChanged; + private UUID descriptionAnnotationCreatedType; + private UUID descriptionAnnotationStatusChangedType; private UUID mergeAccountConfirmationType; private UUID removeCredentialConfirmationType; private UUID planDepositType; @@ -59,6 +61,22 @@ public class NotificationProperties { this.planFinalisedType = planFinalisedType; } + public UUID getPlanAnnotationCreatedType() { + return planAnnotationCreatedType; + } + + public void setPlanAnnotationCreatedType(UUID planAnnotationCreatedType) { + this.planAnnotationCreatedType = planAnnotationCreatedType; + } + + public UUID getPlanAnnotationStatusChangedType() { + return planAnnotationStatusChangedType; + } + + public void setPlanAnnotationStatusChangedType(UUID planAnnotationStatusChangedType) { + this.planAnnotationStatusChangedType = planAnnotationStatusChangedType; + } + public UUID getDescriptionCreatedType() { return descriptionCreatedType; } @@ -147,20 +165,20 @@ public class NotificationProperties { this.contactSupportEmail = contactSupportEmail; } - public UUID getDescriptionAnnotationCreated() { - return descriptionAnnotationCreated; + public UUID getDescriptionAnnotationCreatedType() { + return descriptionAnnotationCreatedType; } - public void setDescriptionAnnotationCreated(UUID descriptionAnnotationCreated) { - this.descriptionAnnotationCreated = descriptionAnnotationCreated; + public void setDescriptionAnnotationCreatedType(UUID descriptionAnnotationCreatedType) { + this.descriptionAnnotationCreatedType = descriptionAnnotationCreatedType; } - public UUID getDescriptionAnnotationStatusChanged() { - return descriptionAnnotationStatusChanged; + public UUID getDescriptionAnnotationStatusChangedType() { + return descriptionAnnotationStatusChangedType; } - public void setDescriptionAnnotationStatusChanged(UUID descriptionAnnotationStatusChanged) { - this.descriptionAnnotationStatusChanged = descriptionAnnotationStatusChanged; + public void setDescriptionAnnotationStatusChangedType(UUID descriptionAnnotationStatusChangedType) { + this.descriptionAnnotationStatusChangedType = descriptionAnnotationStatusChangedType; } public UUID getTenantSpecificInvitationExternalUserType() { diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEvent.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEvent.java index d90ac5bc9..6299c2801 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEvent.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEvent.java @@ -2,6 +2,7 @@ package org.opencdmp.integrationevent.inbox.annotationentitycreated; import gr.cite.tools.validation.ValidatorFactory; import gr.cite.tools.validation.specification.Specification; +import org.opencdmp.commons.enums.annotation.AnnotationEntityType; import org.opencdmp.commons.enums.annotation.AnnotationProtectionType; import org.opencdmp.commons.validation.BaseValidator; import org.opencdmp.convention.ConventionService; @@ -25,7 +26,7 @@ public class AnnotationEntityCreatedIntegrationEvent extends TrackedEvent { private UUID entityId; public static final String _entityId = "entityId"; - private String entityType; + private AnnotationEntityType entityType; public static final String _entityType = "entityType"; private String anchor; @@ -65,11 +66,11 @@ public class AnnotationEntityCreatedIntegrationEvent extends TrackedEvent { this.entityId = entityId; } - public String getEntityType() { + public AnnotationEntityType getEntityType() { return entityType; } - public void setEntityType(String entityType) { + public void setEntityType(AnnotationEntityType entityType) { this.entityType = entityType; } @@ -167,11 +168,14 @@ public class AnnotationEntityCreatedIntegrationEvent extends TrackedEvent { .must(() -> this.isValidGuid(item.getEntityId())) .failOn(AnnotationEntityCreatedIntegrationEvent._entityId).failWith(messageSource.getMessage("validation.invalidid", new Object[]{AnnotationEntityCreatedIntegrationEvent._entityId}, LocaleContextHolder.getLocale())), this.spec() - .must(() -> !this.isEmpty(item.getEntityType())) + .must(() -> !this.isNull(item.getEntityType())) .failOn(AnnotationEntityCreatedIntegrationEvent._entityType).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationEntityCreatedIntegrationEvent._entityType}, LocaleContextHolder.getLocale())), this.spec() .must(() -> !this.isEmpty(item.getPayload())) .failOn(AnnotationEntityCreatedIntegrationEvent._payload).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationEntityCreatedIntegrationEvent._payload}, LocaleContextHolder.getLocale())), + this.spec() + .must(() -> !this.isEmpty(item.getAnchor())) + .failOn(AnnotationEntityCreatedIntegrationEvent._anchor).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationEntityCreatedIntegrationEvent._anchor}, LocaleContextHolder.getLocale())), this.spec() .iff(() -> !this.isNull(item.getThreadId())) .must(() -> this.isValidGuid(item.getThreadId())) diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEventHandlerImpl.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEventHandlerImpl.java index 13efa7788..fa6b67ea5 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEventHandlerImpl.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationentitycreated/AnnotationEntityCreatedIntegrationEventHandlerImpl.java @@ -13,6 +13,7 @@ import gr.cite.tools.validation.ValidatorFactory; import org.opencdmp.audit.AuditableAction; import org.opencdmp.commons.JsonHandlingService; import org.opencdmp.commons.enums.IsActive; +import org.opencdmp.commons.enums.annotation.AnnotationEntityType; import org.opencdmp.commons.notification.NotificationProperties; import org.opencdmp.commons.scope.tenant.TenantScope; import org.opencdmp.commons.scope.user.UserScope; @@ -28,10 +29,8 @@ import org.opencdmp.integrationevent.outbox.notification.NotifyIntegrationEvent; import org.opencdmp.integrationevent.outbox.notification.NotifyIntegrationEventHandler; import org.opencdmp.model.Tenant; import org.opencdmp.model.description.Description; -import org.opencdmp.query.DescriptionQuery; -import org.opencdmp.query.PlanUserQuery; -import org.opencdmp.query.TenantQuery; -import org.opencdmp.query.UserQuery; +import org.opencdmp.model.plan.Plan; +import org.opencdmp.query.*; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.MessageSource; @@ -125,14 +124,26 @@ public class AnnotationEntityCreatedIntegrationEventHandlerImpl implements Annot private void sendNotification(AnnotationEntityCreatedIntegrationEvent event) throws InvalidApplicationException { - DescriptionEntity descriptionEntity = this.queryFactory.query(DescriptionQuery.class).disableTracking().ids(event.getEntityId()).first(); + List existingUsers = new ArrayList<>(); + DescriptionEntity descriptionEntity = null; + PlanEntity planEntity = null; + if (event.getEntityType().equals(AnnotationEntityType.Description)){ + descriptionEntity = this.queryFactory.query(DescriptionQuery.class).disableTracking().ids(event.getEntityId()).first(); - if (descriptionEntity == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{event.getEntityId(), Description.class.getSimpleName()}, LocaleContextHolder.getLocale())); + if (descriptionEntity == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{event.getEntityId(), Description.class.getSimpleName()}, LocaleContextHolder.getLocale())); + existingUsers = this.queryFactory.query(PlanUserQuery.class).disableTracking() + .planIds(descriptionEntity.getPlanId()) + .isActives(IsActive.Active) + .collect(); + } else { + planEntity = this.queryFactory.query(PlanQuery.class).disableTracking().ids(event.getEntityId()).first(); - List existingUsers = this.queryFactory.query(PlanUserQuery.class).disableTracking() - .planIds(descriptionEntity.getPlanId()) - .isActives(IsActive.Active) - .collect(); + if (planEntity == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{event.getEntityId(), Plan.class.getSimpleName()}, LocaleContextHolder.getLocale())); + existingUsers = this.queryFactory.query(PlanUserQuery.class).disableTracking() + .planIds(planEntity.getId()) + .isActives(IsActive.Active) + .collect(); + } if (existingUsers == null || existingUsers.size() <= 1){ return; @@ -150,24 +161,32 @@ public class AnnotationEntityCreatedIntegrationEventHandlerImpl implements Annot UserEntity user = this.queryFactory.query(UserQuery.class).disableTracking().ids(planUserId).first(); if (user == null || user.getIsActive().equals(IsActive.Inactive)) throw new MyValidationException(this.errors.getPlanInactiveUser().getCode(), this.errors.getPlanInactiveUser().getMessage()); - this.createAnnotationNotificationEvent(user, descriptionEntity, sender.getName(), event.getAnchor()); + this.createAnnotationNotificationEvent(user, descriptionEntity, planEntity, sender.getName(), event); } } - private void createAnnotationNotificationEvent(UserEntity user, DescriptionEntity description, String reasonName, String anchor) throws InvalidApplicationException, InvalidApplicationException { + private void createAnnotationNotificationEvent(UserEntity user, DescriptionEntity description, PlanEntity plan, String reasonName, AnnotationEntityCreatedIntegrationEvent event) throws InvalidApplicationException, InvalidApplicationException { NotifyIntegrationEvent notifyIntegrationEvent = new NotifyIntegrationEvent(); notifyIntegrationEvent.setUserId(user.getId()); - notifyIntegrationEvent.setNotificationType(this.notificationProperties.getDescriptionAnnotationCreated()); + if (plan != null && description == null) notifyIntegrationEvent.setNotificationType(this.notificationProperties.getPlanAnnotationCreatedType()); + else notifyIntegrationEvent.setNotificationType(this.notificationProperties.getDescriptionAnnotationCreatedType()); NotificationFieldData data = new NotificationFieldData(); List fieldInfoList = new ArrayList<>(); fieldInfoList.add(new FieldInfo("{recipient}", DataType.String, user.getName())); fieldInfoList.add(new FieldInfo("{reasonName}", DataType.String, reasonName)); - fieldInfoList.add(new FieldInfo("{name}", DataType.String, description.getLabel())); - fieldInfoList.add(new FieldInfo("{id}", DataType.String, description.getId().toString())); - String anchorUrl = "f/"+anchor+"/annotation"; + + if (plan != null && description == null) { + fieldInfoList.add(new FieldInfo("{name}", DataType.String, plan.getLabel())); + fieldInfoList.add(new FieldInfo("{id}", DataType.String, plan.getId().toString())); + } else { + fieldInfoList.add(new FieldInfo("{name}", DataType.String, description.getLabel())); + fieldInfoList.add(new FieldInfo("{id}", DataType.String, description.getId().toString())); + } + + String anchorUrl = "f/"+event.getAnchor()+"/annotation"; fieldInfoList.add(new FieldInfo("{anchor}", DataType.String, anchorUrl)); if(this.tenantScope.getTenantCode() != null && !this.tenantScope.getTenantCode().equals(this.tenantScope.getDefaultTenantCode())){ fieldInfoList.add(new FieldInfo("{tenant-url-path}", DataType.String, String.format("/t/%s", this.tenantScope.getTenantCode()))); diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java index 7e5e4bf9b..d8bc51a78 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEvent.java @@ -2,6 +2,7 @@ package org.opencdmp.integrationevent.inbox.annotationstatusentitychanged; import gr.cite.tools.validation.ValidatorFactory; import gr.cite.tools.validation.specification.Specification; +import org.opencdmp.commons.enums.annotation.AnnotationEntityType; import org.opencdmp.commons.validation.BaseValidator; import org.opencdmp.convention.ConventionService; import org.opencdmp.errorcode.ErrorThesaurusProperties; @@ -33,7 +34,7 @@ public class AnnotationStatusEntityChangedIntegrationEvent extends TrackedEvent private UUID entityId; public static final String _entityId = "entityId"; - private String entityType; + private AnnotationEntityType entityType; public static final String _entityType = "entityType"; private String anchor; @@ -82,11 +83,11 @@ public class AnnotationStatusEntityChangedIntegrationEvent extends TrackedEvent this.entityId = entityId; } - public String getEntityType() { + public AnnotationEntityType getEntityType() { return entityType; } - public void setEntityType(String entityType) { + public void setEntityType(AnnotationEntityType entityType) { this.entityType = entityType; } @@ -146,7 +147,7 @@ public class AnnotationStatusEntityChangedIntegrationEvent extends TrackedEvent .must(() -> this.isValidGuid(item.getEntityId())) .failOn(AnnotationStatusEntityChangedIntegrationEvent._entityId).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._entityId}, LocaleContextHolder.getLocale())), this.spec() - .must(() -> !this.isEmpty(item.getEntityType())) + .must(() -> !this.isNull(item.getEntityType())) .failOn(AnnotationStatusEntityChangedIntegrationEvent._entityType).failWith(messageSource.getMessage("Validation_Required", new Object[]{AnnotationStatusEntityChangedIntegrationEvent._entityType}, LocaleContextHolder.getLocale())), this.spec() .must(() -> !this.isEmpty(item.getAnchor())) diff --git a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java index 4eedf1c82..4f449f598 100644 --- a/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java +++ b/backend/core/src/main/java/org/opencdmp/integrationevent/inbox/annotationstatusentitychanged/AnnotationStatusEntityChangedIntegrationEventHandlerImpl.java @@ -13,6 +13,7 @@ import gr.cite.tools.validation.ValidatorFactory; import org.opencdmp.audit.AuditableAction; import org.opencdmp.commons.JsonHandlingService; import org.opencdmp.commons.enums.IsActive; +import org.opencdmp.commons.enums.annotation.AnnotationEntityType; import org.opencdmp.commons.notification.NotificationProperties; import org.opencdmp.commons.scope.tenant.TenantScope; import org.opencdmp.commons.scope.user.UserScope; @@ -28,10 +29,8 @@ import org.opencdmp.integrationevent.outbox.notification.NotifyIntegrationEvent; import org.opencdmp.integrationevent.outbox.notification.NotifyIntegrationEventHandler; import org.opencdmp.model.Tenant; import org.opencdmp.model.description.Description; -import org.opencdmp.query.DescriptionQuery; -import org.opencdmp.query.PlanUserQuery; -import org.opencdmp.query.TenantQuery; -import org.opencdmp.query.UserQuery; +import org.opencdmp.model.plan.Plan; +import org.opencdmp.query.*; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.MessageSource; @@ -125,14 +124,26 @@ public class AnnotationStatusEntityChangedIntegrationEventHandlerImpl implements private void sendNotification(AnnotationStatusEntityChangedIntegrationEvent event) throws InvalidApplicationException { - DescriptionEntity descriptionEntity = this.queryFactory.query(DescriptionQuery.class).disableTracking().ids(event.getEntityId()).first(); + List existingUsers = new ArrayList<>(); + DescriptionEntity descriptionEntity = null; + PlanEntity planEntity = null; + if (event.getEntityType().equals(AnnotationEntityType.Description)){ + descriptionEntity = this.queryFactory.query(DescriptionQuery.class).disableTracking().ids(event.getEntityId()).first(); - if (descriptionEntity == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{event.getEntityId(), Description.class.getSimpleName()}, LocaleContextHolder.getLocale())); + if (descriptionEntity == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{event.getEntityId(), Description.class.getSimpleName()}, LocaleContextHolder.getLocale())); + existingUsers = this.queryFactory.query(PlanUserQuery.class).disableTracking() + .planIds(descriptionEntity.getPlanId()) + .isActives(IsActive.Active) + .collect(); + } else { + planEntity = this.queryFactory.query(PlanQuery.class).disableTracking().ids(event.getEntityId()).first(); - List existingUsers = this.queryFactory.query(PlanUserQuery.class).disableTracking() - .planIds(descriptionEntity.getPlanId()) - .isActives(IsActive.Active) - .collect(); + if (planEntity == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{event.getEntityId(), Plan.class.getSimpleName()}, LocaleContextHolder.getLocale())); + existingUsers = this.queryFactory.query(PlanUserQuery.class).disableTracking() + .planIds(planEntity.getId()) + .isActives(IsActive.Active) + .collect(); + } if (existingUsers == null || existingUsers.size() <= 1){ return; @@ -150,25 +161,33 @@ public class AnnotationStatusEntityChangedIntegrationEventHandlerImpl implements UserEntity user = this.queryFactory.query(UserQuery.class).disableTracking().ids(planUserId).first(); if (user == null || user.getIsActive().equals(IsActive.Inactive)) throw new MyValidationException(this.errors.getPlanInactiveUser().getCode(), this.errors.getPlanInactiveUser().getMessage()); - this.createAnnotationStatusChangedNotificationEvent(user, descriptionEntity, sender.getName(), event.getAnchor(), event.getStatusLabel()); + this.createAnnotationStatusChangedNotificationEvent(user, descriptionEntity, planEntity, sender.getName(), event); } } - private void createAnnotationStatusChangedNotificationEvent(UserEntity user, DescriptionEntity description, String reasonName, String anchor, String statusLabel) throws InvalidApplicationException, InvalidApplicationException { + private void createAnnotationStatusChangedNotificationEvent(UserEntity user, DescriptionEntity description, PlanEntity plan, String reasonName, AnnotationStatusEntityChangedIntegrationEvent event) throws InvalidApplicationException, InvalidApplicationException { NotifyIntegrationEvent notifyIntegrationEvent = new NotifyIntegrationEvent(); notifyIntegrationEvent.setUserId(user.getId()); - notifyIntegrationEvent.setNotificationType(this.notificationProperties.getDescriptionAnnotationStatusChanged()); + if (plan != null && description == null) notifyIntegrationEvent.setNotificationType(this.notificationProperties.getPlanAnnotationStatusChangedType()); + else notifyIntegrationEvent.setNotificationType(this.notificationProperties.getDescriptionAnnotationStatusChangedType()); NotificationFieldData data = new NotificationFieldData(); List fieldInfoList = new ArrayList<>(); fieldInfoList.add(new FieldInfo("{recipient}", DataType.String, user.getName())); fieldInfoList.add(new FieldInfo("{reasonName}", DataType.String, reasonName)); - fieldInfoList.add(new FieldInfo("{name}", DataType.String, description.getLabel())); - fieldInfoList.add(new FieldInfo("{id}", DataType.String, description.getId().toString())); - fieldInfoList.add(new FieldInfo("{status}", DataType.String, statusLabel)); - String anchorUrl = "f/"+anchor+"/annotation"; + + if (plan != null && description == null) { + fieldInfoList.add(new FieldInfo("{name}", DataType.String, plan.getLabel())); + fieldInfoList.add(new FieldInfo("{id}", DataType.String, plan.getId().toString())); + } else { + fieldInfoList.add(new FieldInfo("{name}", DataType.String, description.getLabel())); + fieldInfoList.add(new FieldInfo("{id}", DataType.String, description.getId().toString())); + } + + fieldInfoList.add(new FieldInfo("{status}", DataType.String, event.getStatusLabel())); + String anchorUrl = "f/"+event.getAnchor()+"/annotation"; fieldInfoList.add(new FieldInfo("{anchor}", DataType.String, anchorUrl)); if(this.tenantScope.getTenantCode() != null && !this.tenantScope.getTenantCode().equals(this.tenantScope.getDefaultTenantCode())){ fieldInfoList.add(new FieldInfo("{tenant-url-path}", DataType.String, String.format("/t/%s", this.tenantScope.getTenantCode()))); diff --git a/backend/web/src/main/resources/config/notification-devel.yml b/backend/web/src/main/resources/config/notification-devel.yml index 23677387b..de6b3e48e 100644 --- a/backend/web/src/main/resources/config/notification-devel.yml +++ b/backend/web/src/main/resources/config/notification-devel.yml @@ -3,11 +3,13 @@ notification: planInvitationExistingUserType: 4904dea2-5079-46d3-83be-3a19c9ab45dc planModifiedType: 4542262A-22F8-4BAA-9DB6-1C8E70AC1DBB planFinalisedType: 90DB0B46-42DE-BD89-AEBF-6F27EFEB256E + planAnnotationCreatedType: 1cca80f5-2ea9-41ae-a204-9b4332216c24 + planAnnotationStatusChangedType: 0c8a5c62-e48f-4eca-99ee-a7f262477061 descriptionCreatedType: 8965b1d5-99a6-4acf-9016-c0d0ce341364 descriptionModifiedType: 4FDBFA80-7A71-4A69-B854-67CBB70648F1 descriptionFinalisedType: 33790bad-94d4-488a-8ee2-7f6295ca18ea - descriptionAnnotationCreated: db1e99d2-a240-4e75-9bb2-ef25b234c1f0 - descriptionAnnotationStatusChanged: 3189e3a6-91e6-40c6-8ff8-275a68445aec + descriptionAnnotationCreatedType: db1e99d2-a240-4e75-9bb2-ef25b234c1f0 + descriptionAnnotationStatusChangedType: 3189e3a6-91e6-40c6-8ff8-275a68445aec mergeAccountConfirmationType: BFE68845-CB05-4C5A-A03D-29161A7C9660 removeCredentialConfirmationType: C9BC3F16-057E-4BBA-8A5F-36BD835E5604 planDepositType: 55736F7A-83AB-4190-AF43-9D031A6F9612 diff --git a/docs/docs/documentation/administration/annotation-statuses.md b/docs/docs/documentation/administration/annotation-statuses.md index 2264e2a87..37900ff43 100644 --- a/docs/docs/documentation/administration/annotation-statuses.md +++ b/docs/docs/documentation/administration/annotation-statuses.md @@ -7,7 +7,7 @@ description: Manage all annotation statuses In this page, there is a listing where you can view details about all the available annotation statuses. You can view details about the annotation service [here](/docs/documentation/supplementary-services/annotations). -The information displayed by default is: the `label`, the `internal status` which is the system specific status, the `status` of the entity and timestamps for the `creation` and `updating` of the entites. At the top right corner of the listing you can also select which columns to display. +The information displayed by default is: the `label`, the `internal status` which is the system specific status, the `status` of the entity and timestamps for the `creation` and `updating` of the entities. At the top right corner of the listing you can also select which columns to display. :::tip @@ -33,7 +33,7 @@ You can control how many records are being displayed at any time, by adjusting t ## Filtering -There are some filtering options available for users. +There are some filtering options available for annotation statuses. - **Is Active**: By toggling this control you can view only the active or only the disabled annotation statuses.
*By default, this option is set to true.* - **Internal Status**: You can filter statuses by the internal status they could relate with. You can select one or more statuses.
*By default, no status is selected.* diff --git a/docs/docs/documentation/administration/entity-locks.md b/docs/docs/documentation/administration/entity-locks.md index e2efcdbd6..8ace34d82 100644 --- a/docs/docs/documentation/administration/entity-locks.md +++ b/docs/docs/documentation/administration/entity-locks.md @@ -5,7 +5,7 @@ description: Manage all entity locks # Entity Locks -In this page, there is a listing where you can view details about all the actively locked entites. +In this page, there is a listing where you can view details about all the actively locked entities. :::info @@ -39,7 +39,7 @@ You can control how many records are being displayed at any time, by adjusting t ## Filtering -There are some filtering options available for users. +There are some filtering options available for entity locks. - **Users**: You can filter locks by their user. You can select one or more users.
*By default, no user is selected.* - **Types**: You can filter locks by the entity type they act uppon. You can select one or more types.
*By default, no type is selected.* diff --git a/docs/docs/documentation/administration/tenant-users.md b/docs/docs/documentation/administration/tenant-users.md index 1f4a1b89b..a5c2b7d65 100644 --- a/docs/docs/documentation/administration/tenant-users.md +++ b/docs/docs/documentation/administration/tenant-users.md @@ -43,7 +43,7 @@ You can control how many records are being displayed at any time, by adjusting t ## Filtering -There are some filtering options available for users. +There are some filtering options available for tenant users. - **Is Active**: By toggling this control you can view only the active or only the disabled users.
*By default, this option is set to true.* - **Roles**: You can filter users by their assigned roles. You can select one or more roles.
*By default, no role is selected.* diff --git a/docs/docs/documentation/administration/tenants.md b/docs/docs/documentation/administration/tenants.md index 3376c81f5..ecb791baf 100644 --- a/docs/docs/documentation/administration/tenants.md +++ b/docs/docs/documentation/administration/tenants.md @@ -65,6 +65,6 @@ There are two ways a user can change the tenant scope. :::tip -The options to change the tenant scope are only available when the logged in user belongs to one or more tenants. Otherwise, the user is attached only to the default tenant. Also, system administrators can select from all the available tenants. +The options to change the tenant scope are only available when the logged in user belongs to one or more tenants. Otherwise, the user is attached only to the default tenant. Also, system administrators which are users having the global `Admin` role can select from all the available tenants. ::: \ No newline at end of file diff --git a/docs/docs/documentation/administration/usage-limits.md b/docs/docs/documentation/administration/usage-limits.md new file mode 100644 index 000000000..b608ca2dd --- /dev/null +++ b/docs/docs/documentation/administration/usage-limits.md @@ -0,0 +1,57 @@ +--- +sidebar_position: 15 +description: Manage all usage limits +--- + +# Usage Limits + +In this page, there is a listing where you can view details about all the usage limits set on different resourses. These limits are [tenant](/docs/documentation/administration/tenants) spesific, meaning that you view only the limits that are set on a tenant you have selected from the ones you manage. + +The information displayed by default is: the `label`, the `target metric` which is the resource metric this limit is enforced on, the `limit` value, the `status` of the entity and timestamps for the `creation` and `updating` of the entities. At the top right corner of the listing you can also select which columns to display. + +:::tip + +For usage limits, all the columns are visible by default. + +::: + +You can edit or remove a limit by clicking on the three dots on the far right corner of the records and then select `Edit` or `Delete` respectively. + +## Authorization + +Only users that have the global **Admin** role can access this page. + +## Navigation + +This view is available when the user presses the `Usage Limits` link from the side navigation menu. + +## Pagination + +Not all the records are being displayed at once. By default, there is a pagination of 10 records applied to them. + +You can control how many records are being displayed at any time, by adjusting the `items per page` control at the bottom left corner of the table. + +## Filtering + +There are some filtering options available for usage limits. + +- **Is Active**: By toggling this control you can view only the active or only the disabled usage limits.
*By default, this option is set to true.* +- **Type**: You can filter limits by the metric they are enforced uppon. You can select one or more metrics.
*By default, no metric is selected.* + +In order for the filters to apply, you have to click the `Apply filters` button. + +You can also clear any filters already applied, by pressing the `clear all filters` option, located at the top of the popup. + +--- + +## Edit form + +You can add a limit to your selected tenant by clicking on the `Create Usage Limit` button at the top right corner of the screen, above the listing. + +In the form, you can specify the following: + +- **Label**: The label of the limit. +- **Target Metric**: The metric this limit will be enforced uppon. +- **Value**: The value of the limit. When set, the target metric will not be able to exceed this value. + +When done, you can either save your changes by pressing the `Save` button, or discard them by pressing the `Cancel` button which redirects you back to the listing page. \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 92523386f..aa63237bb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -32,8 +32,8 @@ "cookieconsent": "^3.1.1", "dragula": "^3.7.3", "file-saver": "^2.0.5", - "keycloak-angular": "^15.2.1", - "keycloak-js": "^24.0.5", + "keycloak-angular": "^16.0.1", + "keycloak-js": "^25.0.0", "moment": "^2.30.1", "moment-timezone": "^0.5.45", "ng-dialog-animation": "^9.0.4", diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 5950e4efc..6df99ec8c 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -80,7 +80,7 @@ const cookieConfig: NgcCookieConsentConfig = { type: 'info' }; -export function InstallationConfigurationFactory(appConfig: ConfigurationService, keycloak: KeycloakService, authService: AuthService, languageService: LanguageService, tenantHandlingService: TenantHandlingService, router: Router) { +export function InstallationConfigurationFactory(appConfig: ConfigurationService, keycloak: KeycloakService, authService: AuthService, languageService: LanguageService, tenantHandlingService: TenantHandlingService) { return () => appConfig.loadConfiguration().then(() => { return languageService.loadAvailableLanguages().toPromise(); }).then(x => keycloak.init({ @@ -109,15 +109,11 @@ export function InstallationConfigurationFactory(appConfig: ConfigurationService }; const tenantCode = tenantHandlingService.extractTenantCodeFromUrlPath(window.location.pathname) ?? authService.selectedTenant() ?? 'default'; - const tokenPromise = keycloak.getToken(); - return authService.prepareAuthRequest(from(tokenPromise), tenantCode, { params }) - .toPromise() - .then(() => { - if (authService.selectedTenant() != tenantCode) { - router.navigate(['/']); - } - }) - .catch(error => authService.onAuthenticateError(error)); + const token = keycloak.getToken(); + return authService.prepareAuthRequest(from(token), tenantCode, { params }).toPromise().catch(error => { + authService.onAuthenticateError(error); + window.location.pathname = "/"; + }); })); } diff --git a/frontend/src/app/core/services/auth/auth.service.ts b/frontend/src/app/core/services/auth/auth.service.ts index b212e57c7..821b82996 100644 --- a/frontend/src/app/core/services/auth/auth.service.ts +++ b/frontend/src/app/core/services/auth/auth.service.ts @@ -171,13 +171,18 @@ export class AuthService extends BaseService { return observable.pipe( map((x) => this.currentAuthenticationToken(x)), concatMap(response => { - return this.ensureTenant(tenantCode ?? this.selectedTenant() ?? 'default'); + return response ? this.ensureTenant(tenantCode ?? this.selectedTenant() ?? 'default') : null; }), concatMap(response => { - return this.principalService.me(httpParams); + return response ? this.principalService.me(httpParams) : null; + }), + concatMap(response => { + if (response) { + this.currentAccount(response) + } + return of(response); }), concatMap(response => { - this.currentAccount(response); return this.tenantHandlingService.loadTenantCssColors(); }), concatMap(response => { @@ -207,16 +212,10 @@ export class AuthService extends BaseService { if (myTenants.some(x => x.code.toLocaleLowerCase() == tenantCode.toLocaleLowerCase())) { this.selectedTenant(tenantCode); - } else { + } + else { this.selectedTenant(null); } - if (!this.selectedTenant()) { - if (myTenants.length > 0) { - this.selectedTenant(myTenants[0]?.code); - } - } - } else { - this.selectedTenant(null); } return this.selectedTenant(); } diff --git a/frontend/src/app/ui/auth/login/login.component.ts b/frontend/src/app/ui/auth/login/login.component.ts index a3ed7065d..a0bf187fa 100644 --- a/frontend/src/app/ui/auth/login/login.component.ts +++ b/frontend/src/app/ui/auth/login/login.component.ts @@ -37,15 +37,9 @@ export class LoginComponent extends BaseComponent implements OnInit { this.authService.authenticate(this.returnUrl); } else { const tenantCode = this.tenantHandlingService.extractTenantCodeFromUrlPath(this.returnUrl) ?? this.authService.selectedTenant() ?? 'default'; - this.authService.prepareAuthRequest(from(this.keycloakService.getToken()), tenantCode).pipe(takeUntil(this._destroyed)).subscribe( - () => { - let returnUrL = this.returnUrl; - - if (this.authService.selectedTenant() != tenantCode) returnUrL = this.routerUtils.generateUrl('/'); - - this.zone.run(() => this.router.navigateByUrl(this.routerUtils.generateUrl(returnUrL))); - }, - (error) => this.authService.authenticate('/')); + let returnUrL = this.returnUrl; + if (this.authService.selectedTenant() != tenantCode) returnUrL = this.routerUtils.generateUrl('/'); + this.zone.run(() => this.router.navigateByUrl(this.routerUtils.generateUrl(returnUrL))); } } } 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 cdd297aa8..f4e629805 100644 --- a/frontend/src/app/ui/description/editor/description-editor.component.html +++ b/frontend/src/app/ui/description/editor/description-editor.component.html @@ -104,8 +104,8 @@
{{'DESCRIPTION-EDITOR.TOC.MAIN-INFO' | translate}} (done)
-
-
+
+
= new Map(); - private initialTemplateId: string = Guid.EMPTY; private permissionPerSection: Map; @@ -141,7 +140,7 @@ export class DescriptionEditorComponent extends BaseEditor { + dialogRef.afterClosed().subscribe((result: NewDescriptionDialogComponentResult) => { if (result) { - this.titleService.setTitle(result.label); + if (result.description != null) { + this.titleService.setTitle(result.description.label); - result.plan = this.item.plan; - result.planDescriptionTemplate = this.item.planDescriptionTemplate; + result.description.plan = this.item.plan; + result.description.planDescriptionTemplate = this.item.planDescriptionTemplate; - const sectionId = this.item.planDescriptionTemplate.sectionId; - result.planDescriptionTemplate = this.item.plan.planDescriptionTemplates.find(x => x.sectionId == sectionId && x.descriptionTemplateGroupId == result.descriptionTemplate.groupId); + const sectionId = this.item.planDescriptionTemplate.sectionId; + result.description.planDescriptionTemplate = this.item.plan.planDescriptionTemplates.find(x => x.sectionId == sectionId && x.descriptionTemplateGroupId == result.description.descriptionTemplate.groupId); - this.prepareForm(result); - this.changeDetectorRef.markForCheck(); // when prefilling a description the "prepareForm" has already being executed from the base-editor and we need to trigger the angular's change-detector manually - this.descriptionFormService.detectChanges(true); + this.prepareForm(result.description); + this.changeDetectorRef.markForCheck(); // when prefilling a description the "prepareForm" has already being executed from the base-editor and we need to trigger the angular's change-detector manually + this.descriptionFormService.detectChanges(true); + } else if (result.descriptionTemplateId != null) { + this.formGroup.get('descriptionTemplateId').setValue(result.descriptionTemplateId); + } + } else { + this.reachedBase = true; } }) } @@ -237,7 +242,6 @@ export class DescriptionEditorComponent extends BaseEditor x === AppPermission.AnnotateDescription); this.formGroup = this.editorModel.buildForm(null, this.isDeleted || !this.canEdit, this.visibilityRulesService); if (this.item.descriptionTemplate?.definition) this.visibilityRulesService.setContext(this.item.descriptionTemplate.definition, this.formGroup.get('properties')); - if (this.item.descriptionTemplate?.definition) this.pageToFieldSetMap = this.mapPageToFieldSet(this.item.descriptionTemplate);; // this.selectedSystemFields = this.selectedSystemFieldDisabled(); this.descriptionEditorService.setValidationErrorModel(this.editorModel.validationErrorModel); @@ -644,8 +648,10 @@ export class DescriptionEditorComponent extends BaseEditor x.sectionId == sectionId && x.descriptionTemplateGroupId == descriptionTemplate.groupId); this.formGroup.get('planDescriptionTemplateId').setValue(this.item.planDescriptionTemplate.id); if (descriptionTemplate.definition) this.visibilityRulesService.setContext(this.item.descriptionTemplate.definition, this.formGroup.get('properties')); - if (descriptionTemplate.definition) this.pageToFieldSetMap = this.mapPageToFieldSet(this.item.descriptionTemplate); + if (this.formGroup.get('label').value == null || this.formGroup.get('label').value.length == 0) { + this.formGroup.get('label').setValue(descriptionTemplate.label); + } this.registerFormListeners(); }, error => { @@ -655,17 +661,6 @@ export class DescriptionEditorComponent extends BaseEditor { - const pageToFieldSetMap = new Map(); - - descriptionTemplate.definition.pages?.forEach((page: DescriptionTemplatePage) => { - let fieldsByPage = this.getFieldsetsOfPage(page); - pageToFieldSetMap.set(page.id, fieldsByPage); - }); - - return pageToFieldSetMap; - } - getFieldsetsOfPage(page: DescriptionTemplatePage): DescriptionFieldIndicator[] { const fieldsByPage: DescriptionFieldIndicator[] = [] diff --git a/frontend/src/app/ui/description/editor/description-editor.module.ts b/frontend/src/app/ui/description/editor/description-editor.module.ts index d1ae96d26..e1a4bf14d 100644 --- a/frontend/src/app/ui/description/editor/description-editor.module.ts +++ b/frontend/src/app/ui/description/editor/description-editor.module.ts @@ -12,7 +12,7 @@ import { DescriptionFormProgressIndicationModule } from './form-progress-indicat import { TableOfContentsModule } from './table-of-contents/table-of-contents.module'; import { RichTextEditorModule } from '@app/library/rich-text-editor/rich-text-editor.module'; import { TagsFieldModule } from '@app/ui/tag/tags-field/tags-field.module'; -import { PrefillDescriptionDialogComponent } from './prefill-description/prefill-description.component'; +import { NewDescriptionDialogComponent } from './new-description/new-description.component'; import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module'; import { DeprecatedDescriptionTemplateDialog } from './description-base-fields-editor/dialog-description-template/deprecated-description-template-dialog.component'; @@ -33,7 +33,7 @@ import { DeprecatedDescriptionTemplateDialog } from './description-base-fields-e declarations: [ DescriptionEditorComponent, DescriptionBaseFieldsEditorComponent, - PrefillDescriptionDialogComponent, + NewDescriptionDialogComponent, DeprecatedDescriptionTemplateDialog ], exports: [ diff --git a/frontend/src/app/ui/description/editor/prefill-description/prefill-description-editor.model.ts b/frontend/src/app/ui/description/editor/new-description/new-description-editor.model.ts similarity index 100% rename from frontend/src/app/ui/description/editor/prefill-description/prefill-description-editor.model.ts rename to frontend/src/app/ui/description/editor/new-description/new-description-editor.model.ts diff --git a/frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.html b/frontend/src/app/ui/description/editor/new-description/new-description.component.html similarity index 53% rename from frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.html rename to frontend/src/app/ui/description/editor/new-description/new-description.component.html index 10d077767..9b32597a8 100644 --- a/frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.html +++ b/frontend/src/app/ui/description/editor/new-description/new-description.component.html @@ -1,31 +1,20 @@
- {{'PREFILL-DESCRIPTION-DIALOG.TITLE' | translate}} - close + {{'NEW-DESCRIPTION-DIALOG.TITLE' | translate}} + close
-
+
- {{'PREFILL-DESCRIPTION-DIALOG.HINT' | translate}} + {{'NEW-DESCRIPTION-DIALOG.DESCRIPTION-TEMPLATE-HINT' | translate}}
-
- -
{{'PREFILL-DESCRIPTION-DIALOG.OR' | translate}}
- -
-
-
-

{{'PREFILL-DESCRIPTION-DIALOG.DESCRIPTION-TEMPLATE' | translate}}

-
- - +
+ +
{{descriptionTemplate.label}}, @@ -35,25 +24,34 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}} +
+
+
+ {{'NEW-DESCRIPTION-DIALOG.PREFILL-HINT' | translate}} +
+
+ +
+ +
{{'NEW-DESCRIPTION-DIALOG.OR' | translate}}
+ +
+
-

{{'PREFILL-DESCRIPTION-DIALOG.PREFILLING-SOURCE' | translate}}

+

{{'NEW-DESCRIPTION-DIALOG.PREFILLING-SOURCE' | translate}}

- + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-

{{'PREFILL-DESCRIPTION-DIALOG.SEARCH-HEADER' | translate}}

+

{{'NEW-DESCRIPTION-DIALOG.SEARCH-HEADER' | translate}}

- +
@@ -61,8 +59,7 @@
- +
-
+
\ No newline at end of file diff --git a/frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.scss b/frontend/src/app/ui/description/editor/new-description/new-description.component.scss similarity index 100% rename from frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.scss rename to frontend/src/app/ui/description/editor/new-description/new-description.component.scss diff --git a/frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.ts b/frontend/src/app/ui/description/editor/new-description/new-description.component.ts similarity index 80% rename from frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.ts rename to frontend/src/app/ui/description/editor/new-description/new-description.component.ts index 2584edc63..379a3a885 100644 --- a/frontend/src/app/ui/description/editor/prefill-description/prefill-description.component.ts +++ b/frontend/src/app/ui/description/editor/new-description/new-description.component.ts @@ -1,8 +1,10 @@ import { Component, Inject, OnInit } from "@angular/core"; import { UntypedFormGroup } from "@angular/forms"; import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; +import { IsActive } from "@app/core/common/enum/is-active.enum"; import { DescriptionPrefillingRequest, PrefillingSearchRequest } from "@app/core/model/description-prefilling-request/description-prefilling-request"; import { DescriptionTemplate } from "@app/core/model/description-template/description-template"; +import { Description } from "@app/core/model/description/description"; import { Plan } from "@app/core/model/plan/plan"; import { Prefilling } from "@app/core/model/prefilling-source/prefilling-source"; import { PrefillingSourceService } from "@app/core/services/prefilling-source/prefilling-source.service"; @@ -10,20 +12,19 @@ import { ProgressIndicationService } from "@app/core/services/progress-indicatio import { SingleAutoCompleteConfiguration } from "@app/library/auto-complete/single/single-auto-complete-configuration"; import { BaseComponent } from "@common/base/base.component"; import { FormService } from "@common/forms/form-service"; +import { HttpErrorHandlingService } from "@common/modules/errors/error-handling/http-error-handling.service"; import { Guid } from "@common/types/guid"; import { Observable } from "rxjs"; import { takeUntil } from "rxjs/operators"; import { DescriptionEditorEntityResolver } from "../resolvers/description-editor-entity.resolver"; -import { IsActive } from "@app/core/common/enum/is-active.enum"; -import { DescriptionPrefillingRequestEditorModel } from "./prefill-description-editor.model"; -import { HttpErrorHandlingService } from "@common/modules/errors/error-handling/http-error-handling.service"; +import { DescriptionPrefillingRequestEditorModel } from "./new-description-editor.model"; @Component({ - selector: 'prefill-description-component', - templateUrl: 'prefill-description.component.html', - styleUrls: ['prefill-description.component.scss'] + selector: 'new-description-component', + templateUrl: 'new-description.component.html', + styleUrls: ['new-description.component.scss'] }) -export class PrefillDescriptionDialogComponent extends BaseComponent implements OnInit { +export class NewDescriptionDialogComponent extends BaseComponent implements OnInit { progressIndication = false; singlePrefillingSourceAutoCompleteConfiguration: SingleAutoCompleteConfiguration; @@ -35,7 +36,7 @@ export class PrefillDescriptionDialogComponent extends BaseComponent implements planSectionId: Guid; availableDescriptionTemplates: DescriptionTemplate[] = []; - constructor(public dialogRef: MatDialogRef, + constructor(public dialogRef: MatDialogRef, private progressIndicationService: ProgressIndicationService, public prefillingSourceService: PrefillingSourceService, private formService: FormService, @@ -69,7 +70,7 @@ export class PrefillDescriptionDialogComponent extends BaseComponent implements }; } - changePreffillingSource(){ + changePreffillingSource() { this.prefillForm.get('data').setValue(null); } @@ -78,7 +79,7 @@ export class PrefillDescriptionDialogComponent extends BaseComponent implements } searchDescriptions(query: string): Observable { - const request: PrefillingSearchRequest= { + const request: PrefillingSearchRequest = { like: query, prefillingSourceId: this.prefillForm.get('prefillingSourceId').value }; @@ -92,18 +93,28 @@ export class PrefillDescriptionDialogComponent extends BaseComponent implements this.prefillingSourceService.generate(formData, DescriptionEditorEntityResolver.descriptionTemplateLookupFieldsForDescrption()) .pipe(takeUntil(this._destroyed)).subscribe(description => { if (description) { - this.closeDialog(description); + this.closeDialog({ description: description }); } else { this.closeDialog(); } }, - error => { - this.httpErrorHandlingService.handleBackedRequestError(error); - this.dialogRef.close(); - }); + error => { + this.httpErrorHandlingService.handleBackedRequestError(error); + this.dialogRef.close(); + }); + } + + manuallySelected() { + if (!this.prefillForm.get('descriptionTemplateId').valid) return; + this.closeDialog({ descriptionTemplateId: this.prefillForm.get('descriptionTemplateId').value }); } closeDialog(result = null): void { this.dialogRef.close(result); } } + +export class NewDescriptionDialogComponentResult { + description: Description; + descriptionTemplateId: Guid; +} diff --git a/frontend/src/app/ui/description/editor/resolvers/description-editor-entity.resolver.ts b/frontend/src/app/ui/description/editor/resolvers/description-editor-entity.resolver.ts index 9b9669e60..379d45ccf 100644 --- a/frontend/src/app/ui/description/editor/resolvers/description-editor-entity.resolver.ts +++ b/frontend/src/app/ui/description/editor/resolvers/description-editor-entity.resolver.ts @@ -46,6 +46,14 @@ export class DescriptionEditorEntityResolver extends BaseEditorResolver { ] } + public static permissionLookupFields(): string[] { + return [ + nameof(x => x.id), + [nameof(x => x.plan), nameof(x => x.id)].join('.'), + [nameof(x => x.planDescriptionTemplate), nameof(x => x.sectionId)].join('.'), + ] + } + public static descriptionLookupFields(): string[] { return [ ...BaseEditorResolver.lookupFields(), diff --git a/frontend/src/app/ui/description/editor/resolvers/description-editor-permissions.resolver.ts b/frontend/src/app/ui/description/editor/resolvers/description-editor-permissions.resolver.ts index 2809a850b..1dc99a1dd 100644 --- a/frontend/src/app/ui/description/editor/resolvers/description-editor-permissions.resolver.ts +++ b/frontend/src/app/ui/description/editor/resolvers/description-editor-permissions.resolver.ts @@ -27,7 +27,7 @@ export class DescriptionEditorPermissionsResolver extends BaseEditorResolver { resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { const fields = [ - ...DescriptionEditorEntityResolver.lookupFields() + ...DescriptionEditorEntityResolver.permissionLookupFields() ]; const id = route.paramMap.get('id'); const planId = route.paramMap.get('planId'); @@ -36,7 +36,7 @@ export class DescriptionEditorPermissionsResolver extends BaseEditorResolver { // const cloneid = route.paramMap.get('cloneid'); if (id != null && copyPlanId == null && planSectionId == null) { return this.descriptionService.getSingle(Guid.parse(id), fields).pipe(tap(d => this.breadcrumbService.addIdResolvedValue(d.id.toString(), d.label))) - .pipe(mergeMap( description => { + .pipe(mergeMap(description => { const descriptionSectionPermissionResolverModel: DescriptionSectionPermissionResolver = { planId: description.plan.id, sectionIds: [description.planDescriptionTemplate.sectionId], @@ -46,54 +46,20 @@ export class DescriptionEditorPermissionsResolver extends BaseEditorResolver { })); } else if (planId != null && planSectionId != null && copyPlanId == null) { - return this.planService.getSingle(Guid.parse(planId), DescriptionEditorEntityResolver.planLookupFields()) - .pipe(tap(x => { - this.breadcrumbService.addExcludedParam(planId, true); - this.breadcrumbService.addIdResolvedValue(planSectionId, this.language.instant("DESCRIPTION-EDITOR.TITLE-NEW")); - }), takeUntil(this._destroyed), map(plan => { - const description: Description = {}; - description.plan = plan; - description.planDescriptionTemplate = { - sectionId: Guid.parse(planSectionId) - } - return description; - })) - .pipe(mergeMap( description => { - const descriptionSectionPermissionResolverModel: DescriptionSectionPermissionResolver = { - planId: description.plan.id, - sectionIds: [description.planDescriptionTemplate.sectionId], - permissions: [AppPermission.EditDescription, AppPermission.DeleteDescription, AppPermission.FinalizeDescription, AppPermission.AnnotateDescription] - } - return this.descriptionService.getDescriptionSectionPermissions(descriptionSectionPermissionResolverModel).pipe(takeUntil(this._destroyed)); - })); - } else if (copyPlanId != null && id != null && planSectionId != null) { - return this.planService.getSingle(Guid.parse(copyPlanId), DescriptionEditorEntityResolver.planLookupFields()).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed), concatMap(plan => { - //TODO - return this.descriptionService.getSingle(Guid.parse(id), DescriptionEditorEntityResolver.cloneLookupFields()) - .pipe(tap(x => { - this.breadcrumbService.addExcludedParam(copyPlanId, true) - this.breadcrumbService.addExcludedParam(planSectionId, true) - this.breadcrumbService.addIdResolvedValue(id, x.label) - }), takeUntil(this._destroyed), map(description => { - description.id = null; - description.hash = null; - description.status = DescriptionStatus.Draft; - description.plan = plan; - description.planDescriptionTemplate = { - id: plan.planDescriptionTemplates.filter(x => x.sectionId == Guid.parse(planSectionId) && x.descriptionTemplateGroupId == description.descriptionTemplate.groupId)[0].id, - sectionId: Guid.parse(planSectionId) - } - return description; - })); - })).pipe(mergeMap( description => { - const descriptionSectionPermissionResolverModel: DescriptionSectionPermissionResolver = { - planId: description.plan.id, - sectionIds: [description.planDescriptionTemplate.sectionId], - permissions: [AppPermission.EditDescription, AppPermission.DeleteDescription, AppPermission.FinalizeDescription, AppPermission.AnnotateDescription] - } - return this.descriptionService.getDescriptionSectionPermissions(descriptionSectionPermissionResolverModel).pipe(takeUntil(this._destroyed)); - })); + const descriptionSectionPermissionResolverModel: DescriptionSectionPermissionResolver = { + planId: Guid.parse(planId), + sectionIds: [Guid.parse(planSectionId)], + permissions: [AppPermission.EditDescription, AppPermission.DeleteDescription, AppPermission.FinalizeDescription, AppPermission.AnnotateDescription] + } + return this.descriptionService.getDescriptionSectionPermissions(descriptionSectionPermissionResolverModel).pipe(takeUntil(this._destroyed)); + } else if (copyPlanId != null && id != null && planSectionId != null) { + const descriptionSectionPermissionResolverModel: DescriptionSectionPermissionResolver = { + planId: Guid.parse(copyPlanId), + sectionIds: [Guid.parse(planSectionId)], + permissions: [AppPermission.EditDescription, AppPermission.DeleteDescription, AppPermission.FinalizeDescription, AppPermission.AnnotateDescription] + } + return this.descriptionService.getDescriptionSectionPermissions(descriptionSectionPermissionResolverModel).pipe(takeUntil(this._destroyed)); } } } 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 b4860cfeb..c9ed77777 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 @@ -206,7 +206,7 @@
diff --git a/frontend/src/assets/i18n/baq.json b/frontend/src/assets/i18n/baq.json index 140a3542f..08a588d5e 100644 --- a/frontend/src/assets/i18n/baq.json +++ b/frontend/src/assets/i18n/baq.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "Plan Blueprints", "USERS": "Erabiltzaileak", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Marka partekatua", "SUPPORT": "Laguntza", "FEEDBACK": "Bidali feedback-a", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/de.json b/frontend/src/assets/i18n/de.json index 25c1048dc..b6490687f 100644 --- a/frontend/src/assets/i18n/de.json +++ b/frontend/src/assets/i18n/de.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Benutzer", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Co-Branding", "SUPPORT": "Support", "FEEDBACK": "Send feedback", @@ -895,7 +895,7 @@ "ANY": "Any", "DRAFT": "Draft", "FINALIZED": "Finalized", - "CANCELED": "Canceled" + "CANCELED": "Canceled" } }, "RELATED-TENANT": { @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/en.json b/frontend/src/assets/i18n/en.json index dc5b11a04..cd08fa92b 100644 --- a/frontend/src/assets/i18n/en.json +++ b/frontend/src/assets/i18n/en.json @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", diff --git a/frontend/src/assets/i18n/es.json b/frontend/src/assets/i18n/es.json index f85192a60..fda087fee 100644 --- a/frontend/src/assets/i18n/es.json +++ b/frontend/src/assets/i18n/es.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Usuarios", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Marca compartida", "SUPPORT": "Soporte", "FEEDBACK": "Enviar feedback", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/gr.json b/frontend/src/assets/i18n/gr.json index 63a6a13ca..1aefd37bc 100644 --- a/frontend/src/assets/i18n/gr.json +++ b/frontend/src/assets/i18n/gr.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Users", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Co-Branding", "SUPPORT": "Υποστήριξη", "FEEDBACK": "Στείλετε τα σχόλιά σας", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/hr.json b/frontend/src/assets/i18n/hr.json index 3832c8dca..2b7653a8f 100644 --- a/frontend/src/assets/i18n/hr.json +++ b/frontend/src/assets/i18n/hr.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Korisnici", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Razvoj i suradnja", "SUPPORT": "Podrška", "FEEDBACK": "Molimo pošaljite nam svoje sugestije i komentare", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/pl.json b/frontend/src/assets/i18n/pl.json index cbe11c61a..cb33e8a91 100644 --- a/frontend/src/assets/i18n/pl.json +++ b/frontend/src/assets/i18n/pl.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Użytkownicy", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Wspólne oznaczenie", "SUPPORT": "Wsparcie", "FEEDBACK": "Wyślij opinię", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/pt.json b/frontend/src/assets/i18n/pt.json index 9a347827b..7b6c3fc1e 100644 --- a/frontend/src/assets/i18n/pt.json +++ b/frontend/src/assets/i18n/pt.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Utilizadores", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Co-Branding", "SUPPORT": "Suporte", "FEEDBACK": "Enviar comentários", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/sk.json b/frontend/src/assets/i18n/sk.json index 6f33012b4..0fe7a88f3 100644 --- a/frontend/src/assets/i18n/sk.json +++ b/frontend/src/assets/i18n/sk.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Používatelia", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Co-Branding", "SUPPORT": "Podpora", "FEEDBACK": "Poslať spätnú väzbu", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/sr.json b/frontend/src/assets/i18n/sr.json index 3d8a295fd..ad8760502 100644 --- a/frontend/src/assets/i18n/sr.json +++ b/frontend/src/assets/i18n/sr.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Korisnici", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Partnerstvo", "SUPPORT": "Podrška", "FEEDBACK": "Pošaljite nam sugestije i komentare", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/assets/i18n/tr.json b/frontend/src/assets/i18n/tr.json index 8c6948702..a49e934e2 100644 --- a/frontend/src/assets/i18n/tr.json +++ b/frontend/src/assets/i18n/tr.json @@ -73,7 +73,7 @@ "PLAN-INACTIVE-USER": "This plan contains users that are not exist", "PLAN-MISSING-USER-CONTACT-INFO": "This plan contains users that don't have contact info", "DESCRIPTION-TEMPLATE-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this description template.", - "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", + "PLAN-BLUEPRINT-NEW-VERSION-ALREADY-CREATED-DRAFT": "You have already created a new draft version for this blueprint.", "REFERENCE-TYPE-CODE-EXISTS": "The reference type code you provided already exists. Please choose a different code.", "PREFILLING-SOURCE-CODE-EXISTS": "The prefilling source code you provided already exists. Please choose a different code.", "DUPLICATE-PLAN-USER": "You can't invite authors with same role and plan section more than once", @@ -163,8 +163,8 @@ "DESCRIPTION-OVERVIEW": "Description Overview", "MAINTENANCE-TASKS": "Maintenance", "HOME": "Home", - "ANNOTATION-STATUSES":"Annotation Statuses", - "SUPPORTIVE-MATERIAL":"Supportive Material", + "ANNOTATION-STATUSES": "Annotation Statuses", + "SUPPORTIVE-MATERIAL": "Supportive Material", "USAGE-LIMITS": "Usage Limits" }, "FILE-TRANSFORMER": { @@ -253,8 +253,8 @@ "TENANT-CONFIGURATION": "Tenant Configuration", "ENTITY-LOCKS": "Entity Locks", "ANNOTATION-STATUSES": "Annotation Statuses", - "USERS":"Users", - "TENANT-USERS":"Tenant Users", + "USERS": "Users", + "TENANT-USERS": "Tenant Users", "NEW-USAGE-LIMIT": "New", "USAGE-LIMITS": "Usage Limits" }, @@ -302,7 +302,7 @@ "DESCRIPTION-TEMPLATE-TYPES": "Description Types", "PLAN-BLUEPRINTS": "DMP Blueprints", "USERS": "Kullanıcılar", - "TENANT-USERS":"Tenant Users", + "TENANT-USERS": "Tenant Users", "CO-BRANDING": "Birlikte Markalama", "SUPPORT": "Destek", "FEEDBACK": "Geribildirim Yolla", @@ -1020,10 +1020,11 @@ "SELECT-PLAN": "Select Plan", "PLAN-SECTION": "Select Section" }, - "PREFILL-DESCRIPTION-DIALOG": { + "NEW-DESCRIPTION-DIALOG": { "TITLE": "Initialize your Description", "OR": "OR", - "HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", + "DESCRIPTION-TEMPLATE-HINT": "Select the Template to be used for your Description.", + "PREFILL-HINT": "Select the item from Zenodo to automatically retrieve answers to some questions in your template or start by answering the questions manually.", "DESCRIPTION-TEMPLATE": "Description Template", "PREFILLING-SOURCE": "Prefilling Source", "SEARCH-HEADER": "Prefilled object", @@ -1263,7 +1264,7 @@ }, "ANNOTATION-SERVICE": { "TYPES": { - "INTERNAL-STATUS":{ + "INTERNAL-STATUS": { "RESOLVED": "Resolved" }, "IS-ACTIVE": { @@ -1289,7 +1290,7 @@ "APPLY-FILTERS": "Apply filters" }, "ACTIONS": { - "EDIT":"Edit", + "EDIT": "Edit", "DELETE": "Delete" } }, @@ -1297,7 +1298,7 @@ "TITLE-EDIT-ANNOTATION-STATUS": "Editing Annotation Status", "FIELDS": { "LABEL": "Label", - "INTERNAL-STATUS":"Internal Status" + "INTERNAL-STATUS": "Internal Status" }, "ACTIONS": { "SAVE": "Save", @@ -2057,6 +2058,8 @@ "PLAN-INVITATION-EXISTING-USER": "Plan Invitation Existing User", "PLAN-MODIFIED": "Plan Modified", "PLAN-FINALISED": "Plan Finalised", + "PLAN-ANNOTATION-CREATED": "Plan Annotation Created", + "PLAN-ANNOTATION-STATUS-CHANGED": "Plan Annotation Status Changed", "DESCRIPTION-CREATED": "Description Created", "DESCRIPTION-MODIFIED": "Description Modified", "DESCRIPTION-FINALISED": "Description Finalised", @@ -2363,4 +2366,4 @@ "copy": "Copy", "clone": "Clone", "new-version": "New Version" -} +} \ No newline at end of file diff --git a/frontend/src/notification-service/core/enum/notification-type.enum.ts b/frontend/src/notification-service/core/enum/notification-type.enum.ts index 71d52198f..64123d82d 100644 --- a/frontend/src/notification-service/core/enum/notification-type.enum.ts +++ b/frontend/src/notification-service/core/enum/notification-type.enum.ts @@ -4,8 +4,10 @@ export enum NotificationType { descriptionCreatedType = '8965b1d5-99a6-4acf-9016-c0d0ce341364', planModifiedType = '4542262a-22f8-4baa-9db6-1c8e70ac1dbb', planFinalisedType = '90db0b46-42de-bd89-aebf-6f27efeb256e', - descriptionAnnotationCreated = 'db1e99d2-a240-4e75-9bb2-ef25b234c1f0', - descriptionAnnotationStatusChanged = '3189e3a6-91e6-40c6-8ff8-275a68445aec', + planAnnotationCreatedType = '1cca80f5-2ea9-41ae-a204-9b4332216c24', + planAnnotationStatusChangedType = '0c8a5c62-e48f-4eca-99ee-a7f262477061', + descriptionAnnotationCreatedType = 'db1e99d2-a240-4e75-9bb2-ef25b234c1f0', + descriptionAnnotationStatusChangedType = '3189e3a6-91e6-40c6-8ff8-275a68445aec', descriptionModifiedType = '4fdbfa80-7a71-4a69-b854-67cbb70648f1', descriptionFinalisedType = '33790bad-94d4-488a-8ee2-7f6295ca18ea', mergeAccountConfirmationType = 'bfe68845-cb05-4c5a-a03d-29161a7c9660', diff --git a/frontend/src/notification-service/core/formatting/enum-utils.service.ts b/frontend/src/notification-service/core/formatting/enum-utils.service.ts index 862cb42cf..5d822fb51 100644 --- a/frontend/src/notification-service/core/formatting/enum-utils.service.ts +++ b/frontend/src/notification-service/core/formatting/enum-utils.service.ts @@ -32,11 +32,13 @@ export class NotificationServiceEnumUtils extends BaseEnumUtilsService { case NotificationType.planInvitationExistingUserType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PLAN-INVITATION-EXISTING-USER'); case NotificationType.planModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PLAN-MODIFIED'); case NotificationType.planFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PLAN-FINALISED'); + case NotificationType.planAnnotationCreatedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PLAN-ANNOTATION-CREATED'); + case NotificationType.planAnnotationStatusChangedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PLAN-ANNOTATION-STATUS-CHANGED'); case NotificationType.descriptionCreatedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-CREATED'); case NotificationType.descriptionModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-MODIFIED'); case NotificationType.descriptionFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-FINALISED'); - case NotificationType.descriptionAnnotationCreated: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-ANNOTATION-CREATED'); - case NotificationType.descriptionAnnotationStatusChanged: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-ANNOTATION-STATUS-CHANGED'); + case NotificationType.descriptionAnnotationCreatedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-ANNOTATION-CREATED'); + case NotificationType.descriptionAnnotationStatusChangedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-ANNOTATION-STATUS-CHANGED'); case NotificationType.mergeAccountConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.MERGE-ACCOUNT-CONFIRMATION'); case NotificationType.removeCredentialConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.REMOVE-CREDENTIAL-CONFIRMATION'); case NotificationType.planDepositType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PLAN-DEPOSIT');