diff --git a/dmp-frontend/src/app/core/common/enum/respone-error-code.ts b/dmp-frontend/src/app/core/common/enum/respone-error-code.ts new file mode 100644 index 000000000..8fbd45b17 --- /dev/null +++ b/dmp-frontend/src/app/core/common/enum/respone-error-code.ts @@ -0,0 +1,17 @@ +export enum ResponseErrorCode { + HashConflict = 100, + Forbidden = 101, + SystemError =102, + MissingTenant = 103, + TenantCodeRequired = 108, + TenantNameRequired = 109, + TenantNotAllowed = 113, + DescriptionTemplateNewVersionConflict = 114, + DmpNewVersionConflict = 115, + DmpIsFinalized = 116, + + DmpBlueprintHasNoDescriptionTemplates = 120, + DmpBlueprintNewVersionConflict = 121, + DmpDescriptionTemplateCanNotRemove = 122, + TenantTampering = 123 +} \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts index 92f2e188c..a84bf1317 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/description-template-editor.component.ts @@ -188,6 +188,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor { if (result) { this.formGroup.get('status').setValue(DescriptionTemplateStatus.Finalized); - if(this.isNewVersion) this.isNewVersion = false; this.persistEntity(); }}); } diff --git a/dmp-frontend/src/common/base/base-editor.ts b/dmp-frontend/src/common/base/base-editor.ts index f471e0146..2111040d2 100644 --- a/dmp-frontend/src/common/base/base-editor.ts +++ b/dmp-frontend/src/common/base/base-editor.ts @@ -24,6 +24,7 @@ import { isNullOrUndefined } from '@swimlane/ngx-datatable'; import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component'; import { AuthService } from '@app/core/services/auth/auth.service'; import { ConfigurationService } from '@app/core/services/configuration/configuration.service'; +import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code'; @Component({ selector: 'app-base-editor-component', @@ -120,9 +121,13 @@ export abstract class BaseEditor