X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/18a8117437056f65e3c9d84b0231c5f64b1346d1..b0de143e088973715681f7eb6c41f2dccb648c2b:/src/store/project/project-reducer.ts diff --git a/src/store/project/project-reducer.ts b/src/store/project/project-reducer.ts index c008370d..a329e812 100644 --- a/src/store/project/project-reducer.ts +++ b/src/store/project/project-reducer.ts @@ -18,6 +18,7 @@ interface ProjectCreator { opened: boolean; pending: boolean; ownerUuid: string; + error?: string; } export function findTreeItem(tree: Array>, itemId: string): TreeItem | undefined { @@ -113,11 +114,10 @@ const initialState: ProjectState = { const projectsReducer = (state: ProjectState = initialState, action: ProjectAction) => { return actions.match(action, { - OPEN_PROJECT_CREATOR: ({ ownerUuid }) => updateCreator(state, { ownerUuid, opened: true, pending: false }), + OPEN_PROJECT_CREATOR: ({ ownerUuid }) => updateCreator(state, { ownerUuid, opened: true }), CLOSE_PROJECT_CREATOR: () => updateCreator(state, { opened: false }), - CREATE_PROJECT: () => updateCreator(state, { opened: false, pending: true }), - CREATE_PROJECT_SUCCESS: () => updateCreator(state, { ownerUuid: "", pending: false }), - CREATE_PROJECT_ERROR: () => updateCreator(state, { ownerUuid: "", pending: false }), + CREATE_PROJECT: () => updateCreator(state, { error: undefined }), + CREATE_PROJECT_SUCCESS: () => updateCreator(state, { opened: false, ownerUuid: "" }), REMOVE_PROJECT: () => state, PROJECTS_REQUEST: itemId => { const items = _.cloneDeep(state.items);