implement description code
This commit is contained in:
parent
d02a113df0
commit
71923a006e
|
@ -14,6 +14,10 @@ public class DescriptionTemplateImportExport {
|
||||||
|
|
||||||
@XmlElement(name = "id")
|
@XmlElement(name = "id")
|
||||||
private UUID id;
|
private UUID id;
|
||||||
|
@XmlElement(name = "label")
|
||||||
|
private String label;
|
||||||
|
@XmlElement(name = "code")
|
||||||
|
private String code;
|
||||||
@XmlElement(name = "description")
|
@XmlElement(name = "description")
|
||||||
private String description;
|
private String description;
|
||||||
@XmlElement(name = "language")
|
@XmlElement(name = "language")
|
||||||
|
@ -36,6 +40,22 @@ public class DescriptionTemplateImportExport {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
public List<DescriptionTemplatePageImportExport> getPages() {
|
public List<DescriptionTemplatePageImportExport> getPages() {
|
||||||
return this.pages;
|
return this.pages;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,11 @@ public class DescriptionTemplateEntity extends TenantScopedBaseEntity {
|
||||||
public static final String _label = "label";
|
public static final String _label = "label";
|
||||||
public static final int _labelLength = 250;
|
public static final int _labelLength = 250;
|
||||||
|
|
||||||
|
@Column(name = "code", length = _codeLength, nullable = false)
|
||||||
|
private String code;
|
||||||
|
public final static String _code = "code";
|
||||||
|
public final static int _codeLength = 200;
|
||||||
|
|
||||||
@Type(SQLXMLType.class)
|
@Type(SQLXMLType.class)
|
||||||
@Column(name = "definition", nullable = false, columnDefinition = "xml")
|
@Column(name = "definition", nullable = false, columnDefinition = "xml")
|
||||||
private String definition;
|
private String definition;
|
||||||
|
@ -95,6 +100,14 @@ public class DescriptionTemplateEntity extends TenantScopedBaseEntity {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDefinition() {
|
public String getDefinition() {
|
||||||
return this.definition;
|
return this.definition;
|
||||||
}
|
}
|
||||||
|
|
|
@ -438,4 +438,24 @@ public class ErrorThesaurusProperties {
|
||||||
public void setReferenceTypeImportNotFound(ErrorDescription referenceTypeImportNotFound) {
|
public void setReferenceTypeImportNotFound(ErrorDescription referenceTypeImportNotFound) {
|
||||||
this.referenceTypeImportNotFound = referenceTypeImportNotFound;
|
this.referenceTypeImportNotFound = referenceTypeImportNotFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ErrorDescription descriptionTemplateCodeExists;
|
||||||
|
|
||||||
|
public ErrorDescription getDescriptionTemplateCodeExists() {
|
||||||
|
return descriptionTemplateCodeExists;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescriptionTemplateCodeExists(ErrorDescription descriptionTemplateCodeExists) {
|
||||||
|
this.descriptionTemplateCodeExists = descriptionTemplateCodeExists;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ErrorDescription descriptionTemplateImportNotFound;
|
||||||
|
|
||||||
|
public ErrorDescription getDescriptionTemplateImportNotFound() {
|
||||||
|
return descriptionTemplateImportNotFound;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescriptionTemplateImportNotFound(ErrorDescription descriptionTemplateImportNotFound) {
|
||||||
|
this.descriptionTemplateImportNotFound = descriptionTemplateImportNotFound;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,8 @@ public class DescriptionTemplateBuilder extends BaseBuilder<DescriptionTemplate,
|
||||||
m.setId(d.getId());
|
m.setId(d.getId());
|
||||||
if (fields.hasField(this.asIndexer(DescriptionTemplate._label)))
|
if (fields.hasField(this.asIndexer(DescriptionTemplate._label)))
|
||||||
m.setLabel(d.getLabel());
|
m.setLabel(d.getLabel());
|
||||||
|
if (fields.hasField(this.asIndexer(DescriptionTemplate._code)))
|
||||||
|
m.setCode(d.getCode());
|
||||||
if (fields.hasField(this.asIndexer(DescriptionTemplate._description)))
|
if (fields.hasField(this.asIndexer(DescriptionTemplate._description)))
|
||||||
m.setDescription(d.getDescription());
|
m.setDescription(d.getDescription());
|
||||||
if (fields.hasField(this.asIndexer(DescriptionTemplate._groupId)))
|
if (fields.hasField(this.asIndexer(DescriptionTemplate._groupId)))
|
||||||
|
|
|
@ -18,6 +18,9 @@ public class DescriptionTemplate {
|
||||||
public final static String _label = "label";
|
public final static String _label = "label";
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
|
public final static String _code = "code";
|
||||||
|
private String code;
|
||||||
|
|
||||||
public final static String _description = "description";
|
public final static String _description = "description";
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@ -79,6 +82,14 @@ public class DescriptionTemplate {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return this.description;
|
return this.description;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.opencdmp.commons.enums.DescriptionTemplateStatus;
|
||||||
import org.opencdmp.commons.validation.BaseValidator;
|
import org.opencdmp.commons.validation.BaseValidator;
|
||||||
import org.opencdmp.convention.ConventionService;
|
import org.opencdmp.convention.ConventionService;
|
||||||
import org.opencdmp.data.DescriptionTemplateEntity;
|
import org.opencdmp.data.DescriptionTemplateEntity;
|
||||||
|
import org.opencdmp.data.DescriptionTemplateTypeEntity;
|
||||||
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
||||||
import org.opencdmp.model.persist.descriptiontemplatedefinition.DefinitionPersist;
|
import org.opencdmp.model.persist.descriptiontemplatedefinition.DefinitionPersist;
|
||||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||||
|
@ -26,6 +27,11 @@ public class DescriptionTemplatePersist {
|
||||||
|
|
||||||
public static final String _label = "label";
|
public static final String _label = "label";
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
public final static String _code = "code";
|
||||||
|
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
public static final String _description = "description";
|
public static final String _description = "description";
|
||||||
|
@ -70,6 +76,14 @@ public class DescriptionTemplatePersist {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return this.description;
|
return this.description;
|
||||||
}
|
}
|
||||||
|
@ -165,6 +179,14 @@ public class DescriptionTemplatePersist {
|
||||||
.iff(() -> !this.isEmpty(item.getLabel()))
|
.iff(() -> !this.isEmpty(item.getLabel()))
|
||||||
.must(() -> this.lessEqualLength(item.getLabel(), DescriptionTemplateEntity._labelLength))
|
.must(() -> this.lessEqualLength(item.getLabel(), DescriptionTemplateEntity._labelLength))
|
||||||
.failOn(DescriptionTemplatePersist._label).failWith(this.messageSource.getMessage("Validation_MaxLength", new Object[]{DescriptionTemplatePersist._label}, LocaleContextHolder.getLocale())),
|
.failOn(DescriptionTemplatePersist._label).failWith(this.messageSource.getMessage("Validation_MaxLength", new Object[]{DescriptionTemplatePersist._label}, LocaleContextHolder.getLocale())),
|
||||||
|
this.spec()
|
||||||
|
.iff(() -> item.getStatus() == DescriptionTemplateStatus.Finalized)
|
||||||
|
.must(() -> !this.isEmpty(item.getCode()))
|
||||||
|
.failOn(DescriptionTemplatePersist._code).failWith(messageSource.getMessage("Validation_Required", new Object[]{DescriptionTemplatePersist._code}, LocaleContextHolder.getLocale())),
|
||||||
|
this.spec()
|
||||||
|
.iff(() -> !this.isEmpty(item.getCode()))
|
||||||
|
.must(() -> this.lessEqualLength(item.getCode(), DescriptionTemplateTypeEntity._codeLength))
|
||||||
|
.failOn(DescriptionTemplatePersist._code).failWith(messageSource.getMessage("Validation_MaxLength", new Object[]{DescriptionTemplatePersist._code}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.iff(() -> item.getStatus() == DescriptionTemplateStatus.Finalized)
|
.iff(() -> item.getStatus() == DescriptionTemplateStatus.Finalized)
|
||||||
.must(() -> !this.isEmpty(item.getDescription()))
|
.must(() -> !this.isEmpty(item.getDescription()))
|
||||||
|
|
|
@ -6,6 +6,7 @@ import gr.cite.tools.validation.ValidatorFactory;
|
||||||
import gr.cite.tools.validation.specification.Specification;
|
import gr.cite.tools.validation.specification.Specification;
|
||||||
import org.opencdmp.convention.ConventionService;
|
import org.opencdmp.convention.ConventionService;
|
||||||
import org.opencdmp.data.DescriptionTemplateEntity;
|
import org.opencdmp.data.DescriptionTemplateEntity;
|
||||||
|
import org.opencdmp.data.DescriptionTemplateTypeEntity;
|
||||||
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
||||||
import org.opencdmp.model.persist.descriptiontemplatedefinition.DefinitionPersist;
|
import org.opencdmp.model.persist.descriptiontemplatedefinition.DefinitionPersist;
|
||||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||||
|
@ -26,6 +27,10 @@ public class NewVersionDescriptionTemplatePersist {
|
||||||
|
|
||||||
public static final String _label = "label";
|
public static final String _label = "label";
|
||||||
|
|
||||||
|
private String code = null;
|
||||||
|
|
||||||
|
public static final String _code = "code";
|
||||||
|
|
||||||
private String description = null;
|
private String description = null;
|
||||||
|
|
||||||
public static final String _description = "description";
|
public static final String _description = "description";
|
||||||
|
@ -70,6 +75,14 @@ public class NewVersionDescriptionTemplatePersist {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
@ -161,6 +174,14 @@ public class NewVersionDescriptionTemplatePersist {
|
||||||
.iff(() -> !this.isEmpty(item.getLabel()))
|
.iff(() -> !this.isEmpty(item.getLabel()))
|
||||||
.must(() -> this.lessEqualLength(item.getLabel(), DescriptionTemplateEntity._labelLength))
|
.must(() -> this.lessEqualLength(item.getLabel(), DescriptionTemplateEntity._labelLength))
|
||||||
.failOn(NewVersionDescriptionTemplatePersist._label).failWith(messageSource.getMessage("Validation_MaxLength", new Object[]{NewVersionDescriptionTemplatePersist._label}, LocaleContextHolder.getLocale())),
|
.failOn(NewVersionDescriptionTemplatePersist._label).failWith(messageSource.getMessage("Validation_MaxLength", new Object[]{NewVersionDescriptionTemplatePersist._label}, LocaleContextHolder.getLocale())),
|
||||||
|
this.spec()
|
||||||
|
.iff(() -> item.getStatus() == DescriptionTemplateStatus.Finalized)
|
||||||
|
.must(() -> !this.isEmpty(item.getCode()))
|
||||||
|
.failOn(NewVersionDescriptionTemplatePersist._code).failWith(messageSource.getMessage("Validation_Required", new Object[]{NewVersionDescriptionTemplatePersist._code}, LocaleContextHolder.getLocale())),
|
||||||
|
this.spec()
|
||||||
|
.iff(() -> !this.isEmpty(item.getCode()))
|
||||||
|
.must(() -> this.lessEqualLength(item.getCode(), DescriptionTemplateTypeEntity._codeLength))
|
||||||
|
.failOn(NewVersionDescriptionTemplatePersist._code).failWith(messageSource.getMessage("Validation_MaxLength", new Object[]{NewVersionDescriptionTemplatePersist._code}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
this.spec()
|
||||||
.must(() -> !this.isEmpty(item.getDescription()))
|
.must(() -> !this.isEmpty(item.getDescription()))
|
||||||
.failOn(NewVersionDescriptionTemplatePersist._description).failWith(messageSource.getMessage("Validation_Required", new Object[]{NewVersionDescriptionTemplatePersist._description}, LocaleContextHolder.getLocale())),
|
.failOn(NewVersionDescriptionTemplatePersist._description).failWith(messageSource.getMessage("Validation_Required", new Object[]{NewVersionDescriptionTemplatePersist._description}, LocaleContextHolder.getLocale())),
|
||||||
|
|
|
@ -57,6 +57,8 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
||||||
|
|
||||||
private EnumSet<AuthorizationFlags> authorize = EnumSet.of(AuthorizationFlags.None);
|
private EnumSet<AuthorizationFlags> authorize = EnumSet.of(AuthorizationFlags.None);
|
||||||
|
|
||||||
|
private Collection<String> codes;
|
||||||
|
|
||||||
public DescriptionTemplateQuery like(String value) {
|
public DescriptionTemplateQuery like(String value) {
|
||||||
this.like = value;
|
this.like = value;
|
||||||
return this;
|
return this;
|
||||||
|
@ -212,6 +214,21 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DescriptionTemplateQuery codes(String value) {
|
||||||
|
this.codes = List.of(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DescriptionTemplateQuery codes(String... value) {
|
||||||
|
this.codes = Arrays.asList(value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DescriptionTemplateQuery codes(Collection<String> values) {
|
||||||
|
this.codes = values;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public DescriptionTemplateQuery authorize(EnumSet<AuthorizationFlags> values) {
|
public DescriptionTemplateQuery authorize(EnumSet<AuthorizationFlags> values) {
|
||||||
this.authorize = values;
|
this.authorize = values;
|
||||||
return this;
|
return this;
|
||||||
|
@ -312,7 +329,8 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
||||||
}
|
}
|
||||||
if (this.like != null && !this.like.isBlank()) {
|
if (this.like != null && !this.like.isBlank()) {
|
||||||
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateEntity._label), this.like),
|
predicates.add(queryContext.CriteriaBuilder.or(this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateEntity._label), this.like),
|
||||||
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateEntity._description), this.like)
|
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateEntity._description), this.like),
|
||||||
|
this.queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(DescriptionTemplateEntity._code), this.like)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if (this.isActives != null) {
|
if (this.isActives != null) {
|
||||||
|
@ -355,6 +373,12 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
||||||
Predicate afterClause = queryContext.CriteriaBuilder.greaterThanOrEqualTo(queryContext.Root.get(PlanEntity._createdAt), this.after);
|
Predicate afterClause = queryContext.CriteriaBuilder.greaterThanOrEqualTo(queryContext.Root.get(PlanEntity._createdAt), this.after);
|
||||||
predicates.add(afterClause);
|
predicates.add(afterClause);
|
||||||
}
|
}
|
||||||
|
if (this.codes != null) {
|
||||||
|
CriteriaBuilder.In<String> inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(DescriptionTemplateEntity._code));
|
||||||
|
for (String item : this.codes)
|
||||||
|
inClause.value(item);
|
||||||
|
predicates.add(inClause);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.onlyCanEdit != null) {
|
if (this.onlyCanEdit != null) {
|
||||||
boolean canEdit = this.authService.authorize(Permission.EditDescriptionTemplate);
|
boolean canEdit = this.authService.authorize(Permission.EditDescriptionTemplate);
|
||||||
|
@ -394,6 +418,7 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
||||||
item.setId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._id, UUID.class));
|
item.setId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._id, UUID.class));
|
||||||
item.setTenantId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._tenantId, UUID.class));
|
item.setTenantId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._tenantId, UUID.class));
|
||||||
item.setLabel(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._label, String.class));
|
item.setLabel(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._label, String.class));
|
||||||
|
item.setCode(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._code, String.class));
|
||||||
item.setDefinition(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._definition, String.class));
|
item.setDefinition(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._definition, String.class));
|
||||||
item.setDescription(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._description, String.class));
|
item.setDescription(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._description, String.class));
|
||||||
item.setGroupId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._groupId, UUID.class));
|
item.setGroupId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._groupId, UUID.class));
|
||||||
|
@ -414,6 +439,8 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
||||||
return DescriptionTemplateEntity._id;
|
return DescriptionTemplateEntity._id;
|
||||||
else if (item.match(DescriptionTemplate._label))
|
else if (item.match(DescriptionTemplate._label))
|
||||||
return DescriptionTemplateEntity._label;
|
return DescriptionTemplateEntity._label;
|
||||||
|
else if (item.match(DescriptionTemplate._code))
|
||||||
|
return DescriptionTemplateEntity._code;
|
||||||
else if (item.prefix(DescriptionTemplate._definition))
|
else if (item.prefix(DescriptionTemplate._definition))
|
||||||
return DescriptionTemplateEntity._definition;
|
return DescriptionTemplateEntity._definition;
|
||||||
else if (item.match(DescriptionTemplate._definition))
|
else if (item.match(DescriptionTemplate._definition))
|
||||||
|
|
|
@ -1367,14 +1367,18 @@ public class DescriptionServiceImpl implements DescriptionService {
|
||||||
if (descriptionXml.getDescriptionTemplate() != null) {
|
if (descriptionXml.getDescriptionTemplate() != null) {
|
||||||
|
|
||||||
|
|
||||||
DescriptionTemplateEntity descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().ids(descriptionXml.getDescriptionTemplate().getId()).first();
|
DescriptionTemplateEntity descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().ids(UUID.randomUUID()).first();
|
||||||
if (descriptionTemplateEntity == null) descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().groupIds(descriptionXml.getDescriptionTemplate().getGroupId()).versionStatuses(DescriptionTemplateVersionStatus.Current).isActive(IsActive.Active).statuses(DescriptionTemplateStatus.Finalized).first();
|
if (descriptionTemplateEntity == null) descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().groupIds(UUID.randomUUID()).versionStatuses(DescriptionTemplateVersionStatus.Current).isActive(IsActive.Active).statuses(DescriptionTemplateStatus.Finalized).first();
|
||||||
UUID descriptionTemplateId;
|
UUID descriptionTemplateId;
|
||||||
if (descriptionTemplateEntity != null){
|
if (descriptionTemplateEntity != null){
|
||||||
descriptionTemplateId = descriptionTemplateEntity.getId();
|
descriptionTemplateId = descriptionTemplateEntity.getId();
|
||||||
} else {
|
} else {
|
||||||
DescriptionTemplate persisted = this.descriptionTemplateService.importXml(descriptionXml.getDescriptionTemplate(), null, descriptionXml.getDescriptionTemplate().getDescription(), new BaseFieldSet().ensure(PlanBlueprint._label).ensure(PlanBlueprint._hash));
|
descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(descriptionXml.getDescriptionTemplate().getCode()).first();
|
||||||
descriptionTemplateId = persisted.getId();
|
if (descriptionTemplateEntity == null) {
|
||||||
|
throw new MyValidationException(this.errors.getDescriptionTemplateImportNotFound().getCode(), descriptionXml.getDescriptionTemplate().getCode());
|
||||||
|
} else {
|
||||||
|
descriptionTemplateId = descriptionTemplateEntity.getId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return descriptionTemplateId;
|
return descriptionTemplateId;
|
||||||
|
|
|
@ -205,14 +205,20 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
|
|
||||||
data.setDescription(model.getDescription());
|
data.setDescription(model.getDescription());
|
||||||
data.setLabel(model.getLabel());
|
data.setLabel(model.getLabel());
|
||||||
|
data.setCode(model.getCode());
|
||||||
data.setTypeId(model.getType());
|
data.setTypeId(model.getType());
|
||||||
data.setLanguage(model.getLanguage());
|
data.setLanguage(model.getLanguage());
|
||||||
data.setStatus(model.getStatus());
|
data.setStatus(model.getStatus());
|
||||||
data.setUpdatedAt(Instant.now());
|
data.setUpdatedAt(Instant.now());
|
||||||
data.setDefinition(this.xmlHandlingService.toXml(this.buildDefinitionEntity(model.getDefinition())));
|
data.setDefinition(this.xmlHandlingService.toXml(this.buildDefinitionEntity(model.getDefinition())));
|
||||||
if (isUpdate)
|
|
||||||
|
Long descriptionTemplateCodes = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(model.getCode()).count();
|
||||||
|
|
||||||
|
if (isUpdate) {
|
||||||
|
if (descriptionTemplateCodes > 1) throw new MyValidationException(this.errors.getDescriptionTemplateCodeExists().getCode(), this.errors.getDescriptionTemplateCodeExists().getMessage());
|
||||||
this.entityManager.merge(data);
|
this.entityManager.merge(data);
|
||||||
else {
|
} else {
|
||||||
|
if (descriptionTemplateCodes > 0) throw new MyValidationException(this.errors.getDescriptionTemplateCodeExists().getCode(), this.errors.getDescriptionTemplateCodeExists().getMessage());
|
||||||
this.entityManager.persist(data);
|
this.entityManager.persist(data);
|
||||||
this.accountingService.increase(UsageLimitTargetMetric.DESCRIPTION_TEMPLATE_COUNT.getValue());
|
this.accountingService.increase(UsageLimitTargetMetric.DESCRIPTION_TEMPLATE_COUNT.getValue());
|
||||||
}
|
}
|
||||||
|
@ -544,6 +550,7 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{id, DescriptionTemplate.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{id, DescriptionTemplate.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
||||||
|
|
||||||
model.setLabel(model.getLabel() + " new ");
|
model.setLabel(model.getLabel() + " new ");
|
||||||
|
model.setCode(model.getCode());
|
||||||
model.setId(null);
|
model.setId(null);
|
||||||
model.setHash(null);
|
model.setHash(null);
|
||||||
model.setStatus(DescriptionTemplateStatus.Draft);
|
model.setStatus(DescriptionTemplateStatus.Draft);
|
||||||
|
@ -715,11 +722,14 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
data.setVersion((short) (oldDescriptionTemplateEntity.getVersion() + 1));
|
data.setVersion((short) (oldDescriptionTemplateEntity.getVersion() + 1));
|
||||||
data.setDescription(model.getDescription());
|
data.setDescription(model.getDescription());
|
||||||
data.setLabel(model.getLabel());
|
data.setLabel(model.getLabel());
|
||||||
|
data.setCode(model.getCode());
|
||||||
data.setTypeId(model.getType());
|
data.setTypeId(model.getType());
|
||||||
data.setLanguage(model.getLanguage());
|
data.setLanguage(model.getLanguage());
|
||||||
data.setStatus(model.getStatus());
|
data.setStatus(model.getStatus());
|
||||||
data.setDefinition(this.xmlHandlingService.toXml(this.buildDefinitionEntity(model.getDefinition())));
|
data.setDefinition(this.xmlHandlingService.toXml(this.buildDefinitionEntity(model.getDefinition())));
|
||||||
|
|
||||||
|
Long descriptionTemplateCodes = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(model.getCode()).count();
|
||||||
|
if (descriptionTemplateCodes > 0) throw new MyValidationException(this.errors.getDescriptionTemplateCodeExists().getCode(), this.errors.getDescriptionTemplateCodeExists().getMessage());
|
||||||
this.entityManager.persist(data);
|
this.entityManager.persist(data);
|
||||||
|
|
||||||
this.persistUsers(data.getId(), model.getUsers());
|
this.persistUsers(data.getId(), model.getUsers());
|
||||||
|
@ -756,6 +766,7 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
if (activeDescriptionTemplatesForTheGroup == 0) {
|
if (activeDescriptionTemplatesForTheGroup == 0) {
|
||||||
DescriptionTemplatePersist persist = new DescriptionTemplatePersist();
|
DescriptionTemplatePersist persist = new DescriptionTemplatePersist();
|
||||||
persist.setLabel(label);
|
persist.setLabel(label);
|
||||||
|
persist.setCode(importXml.getCode());
|
||||||
persist.setStatus(DescriptionTemplateStatus.Draft);
|
persist.setStatus(DescriptionTemplateStatus.Draft);
|
||||||
persist.setDescription(importXml.getDescription());
|
persist.setDescription(importXml.getDescription());
|
||||||
persist.setLanguage(importXml.getLanguage());
|
persist.setLanguage(importXml.getLanguage());
|
||||||
|
@ -775,6 +786,7 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
NewVersionDescriptionTemplatePersist persist = new NewVersionDescriptionTemplatePersist();
|
NewVersionDescriptionTemplatePersist persist = new NewVersionDescriptionTemplatePersist();
|
||||||
persist.setId(latestVersionDescriptionTemplate.getId());
|
persist.setId(latestVersionDescriptionTemplate.getId());
|
||||||
persist.setLabel(label);
|
persist.setLabel(label);
|
||||||
|
persist.setCode(importXml.getCode());
|
||||||
persist.setStatus(DescriptionTemplateStatus.Draft);
|
persist.setStatus(DescriptionTemplateStatus.Draft);
|
||||||
persist.setDescription(importXml.getDescription());
|
persist.setDescription(importXml.getDescription());
|
||||||
persist.setLanguage(importXml.getLanguage());
|
persist.setLanguage(importXml.getLanguage());
|
||||||
|
@ -988,6 +1000,8 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
private DescriptionTemplateImportExport definitionXmlToExport(DescriptionTemplateEntity data, DefinitionEntity entity) throws InvalidApplicationException {
|
private DescriptionTemplateImportExport definitionXmlToExport(DescriptionTemplateEntity data, DefinitionEntity entity) throws InvalidApplicationException {
|
||||||
DescriptionTemplateImportExport xml = new DescriptionTemplateImportExport();
|
DescriptionTemplateImportExport xml = new DescriptionTemplateImportExport();
|
||||||
xml.setId(data.getId());
|
xml.setId(data.getId());
|
||||||
|
xml.setLabel(data.getLabel());
|
||||||
|
xml.setCode(data.getCode());
|
||||||
xml.setDescriptionTemplateType(this.descriptionTemplateTypeXmlToExport(data.getTypeId()));
|
xml.setDescriptionTemplateType(this.descriptionTemplateTypeXmlToExport(data.getTypeId()));
|
||||||
xml.setLanguage(data.getLanguage());
|
xml.setLanguage(data.getLanguage());
|
||||||
xml.setDescription(data.getDescription());
|
xml.setDescription(data.getDescription());
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class DescriptionTemplateTypeServiceImpl implements DescriptionTemplateTy
|
||||||
data.setStatus(model.getStatus());
|
data.setStatus(model.getStatus());
|
||||||
data.setUpdatedAt(Instant.now());
|
data.setUpdatedAt(Instant.now());
|
||||||
|
|
||||||
Long descriptionTemplateTypeCodes = this.queryFactory.query(DescriptionTemplateTypeQuery.class).disableTracking().codes(model.getCode()).isActive(IsActive.Active).count();
|
Long descriptionTemplateTypeCodes = this.queryFactory.query(DescriptionTemplateTypeQuery.class).disableTracking().codes(model.getCode()).count();
|
||||||
|
|
||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
if (descriptionTemplateTypeCodes > 1) throw new MyValidationException(this.errors.getDescriptionTemplateTypeCodeExists().getCode(), this.errors.getDescriptionTemplateTypeCodeExists().getMessage());
|
if (descriptionTemplateTypeCodes > 1) throw new MyValidationException(this.errors.getDescriptionTemplateTypeCodeExists().getCode(), this.errors.getDescriptionTemplateTypeCodeExists().getMessage());
|
||||||
|
|
|
@ -137,3 +137,9 @@ error-thesaurus:
|
||||||
referenceTypeImportNotFound:
|
referenceTypeImportNotFound:
|
||||||
code: 149
|
code: 149
|
||||||
message: Reference type not found
|
message: Reference type not found
|
||||||
|
descriptionTemplateCodeExists:
|
||||||
|
code: 150
|
||||||
|
message: Description template code exists
|
||||||
|
descriptionTemplateImportNotFound:
|
||||||
|
code: 151
|
||||||
|
message: Description template code exists
|
|
@ -0,0 +1,13 @@
|
||||||
|
DO $$DECLARE
|
||||||
|
this_version CONSTANT varchar := '00.01.069';
|
||||||
|
BEGIN
|
||||||
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
||||||
|
IF FOUND THEN RETURN; END IF;
|
||||||
|
|
||||||
|
ALTER TABLE public."DescriptionTemplate" ADD COLUMN code character varying(200);
|
||||||
|
UPDATE public."DescriptionTemplate" SET code = uuid_generate_v4();
|
||||||
|
ALTER TABLE public."DescriptionTemplate" ALTER COLUMN code SET NOT NULL;
|
||||||
|
|
||||||
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.069', '2024-07-26 12:00:00.000000+02', now(), 'Add DescriptionTemplate code column.');
|
||||||
|
|
||||||
|
END$$;
|
|
@ -45,6 +45,8 @@ export enum ResponseErrorCode {
|
||||||
DescriptionTemplateTypeCodeExists = 147,
|
DescriptionTemplateTypeCodeExists = 147,
|
||||||
descriptionTemplateTypeImportNotFound = 148,
|
descriptionTemplateTypeImportNotFound = 148,
|
||||||
referenceTypeImportNotFound = 149,
|
referenceTypeImportNotFound = 149,
|
||||||
|
descriptionTemplateCodeExists = 150,
|
||||||
|
descriptionTemplateImportNotFound = 151,
|
||||||
|
|
||||||
// Notification & Annotation Errors
|
// Notification & Annotation Errors
|
||||||
InvalidApiKey = 200,
|
InvalidApiKey = 200,
|
||||||
|
@ -169,6 +171,10 @@ export class ResponseErrorCodeHelper {
|
||||||
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND");
|
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND");
|
||||||
case ResponseErrorCode.referenceTypeImportNotFound:
|
case ResponseErrorCode.referenceTypeImportNotFound:
|
||||||
return language.instant("GENERAL.BACKEND-ERRORS.REFERENCE-TYPE-IMPORT-NOT-FOUND");
|
return language.instant("GENERAL.BACKEND-ERRORS.REFERENCE-TYPE-IMPORT-NOT-FOUND");
|
||||||
|
case ResponseErrorCode.descriptionTemplateCodeExists:
|
||||||
|
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-CODE-EXISTS");
|
||||||
|
case ResponseErrorCode.descriptionTemplateImportNotFound:
|
||||||
|
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND");
|
||||||
default:
|
default:
|
||||||
return language.instant("GENERAL.SNACK-BAR.NOT-FOUND");
|
return language.instant("GENERAL.SNACK-BAR.NOT-FOUND");
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { ReferencePersist } from "../reference/reference";
|
||||||
|
|
||||||
export interface DescriptionTemplatePersist extends BaseEntityPersist {
|
export interface DescriptionTemplatePersist extends BaseEntityPersist {
|
||||||
label: string;
|
label: string;
|
||||||
|
code: string;
|
||||||
description: string;
|
description: string;
|
||||||
language: string;
|
language: string;
|
||||||
type: Guid;
|
type: Guid;
|
||||||
|
@ -20,6 +21,7 @@ export interface DescriptionTemplatePersist extends BaseEntityPersist {
|
||||||
|
|
||||||
export interface NewVersionDescriptionTemplatePersist extends BaseEntityPersist {
|
export interface NewVersionDescriptionTemplatePersist extends BaseEntityPersist {
|
||||||
label: string;
|
label: string;
|
||||||
|
code: string;
|
||||||
description: string;
|
description: string;
|
||||||
language: string;
|
language: string;
|
||||||
type: Guid;
|
type: Guid;
|
||||||
|
|
|
@ -15,6 +15,7 @@ import { AppPermission } from "@app/core/common/enum/permission.enum";
|
||||||
|
|
||||||
export interface DescriptionTemplate extends BaseEntity {
|
export interface DescriptionTemplate extends BaseEntity {
|
||||||
label?: string;
|
label?: string;
|
||||||
|
code?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
groupId?: Guid;
|
groupId?: Guid;
|
||||||
version?: string;
|
version?: string;
|
||||||
|
|
|
@ -45,7 +45,16 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.2 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION'| translate}} *</div>
|
<div class="heading">1.2 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-CODE'| translate}} *</div>
|
||||||
|
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-CODE-HINT'| translate}}</div>
|
||||||
|
<mat-form-field class="full-width basic-info-input">
|
||||||
|
<input matInput [formControl]="formGroup.get('code')" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.FIELDS.CODE' | translate}}">
|
||||||
|
<mat-error *ngIf="formGroup.get('code').hasError('backendError')">{{formGroup.get('code').getError('backendError').message}}</mat-error>
|
||||||
|
<mat-error *ngIf="formGroup.get('code').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="heading">1.3 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION'| translate}} *</div>
|
||||||
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-HINT'| translate}}</div>
|
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-HINT'| translate}}</div>
|
||||||
<div class="full-width basic-info-input">
|
<div class="full-width basic-info-input">
|
||||||
<rich-text-editor-component [form]="formGroup.get('description')" [placeholder]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-PLACEHOLDER'" [wrapperClasses]="(formGroup.get('description').touched && formGroup.get('description').hasError('required')) ? 'required' : ''" [editable]="formGroup.controls['description'].status !== 'DISABLED'">
|
<rich-text-editor-component [form]="formGroup.get('description')" [placeholder]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-DESCRIPTION-PLACEHOLDER'" [wrapperClasses]="(formGroup.get('description').touched && formGroup.get('description').hasError('required')) ? 'required' : ''" [editable]="formGroup.controls['description'].status !== 'DISABLED'">
|
||||||
|
@ -58,7 +67,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.3 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-TYPE'| translate}} *</div>
|
<div class="heading">1.4 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-TYPE'| translate}} *</div>
|
||||||
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-TYPE-HINT'| translate}}</div>
|
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-TYPE-HINT'| translate}}</div>
|
||||||
<mat-form-field class="full-width basic-info-input">
|
<mat-form-field class="full-width basic-info-input">
|
||||||
<mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-SELECT-TYPE' | translate}}</mat-label>
|
<mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-SELECT-TYPE' | translate}}</mat-label>
|
||||||
|
@ -69,7 +78,7 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.4 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-LANGUAGE'| translate}} *</div>
|
<div class="heading">1.5 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-LANGUAGE'| translate}} *</div>
|
||||||
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-LANGUAGE-HINT'| translate}}</div>
|
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-LANGUAGE-HINT'| translate}}</div>
|
||||||
<mat-form-field class="full-width basic-info-input">
|
<mat-form-field class="full-width basic-info-input">
|
||||||
<mat-select [formControl]="formGroup.get('language')" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-SELECT-LANGUAGE'| translate}}">
|
<mat-select [formControl]="formGroup.get('language')" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-SELECT-LANGUAGE'| translate}}">
|
||||||
|
@ -82,7 +91,7 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.5 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS'| translate}}</div>
|
<div class="heading">1.6 {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS'| translate}}</div>
|
||||||
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS-HINT'| translate}}</div>
|
<div class="hint">{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-USERS-HINT'| translate}}</div>
|
||||||
<div class="full-width basic-info-input">
|
<div class="full-width basic-info-input">
|
||||||
<table class="col-12 user-table">
|
<table class="col-12 user-table">
|
||||||
|
|
|
@ -16,6 +16,7 @@ import { EditorCustomValidators } from "./custom-validators/editor-custom-valida
|
||||||
|
|
||||||
export class DescriptionTemplateEditorModel extends BaseEditorModel implements DescriptionTemplatePersist {
|
export class DescriptionTemplateEditorModel extends BaseEditorModel implements DescriptionTemplatePersist {
|
||||||
label: string;
|
label: string;
|
||||||
|
code: string;
|
||||||
description: string;
|
description: string;
|
||||||
language: string;
|
language: string;
|
||||||
type: Guid;
|
type: Guid;
|
||||||
|
@ -33,6 +34,7 @@ export class DescriptionTemplateEditorModel extends BaseEditorModel implements D
|
||||||
if (item) {
|
if (item) {
|
||||||
super.fromModel(item);
|
super.fromModel(item);
|
||||||
this.label = item.label;
|
this.label = item.label;
|
||||||
|
this.code = item.code;
|
||||||
this.description = item.description;
|
this.description = item.description;
|
||||||
this.language = item.language;
|
this.language = item.language;
|
||||||
this.type = item.type?.id;
|
this.type = item.type?.id;
|
||||||
|
@ -49,6 +51,7 @@ export class DescriptionTemplateEditorModel extends BaseEditorModel implements D
|
||||||
return this.formBuilder.group({
|
return this.formBuilder.group({
|
||||||
id: [{ value: this.id, disabled: disabled }, context.getValidation('id').validators],
|
id: [{ value: this.id, disabled: disabled }, context.getValidation('id').validators],
|
||||||
label: [{ value: this.label, disabled: disabled }, context.getValidation('label').validators],
|
label: [{ value: this.label, disabled: disabled }, context.getValidation('label').validators],
|
||||||
|
code: [{ value: this.code, disabled: disabled }, context.getValidation('code').validators],
|
||||||
description: [{ value: this.description, disabled: disabled }, context.getValidation('description').validators],
|
description: [{ value: this.description, disabled: disabled }, context.getValidation('description').validators],
|
||||||
language: [{ value: this.language, disabled: disabled }, context.getValidation('language').validators],
|
language: [{ value: this.language, disabled: disabled }, context.getValidation('language').validators],
|
||||||
type: [{ value: this.type, disabled: disabled }, context.getValidation('type').validators],
|
type: [{ value: this.type, disabled: disabled }, context.getValidation('type').validators],
|
||||||
|
@ -72,6 +75,7 @@ export class DescriptionTemplateEditorModel extends BaseEditorModel implements D
|
||||||
const baseValidationArray: Validation[] = new Array<Validation>();
|
const baseValidationArray: Validation[] = new Array<Validation>();
|
||||||
baseValidationArray.push({ key: 'id', validators: [BackendErrorValidator(this.validationErrorModel, 'id')] });
|
baseValidationArray.push({ key: 'id', validators: [BackendErrorValidator(this.validationErrorModel, 'id')] });
|
||||||
baseValidationArray.push({ key: 'label', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'label')] });
|
baseValidationArray.push({ key: 'label', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'label')] });
|
||||||
|
baseValidationArray.push({ key: 'code', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'code')] });
|
||||||
baseValidationArray.push({ key: 'description', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'description')] });
|
baseValidationArray.push({ key: 'description', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'description')] });
|
||||||
baseValidationArray.push({ key: 'language', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'language')] });
|
baseValidationArray.push({ key: 'language', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'language')] });
|
||||||
baseValidationArray.push({ key: 'type', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'type')] });
|
baseValidationArray.push({ key: 'type', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'type')] });
|
||||||
|
|
|
@ -25,6 +25,7 @@ export class DescriptionTemplateEditorResolver extends BaseEditorResolver {
|
||||||
...BaseEditorResolver.lookupFields(),
|
...BaseEditorResolver.lookupFields(),
|
||||||
nameof<DescriptionTemplate>(x => x.id),
|
nameof<DescriptionTemplate>(x => x.id),
|
||||||
nameof<DescriptionTemplate>(x => x.label),
|
nameof<DescriptionTemplate>(x => x.label),
|
||||||
|
nameof<DescriptionTemplate>(x => x.code),
|
||||||
nameof<DescriptionTemplate>(x => x.status),
|
nameof<DescriptionTemplate>(x => x.status),
|
||||||
nameof<DescriptionTemplate>(x => x.description),
|
nameof<DescriptionTemplate>(x => x.description),
|
||||||
nameof<DescriptionTemplate>(x => x.language),
|
nameof<DescriptionTemplate>(x => x.language),
|
||||||
|
|
|
@ -56,6 +56,7 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
||||||
private readonly lookupFields: string[] = [
|
private readonly lookupFields: string[] = [
|
||||||
nameof<DescriptionTemplate>(x => x.id),
|
nameof<DescriptionTemplate>(x => x.id),
|
||||||
nameof<DescriptionTemplate>(x => x.label),
|
nameof<DescriptionTemplate>(x => x.label),
|
||||||
|
nameof<DescriptionTemplate>(x => x.code),
|
||||||
nameof<DescriptionTemplate>(x => x.description),
|
nameof<DescriptionTemplate>(x => x.description),
|
||||||
nameof<DescriptionTemplate>(x => x.status),
|
nameof<DescriptionTemplate>(x => x.status),
|
||||||
nameof<DescriptionTemplate>(x => x.version),
|
nameof<DescriptionTemplate>(x => x.version),
|
||||||
|
@ -140,6 +141,11 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
||||||
sortable: true,
|
sortable: true,
|
||||||
languageName: 'DESCRIPTION-TEMPLATE-LISTING.FIELDS.NAME'
|
languageName: 'DESCRIPTION-TEMPLATE-LISTING.FIELDS.NAME'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: nameof<DescriptionTemplate>(x => x.code),
|
||||||
|
sortable: true,
|
||||||
|
languageName: 'DESCRIPTION-TEMPLATE-LISTING.FIELDS.CODE'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: nameof<DescriptionTemplate>(x => x.description),
|
prop: nameof<DescriptionTemplate>(x => x.description),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { takeUntil } from 'rxjs/operators';
|
||||||
import { PlanUploadDialogComponent } from '../upload-dialogue/plan-upload-dialog.component';
|
import { PlanUploadDialogComponent } from '../upload-dialogue/plan-upload-dialog.component';
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||||
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-start-new-plan',
|
selector: 'app-start-new-plan',
|
||||||
|
@ -30,7 +31,8 @@ export class StartNewPlanDialogComponent extends BaseComponent {
|
||||||
private planService: PlanService,
|
private planService: PlanService,
|
||||||
private httpClient: HttpClient,
|
private httpClient: HttpClient,
|
||||||
private analyticsService: AnalyticsService,
|
private analyticsService: AnalyticsService,
|
||||||
private routerUtils: RouterUtilsService
|
private routerUtils: RouterUtilsService,
|
||||||
|
private httpErrorHandlingService: HttpErrorHandlingService,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.isDialog = data.isDialog;
|
this.isDialog = data.isDialog;
|
||||||
|
@ -77,7 +79,7 @@ export class StartNewPlanDialogComponent extends BaseComponent {
|
||||||
this.onCallbackImportComplete();
|
this.onCallbackImportComplete();
|
||||||
this.dialog.closeAll();
|
this.dialog.closeAll();
|
||||||
},
|
},
|
||||||
(error) => this.onCallbackImportFail(error.error)
|
(error) => this.httpErrorHandlingService.handleBackedRequestError(error)
|
||||||
);
|
);
|
||||||
} else if (file?.type.includes('/json') && result.planCommonModelConfig){
|
} else if (file?.type.includes('/json') && result.planCommonModelConfig){
|
||||||
this.planService.uploadJson(result.planCommonModelConfig)
|
this.planService.uploadJson(result.planCommonModelConfig)
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Kontuz!",
|
"WARNING": "Kontuz!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Warnung!",
|
"WARNING": "Warnung!",
|
||||||
|
|
|
@ -85,7 +85,8 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code.",
|
||||||
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Warning!",
|
"WARNING": "Warning!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Atención!",
|
"WARNING": "Atención!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Προσοχή!",
|
"WARNING": "Προσοχή!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Oprez!",
|
"WARNING": "Oprez!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Ostrzeżenie!",
|
"WARNING": "Ostrzeżenie!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Atenção!",
|
"WARNING": "Atenção!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Upozornenie!",
|
"WARNING": "Upozornenie!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Oprez!",
|
"WARNING": "Oprez!",
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
"DESCRIPTION-TEMPLATE-TYPE-CODE-EXISTS": "The description template type code you provided already exists. Please choose a different code.",
|
||||||
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} not found.",
|
||||||
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
"REFERENCE-TYPE-IMPORT-NOT-FOUND": "Reference type {{referenceTypeCode}} not found.",
|
||||||
"DESCRIPTION-TEMPLATE-CODE-EXISTS": "The description template code you provided already exists. Please choose a different code."
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template {{descriptionTemplateLabel}} not found."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Uyarı!",
|
"WARNING": "Uyarı!",
|
||||||
|
|
|
@ -23,6 +23,8 @@ export class HttpErrorHandlingService {
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND', { 'descriptionTemplateTypeLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND', { 'descriptionTemplateTypeLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
||||||
} if (errorResponse.error.code === ResponseErrorCode.referenceTypeImportNotFound){
|
} if (errorResponse.error.code === ResponseErrorCode.referenceTypeImportNotFound){
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.REFERENCE-TYPE-IMPORT-NOT-FOUND', { 'referenceTypeCode': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.REFERENCE-TYPE-IMPORT-NOT-FOUND', { 'referenceTypeCode': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
||||||
|
} if (errorResponse.error.code === ResponseErrorCode.descriptionTemplateImportNotFound){
|
||||||
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND', { 'descriptionTemplateLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
||||||
} else {
|
} else {
|
||||||
this.uiNotificationService.snackBarNotification(ResponseErrorCodeHelper.getErrorMessageByBackendStatusCode(errorResponse.error.code, this.language), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(ResponseErrorCodeHelper.getErrorMessageByBackendStatusCode(errorResponse.error.code, this.language), SnackBarNotificationLevel.Error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue