import { Dispatch } from "redux";
import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form';
-import { RootState } from "~/store/store";
-import { dialogActions } from "~/store/dialog/dialog-actions";
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
-import { ServiceRepository } from "~/services/services";
-import { getProcess } from '~/store/processes/process';
-import { projectPanelActions } from '~/store/project-panel/project-panel-action';
-import {snackbarActions, SnackbarKind} from '~/store/snackbar/snackbar-actions';
+import { RootState } from "store/store";
+import { dialogActions } from "store/dialog/dialog-actions";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "services/common-service/common-resource-service";
+import { ServiceRepository } from "services/services";
+import { getProcess } from 'store/processes/process';
+import { projectPanelActions } from 'store/project-panel/project-panel-action';
+import {snackbarActions, SnackbarKind} from 'store/snackbar/snackbar-actions';
export interface ProcessUpdateFormDialogData {
uuid: string;
return updatedProcess;
} catch (e) {
const error = getCommonResourceServiceError(e);
- if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+ if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
dispatch(stopSubmit(PROCESS_UPDATE_FORM_NAME, { name: 'Process with the same name already exists.' } as FormErrors));
} else {
dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_UPDATE_FORM_NAME }));