projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17308: Adds vocabulary terms handling to new project dialog's property editor.
[arvados.git]
/
src
/
store
/
collection-panel
/
collection-panel-reducer.ts
diff --git
a/src/store/collection-panel/collection-panel-reducer.ts
b/src/store/collection-panel/collection-panel-reducer.ts
index 61f4127fae55b6cde9e640077f7a042fb4d5d294..18590181fb0e79fe150226a66baa9ee51a1f9e64 100644
(file)
--- a/
src/store/collection-panel/collection-panel-reducer.ts
+++ b/
src/store/collection-panel/collection-panel-reducer.ts
@@
-3,23
+3,26
@@
// SPDX-License-Identifier: AGPL-3.0
import { collectionPanelActions, CollectionPanelAction } from "./collection-panel-action";
// SPDX-License-Identifier: AGPL-3.0
import { collectionPanelActions, CollectionPanelAction } from "./collection-panel-action";
-import { CollectionResource } from "../../models/collection";
-import { LinkResource } from "../../models/link";
+import { CollectionResource } from "~/models/collection";
export interface CollectionPanelState {
item: CollectionResource | null;
export interface CollectionPanelState {
item: CollectionResource | null;
-
tags: LinkResource[]
;
+
loadBigCollections: boolean
;
}
const initialState = {
item: null,
}
const initialState = {
item: null,
- tags: []
+ loadBigCollections: false,
};
export const collectionPanelReducer = (state: CollectionPanelState = initialState, action: CollectionPanelAction) =>
collectionPanelActions.match(action, {
default: () => state,
};
export const collectionPanelReducer = (state: CollectionPanelState = initialState, action: CollectionPanelAction) =>
collectionPanelActions.match(action, {
default: () => state,
+ SET_COLLECTION: (item) => ({
+ ...state,
+ item,
+ loadBigCollections: false,
+ }),
LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }),
LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }),
- LOAD_COLLECTION_TAGS_SUCCESS: ({ tags }) => ({...state, tags}),
- CREATE_COLLECTION_TAG_SUCCESS: ({ tag }) => ({...state, tags: [...state.tags, tag] })
+ LOAD_BIG_COLLECTIONS: (loadBigCollections) => ({ ...state, loadBigCollections}),
});
});