handle more errors on import
This commit is contained in:
parent
1dd9716bdc
commit
838abdf200
|
@ -478,4 +478,34 @@ public class ErrorThesaurusProperties {
|
||||||
public void setPlanBlueprintImportNotFound(ErrorDescription planBlueprintImportNotFound) {
|
public void setPlanBlueprintImportNotFound(ErrorDescription planBlueprintImportNotFound) {
|
||||||
this.planBlueprintImportNotFound = planBlueprintImportNotFound;
|
this.planBlueprintImportNotFound = planBlueprintImportNotFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ErrorDescription blueprintDescriptionTemplateImportDraft;
|
||||||
|
|
||||||
|
public ErrorDescription getBlueprintDescriptionTemplateImportDraft() {
|
||||||
|
return blueprintDescriptionTemplateImportDraft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBlueprintDescriptionTemplateImportDraft(ErrorDescription blueprintDescriptionTemplateImportDraft) {
|
||||||
|
this.blueprintDescriptionTemplateImportDraft = blueprintDescriptionTemplateImportDraft;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ErrorDescription planDescriptionTemplateImportDraft;
|
||||||
|
|
||||||
|
public ErrorDescription getPlanDescriptionTemplateImportDraft() {
|
||||||
|
return planDescriptionTemplateImportDraft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlanDescriptionTemplateImportDraft(ErrorDescription planDescriptionTemplateImportDraft) {
|
||||||
|
this.planDescriptionTemplateImportDraft = planDescriptionTemplateImportDraft;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ErrorDescription descriptionTemplateTypeImportDraft;
|
||||||
|
|
||||||
|
public ErrorDescription getDescriptionTemplateTypeImportDraft() {
|
||||||
|
return descriptionTemplateTypeImportDraft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescriptionTemplateTypeImportDraft(ErrorDescription descriptionTemplateTypeImportDraft) {
|
||||||
|
this.descriptionTemplateTypeImportDraft = descriptionTemplateTypeImportDraft;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -828,14 +828,16 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
|
|
||||||
if (importXml.getId() != null) {
|
if (importXml.getId() != null) {
|
||||||
// search by id
|
// search by id
|
||||||
DescriptionTemplateTypeEntity entity = this.queryFactory.query(DescriptionTemplateTypeQuery.class).ids(importXml.getId()).firstAs(new BaseFieldSet().ensure(DescriptionTemplate._id));
|
DescriptionTemplateTypeEntity entity = this.queryFactory.query(DescriptionTemplateTypeQuery.class).ids(importXml.getId()).firstAs(new BaseFieldSet().ensure(DescriptionTemplateType._id).ensure(DescriptionTemplateType._code).ensure(DescriptionTemplateType._status));
|
||||||
if (entity != null ) {
|
if (entity != null ) {
|
||||||
|
if (!entity.getStatus().equals(DescriptionTemplateTypeStatus.Finalized)) throw new MyValidationException(this.errors.getDescriptionTemplateTypeImportDraft().getCode(), entity.getCode());
|
||||||
return entity.getId();
|
return entity.getId();
|
||||||
} else {
|
} else {
|
||||||
if (!this.conventionService.isNullOrEmpty(importXml.getCode())){
|
if (!this.conventionService.isNullOrEmpty(importXml.getCode())){
|
||||||
// search by code
|
// search by code
|
||||||
entity = this.queryFactory.query(DescriptionTemplateTypeQuery.class).codes(importXml.getCode()).firstAs(new BaseFieldSet().ensure(DescriptionTemplate._id));
|
entity = this.queryFactory.query(DescriptionTemplateTypeQuery.class).codes(importXml.getCode()).firstAs(new BaseFieldSet().ensure(DescriptionTemplateType._id).ensure(DescriptionTemplateType._code).ensure(DescriptionTemplateType._status));
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
|
if (!entity.getStatus().equals(DescriptionTemplateTypeStatus.Finalized)) throw new MyValidationException(this.errors.getDescriptionTemplateTypeImportDraft().getCode(), entity.getCode());
|
||||||
return entity.getId();
|
return entity.getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2075,13 +2075,17 @@ public class PlanServiceImpl implements PlanService {
|
||||||
|
|
||||||
PlanDescriptionTemplatePersist persist = new PlanDescriptionTemplatePersist();
|
PlanDescriptionTemplatePersist persist = new PlanDescriptionTemplatePersist();
|
||||||
|
|
||||||
org.opencdmp.data.DescriptionTemplateEntity data = importXml.getDescriptionTemplateGroupId() != null ? this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().groupIds(importXml.getDescriptionTemplateGroupId()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._groupId)) : null;
|
org.opencdmp.data.DescriptionTemplateEntity data = importXml.getDescriptionTemplateGroupId() != null ? this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().groupIds(importXml.getDescriptionTemplateGroupId()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._groupId).ensure(DescriptionTemplate._status).ensure(DescriptionTemplate._code)) : null;
|
||||||
if (data != null ) {
|
if (data != null ) {
|
||||||
|
if (!data.getStatus().equals(DescriptionTemplateStatus.Finalized)) throw new MyValidationException(this.errors.getPlanDescriptionTemplateImportDraft().getCode(), data.getCode());
|
||||||
persist.setDescriptionTemplateGroupId(importXml.getDescriptionTemplateGroupId());
|
persist.setDescriptionTemplateGroupId(importXml.getDescriptionTemplateGroupId());
|
||||||
} else {
|
} else {
|
||||||
if (!this.conventionService.isNullOrEmpty(importXml.getDescriptionTemplateCode())) {
|
if (!this.conventionService.isNullOrEmpty(importXml.getDescriptionTemplateCode())) {
|
||||||
data = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(importXml.getDescriptionTemplateCode()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._code).ensure(DescriptionTemplate._groupId));
|
data = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(importXml.getDescriptionTemplateCode()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._code).ensure(DescriptionTemplate._groupId).ensure(DescriptionTemplate._status));
|
||||||
if (data != null) persist.setDescriptionTemplateGroupId(data.getGroupId());
|
if (data != null) {
|
||||||
|
if (!data.getStatus().equals(DescriptionTemplateStatus.Finalized)) throw new MyValidationException(this.errors.getPlanDescriptionTemplateImportDraft().getCode(), data.getCode());
|
||||||
|
persist.setDescriptionTemplateGroupId(data.getGroupId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -809,13 +809,17 @@ public class PlanBlueprintServiceImpl implements PlanBlueprintService {
|
||||||
private DescriptionTemplatePersist xmlDescriptionTemplateToPersist(BlueprintDescriptionTemplateImportExport importXml) {
|
private DescriptionTemplatePersist xmlDescriptionTemplateToPersist(BlueprintDescriptionTemplateImportExport importXml) {
|
||||||
DescriptionTemplatePersist persist = new DescriptionTemplatePersist();
|
DescriptionTemplatePersist persist = new DescriptionTemplatePersist();
|
||||||
|
|
||||||
org.opencdmp.data.DescriptionTemplateEntity data = importXml.getDescriptionTemplateGroupId() != null ? this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().groupIds(importXml.getDescriptionTemplateGroupId()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._groupId)) : null;
|
org.opencdmp.data.DescriptionTemplateEntity data = importXml.getDescriptionTemplateGroupId() != null ? this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().groupIds(importXml.getDescriptionTemplateGroupId()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._code).ensure(DescriptionTemplate._groupId).ensure(DescriptionTemplate._status)) : null;
|
||||||
if (data != null ) {
|
if (data != null ) {
|
||||||
|
if (!data.getStatus().equals(DescriptionTemplateStatus.Finalized)) throw new MyValidationException(this.errors.getBlueprintDescriptionTemplateImportDraft().getCode(), data.getCode());
|
||||||
persist.setDescriptionTemplateGroupId(importXml.getDescriptionTemplateGroupId());
|
persist.setDescriptionTemplateGroupId(importXml.getDescriptionTemplateGroupId());
|
||||||
} else {
|
} else {
|
||||||
if (!this.conventionService.isNullOrEmpty(importXml.getDescriptionTemplateCode())) {
|
if (!this.conventionService.isNullOrEmpty(importXml.getDescriptionTemplateCode())) {
|
||||||
data = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(importXml.getDescriptionTemplateCode()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._code).ensure(DescriptionTemplate._groupId));
|
data = this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().codes(importXml.getDescriptionTemplateCode()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._code).ensure(DescriptionTemplate._groupId).ensure(DescriptionTemplate._status));
|
||||||
if (data != null) persist.setDescriptionTemplateGroupId(data.getGroupId());
|
if (data != null) {
|
||||||
|
if (!data.getStatus().equals(DescriptionTemplateStatus.Finalized)) throw new MyValidationException(this.errors.getBlueprintDescriptionTemplateImportDraft().getCode(), data.getCode());
|
||||||
|
persist.setDescriptionTemplateGroupId(data.getGroupId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,4 +148,13 @@ error-thesaurus:
|
||||||
message: Plan blueprint code exists
|
message: Plan blueprint code exists
|
||||||
planBlueprintImportNotFound:
|
planBlueprintImportNotFound:
|
||||||
code: 153
|
code: 153
|
||||||
message: Plan blueprint code not found
|
message: Plan blueprint code not found
|
||||||
|
blueprintDescriptionTemplateImportDraft:
|
||||||
|
code: 154
|
||||||
|
message: Description template is not finalised
|
||||||
|
planDescriptionTemplateImportDraft:
|
||||||
|
code: 155
|
||||||
|
message: Description template is not finalised
|
||||||
|
descriptionTemplateTypeImportDraft:
|
||||||
|
code: 156
|
||||||
|
message: Description template type is not finalised
|
|
@ -49,6 +49,9 @@ export enum ResponseErrorCode {
|
||||||
descriptionTemplateImportNotFound = 151,
|
descriptionTemplateImportNotFound = 151,
|
||||||
planBlueprintCodeExists = 152,
|
planBlueprintCodeExists = 152,
|
||||||
planBlueprintImportNotFound = 153,
|
planBlueprintImportNotFound = 153,
|
||||||
|
blueprintDescriptionTemplateImportDraft = 154,
|
||||||
|
planDescriptionTemplateImportDraft = 155,
|
||||||
|
descriptionTemplateTypeImportDraft = 156,
|
||||||
|
|
||||||
// Notification & Annotation Errors
|
// Notification & Annotation Errors
|
||||||
InvalidApiKey = 200,
|
InvalidApiKey = 200,
|
||||||
|
@ -179,6 +182,13 @@ export class ResponseErrorCodeHelper {
|
||||||
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND");
|
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND");
|
||||||
case ResponseErrorCode.planBlueprintCodeExists:
|
case ResponseErrorCode.planBlueprintCodeExists:
|
||||||
return language.instant("GENERAL.BACKEND-ERRORS.PLAN-BLUEPRINT-CODE-EXISTS");
|
return language.instant("GENERAL.BACKEND-ERRORS.PLAN-BLUEPRINT-CODE-EXISTS");
|
||||||
|
case ResponseErrorCode.blueprintDescriptionTemplateImportDraft:
|
||||||
|
return language.instant("GENERAL.BACKEND-ERRORS.BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT");
|
||||||
|
case ResponseErrorCode.planDescriptionTemplateImportDraft:
|
||||||
|
return language.instant("GENERAL.BACKEND-ERRORS.PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT");
|
||||||
|
case ResponseErrorCode.planDescriptionTemplateImportDraft:
|
||||||
|
return language.instant("GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return language.instant("GENERAL.SNACK-BAR.NOT-FOUND");
|
return language.instant("GENERAL.SNACK-BAR.NOT-FOUND");
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Kontuz!",
|
"WARNING": "Kontuz!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Warnung!",
|
"WARNING": "Warnung!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Warning!",
|
"WARNING": "Warning!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Atención!",
|
"WARNING": "Atención!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Προσοχή!",
|
"WARNING": "Προσοχή!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Oprez!",
|
"WARNING": "Oprez!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Ostrzeżenie!",
|
"WARNING": "Ostrzeżenie!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Atenção!",
|
"WARNING": "Atenção!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Upozornenie!",
|
"WARNING": "Upozornenie!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Oprez!",
|
"WARNING": "Oprez!",
|
||||||
|
|
|
@ -88,7 +88,10 @@
|
||||||
"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 with code '{{descriptionTemplateLabel}}' not found.",
|
"DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND": "Description template with code '{{descriptionTemplateLabel}}' not found.",
|
||||||
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
"PLAN-BLUEPRINT-CODE-EXISTS": "The plan blueprint code you provided already exists. Please choose a different code.",
|
||||||
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found."
|
"PLAN-BLUEPRINT-IMPORT-NOT-FOUND": "Plan blueprint with code '{{planBlueprintLabel}}' not found.",
|
||||||
|
"BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT": "Description template with code '{{descriptionTemplateLabel}}' is not finalized yet.",
|
||||||
|
"DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT": "Description template type with code '{{descriptionTemplateTypeCode}}' is not finalized yet."
|
||||||
},
|
},
|
||||||
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
"FORM-VALIDATION-DISPLAY-DIALOG": {
|
||||||
"WARNING": "Uyarı!",
|
"WARNING": "Uyarı!",
|
||||||
|
|
|
@ -27,6 +27,12 @@ export class HttpErrorHandlingService {
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND', { 'descriptionTemplateLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-IMPORT-NOT-FOUND', { 'descriptionTemplateLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
||||||
} else if (errorResponse.error.code === ResponseErrorCode.planBlueprintImportNotFound){
|
} else if (errorResponse.error.code === ResponseErrorCode.planBlueprintImportNotFound){
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.PLAN-BLUEPRINT-IMPORT-NOT-FOUND', { 'planBlueprintLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.PLAN-BLUEPRINT-IMPORT-NOT-FOUND', { 'planBlueprintLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
||||||
|
} else if (errorResponse.error.code === ResponseErrorCode.blueprintDescriptionTemplateImportDraft){
|
||||||
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.BLUEPRINT-DESCRIPTION-TEMPLATE-IMPORT-DRAFT', { 'descriptionTemplateLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
||||||
|
} else if (errorResponse.error.code === ResponseErrorCode.planDescriptionTemplateImportDraft){
|
||||||
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.PLAN-DESCRIPTION-TEMPLATE-IMPORT-DRAFT', { 'descriptionTemplateLabel': errorResponse.error.error }), SnackBarNotificationLevel.Error);
|
||||||
|
} else if (errorResponse.error.code === ResponseErrorCode.descriptionTemplateTypeImportDraft){
|
||||||
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.BACKEND-ERRORS.DESCRIPTION-TEMPLATE-TYPE-IMPORT-DRAFT', { 'descriptionTemplateTypeCode': 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