implement description code
This commit is contained in:
parent
d02a113df0
commit
71923a006e
|
@ -14,6 +14,10 @@ public class DescriptionTemplateImportExport {
|
|||
|
||||
@XmlElement(name = "id")
|
||||
private UUID id;
|
||||
@XmlElement(name = "label")
|
||||
private String label;
|
||||
@XmlElement(name = "code")
|
||||
private String code;
|
||||
@XmlElement(name = "description")
|
||||
private String description;
|
||||
@XmlElement(name = "language")
|
||||
|
@ -36,6 +40,22 @@ public class DescriptionTemplateImportExport {
|
|||
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() {
|
||||
return this.pages;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,11 @@ public class DescriptionTemplateEntity extends TenantScopedBaseEntity {
|
|||
public static final String _label = "label";
|
||||
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)
|
||||
@Column(name = "definition", nullable = false, columnDefinition = "xml")
|
||||
private String definition;
|
||||
|
@ -95,6 +100,14 @@ public class DescriptionTemplateEntity extends TenantScopedBaseEntity {
|
|||
this.label = label;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDefinition() {
|
||||
return this.definition;
|
||||
}
|
||||
|
|
|
@ -438,4 +438,24 @@ public class ErrorThesaurusProperties {
|
|||
public void setReferenceTypeImportNotFound(ErrorDescription 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());
|
||||
if (fields.hasField(this.asIndexer(DescriptionTemplate._label)))
|
||||
m.setLabel(d.getLabel());
|
||||
if (fields.hasField(this.asIndexer(DescriptionTemplate._code)))
|
||||
m.setCode(d.getCode());
|
||||
if (fields.hasField(this.asIndexer(DescriptionTemplate._description)))
|
||||
m.setDescription(d.getDescription());
|
||||
if (fields.hasField(this.asIndexer(DescriptionTemplate._groupId)))
|
||||
|
|
|
@ -18,6 +18,9 @@ public class DescriptionTemplate {
|
|||
public final static String _label = "label";
|
||||
private String label;
|
||||
|
||||
public final static String _code = "code";
|
||||
private String code;
|
||||
|
||||
public final static String _description = "description";
|
||||
private String description;
|
||||
|
||||
|
@ -79,6 +82,14 @@ public class DescriptionTemplate {
|
|||
this.label = label;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.opencdmp.commons.enums.DescriptionTemplateStatus;
|
|||
import org.opencdmp.commons.validation.BaseValidator;
|
||||
import org.opencdmp.convention.ConventionService;
|
||||
import org.opencdmp.data.DescriptionTemplateEntity;
|
||||
import org.opencdmp.data.DescriptionTemplateTypeEntity;
|
||||
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
||||
import org.opencdmp.model.persist.descriptiontemplatedefinition.DefinitionPersist;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
|
@ -26,6 +27,11 @@ public class DescriptionTemplatePersist {
|
|||
|
||||
public static final String _label = "label";
|
||||
|
||||
private String code;
|
||||
|
||||
public final static String _code = "code";
|
||||
|
||||
|
||||
private String description;
|
||||
|
||||
public static final String _description = "description";
|
||||
|
@ -70,6 +76,14 @@ public class DescriptionTemplatePersist {
|
|||
this.label = label;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
@ -165,6 +179,14 @@ public class DescriptionTemplatePersist {
|
|||
.iff(() -> !this.isEmpty(item.getLabel()))
|
||||
.must(() -> this.lessEqualLength(item.getLabel(), DescriptionTemplateEntity._labelLength))
|
||||
.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()
|
||||
.iff(() -> item.getStatus() == DescriptionTemplateStatus.Finalized)
|
||||
.must(() -> !this.isEmpty(item.getDescription()))
|
||||
|
|
|
@ -6,6 +6,7 @@ import gr.cite.tools.validation.ValidatorFactory;
|
|||
import gr.cite.tools.validation.specification.Specification;
|
||||
import org.opencdmp.convention.ConventionService;
|
||||
import org.opencdmp.data.DescriptionTemplateEntity;
|
||||
import org.opencdmp.data.DescriptionTemplateTypeEntity;
|
||||
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
||||
import org.opencdmp.model.persist.descriptiontemplatedefinition.DefinitionPersist;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
|
@ -26,6 +27,10 @@ public class NewVersionDescriptionTemplatePersist {
|
|||
|
||||
public static final String _label = "label";
|
||||
|
||||
private String code = null;
|
||||
|
||||
public static final String _code = "code";
|
||||
|
||||
private String description = null;
|
||||
|
||||
public static final String _description = "description";
|
||||
|
@ -70,6 +75,14 @@ public class NewVersionDescriptionTemplatePersist {
|
|||
this.label = label;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
@ -161,6 +174,14 @@ public class NewVersionDescriptionTemplatePersist {
|
|||
.iff(() -> !this.isEmpty(item.getLabel()))
|
||||
.must(() -> this.lessEqualLength(item.getLabel(), DescriptionTemplateEntity._labelLength))
|
||||
.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()
|
||||
.must(() -> !this.isEmpty(item.getDescription()))
|
||||
.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 Collection<String> codes;
|
||||
|
||||
public DescriptionTemplateQuery like(String value) {
|
||||
this.like = value;
|
||||
return this;
|
||||
|
@ -212,6 +214,21 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
|||
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) {
|
||||
this.authorize = values;
|
||||
return this;
|
||||
|
@ -312,7 +329,8 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
|||
}
|
||||
if (this.like != null && !this.like.isBlank()) {
|
||||
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) {
|
||||
|
@ -355,6 +373,12 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
|||
Predicate afterClause = queryContext.CriteriaBuilder.greaterThanOrEqualTo(queryContext.Root.get(PlanEntity._createdAt), this.after);
|
||||
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) {
|
||||
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.setTenantId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._tenantId, UUID.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.setDescription(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._description, String.class));
|
||||
item.setGroupId(QueryBase.convertSafe(tuple, columns, DescriptionTemplateEntity._groupId, UUID.class));
|
||||
|
@ -414,6 +439,8 @@ public class DescriptionTemplateQuery extends QueryBase<DescriptionTemplateEntit
|
|||
return DescriptionTemplateEntity._id;
|
||||
else if (item.match(DescriptionTemplate._label))
|
||||
return DescriptionTemplateEntity._label;
|
||||
else if (item.match(DescriptionTemplate._code))
|
||||
return DescriptionTemplateEntity._code;
|
||||
else if (item.prefix(DescriptionTemplate._definition))
|
||||
return DescriptionTemplateEntity._definition;
|
||||
else if (item.match(DescriptionTemplate._definition))
|
||||
|
|
|
@ -1367,14 +1367,18 @@ public class DescriptionServiceImpl implements DescriptionService {
|
|||
if (descriptionXml.getDescriptionTemplate() != null) {
|
||||
|
||||
|
||||
DescriptionTemplateEntity descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().ids(descriptionXml.getDescriptionTemplate().getId()).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();
|
||||
DescriptionTemplateEntity descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().ids(UUID.randomUUID()).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;
|
||||
if (descriptionTemplateEntity != null){
|
||||
descriptionTemplateId = descriptionTemplateEntity.getId();
|
||||
} else {
|
||||
DescriptionTemplate persisted = this.descriptionTemplateService.importXml(descriptionXml.getDescriptionTemplate(), null, descriptionXml.getDescriptionTemplate().getDescription(), new BaseFieldSet().ensure(PlanBlueprint._label).ensure(PlanBlueprint._hash));
|
||||
descriptionTemplateId = persisted.getId();
|
||||
descriptionTemplateEntity = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(descriptionXml.getDescriptionTemplate().getCode()).first();
|
||||
if (descriptionTemplateEntity == null) {
|
||||
throw new MyValidationException(this.errors.getDescriptionTemplateImportNotFound().getCode(), descriptionXml.getDescriptionTemplate().getCode());
|
||||
} else {
|
||||
descriptionTemplateId = descriptionTemplateEntity.getId();
|
||||
}
|
||||
}
|
||||
|
||||
return descriptionTemplateId;
|
||||
|
|
|
@ -205,14 +205,20 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
|||
|
||||
data.setDescription(model.getDescription());
|
||||
data.setLabel(model.getLabel());
|
||||
data.setCode(model.getCode());
|
||||
data.setTypeId(model.getType());
|
||||
data.setLanguage(model.getLanguage());
|
||||
data.setStatus(model.getStatus());
|
||||
data.setUpdatedAt(Instant.now());
|
||||
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);
|
||||
else {
|
||||
} else {
|
||||
if (descriptionTemplateCodes > 0) throw new MyValidationException(this.errors.getDescriptionTemplateCodeExists().getCode(), this.errors.getDescriptionTemplateCodeExists().getMessage());
|
||||
this.entityManager.persist(data);
|
||||
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()));
|
||||
|
||||
model.setLabel(model.getLabel() + " new ");
|
||||
model.setCode(model.getCode());
|
||||
model.setId(null);
|
||||
model.setHash(null);
|
||||
model.setStatus(DescriptionTemplateStatus.Draft);
|
||||
|
@ -715,11 +722,14 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
|||
data.setVersion((short) (oldDescriptionTemplateEntity.getVersion() + 1));
|
||||
data.setDescription(model.getDescription());
|
||||
data.setLabel(model.getLabel());
|
||||
data.setCode(model.getCode());
|
||||
data.setTypeId(model.getType());
|
||||
data.setLanguage(model.getLanguage());
|
||||
data.setStatus(model.getStatus());
|
||||
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.persistUsers(data.getId(), model.getUsers());
|
||||
|
@ -756,6 +766,7 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
|||
if (activeDescriptionTemplatesForTheGroup == 0) {
|
||||
DescriptionTemplatePersist persist = new DescriptionTemplatePersist();
|
||||
persist.setLabel(label);
|
||||
persist.setCode(importXml.getCode());
|
||||
persist.setStatus(DescriptionTemplateStatus.Draft);
|
||||
persist.setDescription(importXml.getDescription());
|
||||
persist.setLanguage(importXml.getLanguage());
|
||||
|
@ -775,6 +786,7 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
|||
NewVersionDescriptionTemplatePersist persist = new NewVersionDescriptionTemplatePersist();
|
||||
persist.setId(latestVersionDescriptionTemplate.getId());
|
||||
persist.setLabel(label);
|
||||
persist.setCode(importXml.getCode());
|
||||
persist.setStatus(DescriptionTemplateStatus.Draft);
|
||||
persist.setDescription(importXml.getDescription());
|
||||
persist.setLanguage(importXml.getLanguage());
|
||||
|
@ -988,6 +1000,8 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
|||
private DescriptionTemplateImportExport definitionXmlToExport(DescriptionTemplateEntity data, DefinitionEntity entity) throws InvalidApplicationException {
|
||||
DescriptionTemplateImportExport xml = new DescriptionTemplateImportExport();
|
||||
xml.setId(data.getId());
|
||||
xml.setLabel(data.getLabel());
|
||||
xml.setCode(data.getCode());
|
||||
xml.setDescriptionTemplateType(this.descriptionTemplateTypeXmlToExport(data.getTypeId()));
|
||||
xml.setLanguage(data.getLanguage());
|
||||
xml.setDescription(data.getDescription());
|
||||
|
|
|
@ -116,7 +116,7 @@ public class DescriptionTemplateTypeServiceImpl implements DescriptionTemplateTy
|
|||
data.setStatus(model.getStatus());
|
||||
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 (descriptionTemplateTypeCodes > 1) throw new MyValidationException(this.errors.getDescriptionTemplateTypeCodeExists().getCode(), this.errors.getDescriptionTemplateTypeCodeExists().getMessage());
|
||||
|
|
|
@ -136,4 +136,10 @@ error-thesaurus:
|
|||
message: Description template type not found
|
||||
referenceTypeImportNotFound:
|
||||
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,
|
||||
descriptionTemplateTypeImportNotFound = 148,
|
||||
referenceTypeImportNotFound = 149,
|
||||
descriptionTemplateCodeExists = 150,
|
||||
descriptionTemplateImportNotFound = 151,
|
||||
|
||||
// Notification & Annotation Errors
|
||||
InvalidApiKey = 200,
|
||||
|
@ -169,6 +171,10 @@ export class ResponseErrorCodeHelper {
|
|||
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-TYPE-IMPORT-NOT-FOUND");
|
||||
case ResponseErrorCode.referenceTypeImportNotFound:
|
||||
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:
|
||||
return language.instant("GENERAL.SNACK-BAR.NOT-FOUND");
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import { ReferencePersist } from "../reference/reference";
|
|||
|
||||
export interface DescriptionTemplatePersist extends BaseEntityPersist {
|
||||
label: string;
|
||||
code: string;
|
||||
description: string;
|
||||
language: string;
|
||||
type: Guid;
|
||||
|
@ -20,6 +21,7 @@ export interface DescriptionTemplatePersist extends BaseEntityPersist {
|
|||
|
||||
export interface NewVersionDescriptionTemplatePersist extends BaseEntityPersist {
|
||||
label: string;
|
||||
code: string;
|
||||
description: string;
|
||||
language: string;
|
||||
type: Guid;
|
||||
|
|
|
@ -15,6 +15,7 @@ import { AppPermission } from "@app/core/common/enum/permission.enum";
|
|||
|
||||
export interface DescriptionTemplate extends BaseEntity {
|
||||
label?: string;
|
||||
code?: string;
|
||||
description?: string;
|
||||
groupId?: Guid;
|
||||
version?: string;
|
||||
|
|
|
@ -45,7 +45,16 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
<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="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'">
|
||||
|
@ -58,7 +67,7 @@
|
|||
</div>
|
||||
|
||||
<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>
|
||||
<mat-form-field class="full-width basic-info-input">
|
||||
<mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DESCRIPTION-TEMPLATE-SELECT-TYPE' | translate}}</mat-label>
|
||||
|
@ -69,7 +78,7 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
<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>
|
||||
<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}}">
|
||||
|
@ -82,7 +91,7 @@
|
|||
</mat-form-field>
|
||||
</div>
|
||||
<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="full-width basic-info-input">
|
||||
<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 {
|
||||
label: string;
|
||||
code: string;
|
||||
description: string;
|
||||
language: string;
|
||||
type: Guid;
|
||||
|
@ -33,6 +34,7 @@ export class DescriptionTemplateEditorModel extends BaseEditorModel implements D
|
|||
if (item) {
|
||||
super.fromModel(item);
|
||||
this.label = item.label;
|
||||
this.code = item.code;
|
||||
this.description = item.description;
|
||||
this.language = item.language;
|
||||
this.type = item.type?.id;
|
||||
|
@ -49,6 +51,7 @@ export class DescriptionTemplateEditorModel extends BaseEditorModel implements D
|
|||
return this.formBuilder.group({
|
||||
id: [{ value: this.id, disabled: disabled }, context.getValidation('id').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],
|
||||
language: [{ value: this.language, disabled: disabled }, context.getValidation('language').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>();
|
||||
baseValidationArray.push({ key: 'id', validators: [BackendErrorValidator(this.validationErrorModel, 'id')] });
|
||||
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: 'language', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'language')] });
|
||||
baseValidationArray.push({ key: 'type', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'type')] });
|
||||
|
|
|
@ -25,6 +25,7 @@ export class DescriptionTemplateEditorResolver extends BaseEditorResolver {
|
|||
...BaseEditorResolver.lookupFields(),
|
||||
nameof<DescriptionTemplate>(x => x.id),
|
||||
nameof<DescriptionTemplate>(x => x.label),
|
||||
nameof<DescriptionTemplate>(x => x.code),
|
||||
nameof<DescriptionTemplate>(x => x.status),
|
||||
nameof<DescriptionTemplate>(x => x.description),
|
||||
nameof<DescriptionTemplate>(x => x.language),
|
||||
|
|
|
@ -56,6 +56,7 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
|||
private readonly lookupFields: string[] = [
|
||||
nameof<DescriptionTemplate>(x => x.id),
|
||||
nameof<DescriptionTemplate>(x => x.label),
|
||||
nameof<DescriptionTemplate>(x => x.code),
|
||||
nameof<DescriptionTemplate>(x => x.description),
|
||||
nameof<DescriptionTemplate>(x => x.status),
|
||||
nameof<DescriptionTemplate>(x => x.version),
|
||||
|
@ -140,6 +141,11 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
|
|||
sortable: true,
|
||||
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),
|
||||
sortable: true,
|
||||
|
|
|
@ -10,6 +10,7 @@ import { takeUntil } from 'rxjs/operators';
|
|||
import { PlanUploadDialogComponent } from '../upload-dialogue/plan-upload-dialog.component';
|
||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||
import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
|
||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-start-new-plan',
|
||||
|
@ -30,7 +31,8 @@ export class StartNewPlanDialogComponent extends BaseComponent {
|
|||
private planService: PlanService,
|
||||
private httpClient: HttpClient,
|
||||
private analyticsService: AnalyticsService,
|
||||
private routerUtils: RouterUtilsService
|
||||
private routerUtils: RouterUtilsService,
|
||||
private httpErrorHandlingService: HttpErrorHandlingService,
|
||||
) {
|
||||
super();
|
||||
this.isDialog = data.isDialog;
|
||||
|
@ -77,7 +79,7 @@ export class StartNewPlanDialogComponent extends BaseComponent {
|
|||
this.onCallbackImportComplete();
|
||||
this.dialog.closeAll();
|
||||
},
|
||||
(error) => this.onCallbackImportFail(error.error)
|
||||
(error) => this.httpErrorHandlingService.handleBackedRequestError(error)
|
||||
);
|
||||
} else if (file?.type.includes('/json') && 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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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-IMPORT-NOT-FOUND": "Description template type {{descriptionTemplateTypeLabel}} 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": {
|
||||
"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);
|
||||
} 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);
|
||||
} 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 {
|
||||
this.uiNotificationService.snackBarNotification(ResponseErrorCodeHelper.getErrorMessageByBackendStatusCode(errorResponse.error.code, this.language), SnackBarNotificationLevel.Error);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue