X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/123bae90530147cf31e220066999b416d3610ae2..0bc3340cdc59ede7a02552bcc9f22890f0ef4f91:/src/store/projects/project-move-actions.ts diff --git a/src/store/projects/project-move-actions.ts b/src/store/projects/project-move-actions.ts index cacd49e6..365e07aa 100644 --- a/src/store/projects/project-move-actions.ts +++ b/src/store/projects/project-move-actions.ts @@ -4,7 +4,7 @@ import { Dispatch } from "redux"; import { dialogActions } from "~/store/dialog/dialog-actions"; -import { startSubmit, stopSubmit, initialize } from 'redux-form'; +import { startSubmit, stopSubmit, initialize, FormErrors } from 'redux-form'; import { ServiceRepository } from '~/services/services'; import { RootState } from '~/store/store'; import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service"; @@ -33,9 +33,9 @@ export const moveProject = (resource: MoveToFormDialogData) => } catch (e) { const error = getCommonResourceServiceError(e); if (error === CommonResourceServiceError.UNIQUE_VIOLATION) { - dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'A project with the same name already exists in the target project.' })); + dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'A project with the same name already exists in the target project.' } as FormErrors)); } else if (error === CommonResourceServiceError.OWNERSHIP_CYCLE) { - dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'Cannot move a project into itself.' })); + dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'Cannot move a project into itself.' } as FormErrors)); } else { dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_MOVE_FORM_NAME })); throw new Error('Could not move the project.');