export const collectionPanelActions = unionize({
SET_COLLECTION: ofType<CollectionResource>(),
- LOAD_COLLECTION_SUCCESS: ofType<{ item: CollectionResource }>(),
});
export type CollectionPanelAction = UnionOf<typeof collectionPanelActions>;
? item
: await services.collectionService.get(uuid);
dispatch<any>(loadDetailsPanel(collection.uuid));
- dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item: collection }));
+ dispatch(collectionPanelActions.SET_COLLECTION(collection));
dispatch(resourcesActions.SET_RESOURCES([collection]));
return collection;
};
properties: collection.properties }
).then(updatedCollection => {
updatedCollection = {...cachedCollection, ...updatedCollection};
- dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item: updatedCollection as CollectionResource }));
+ dispatch(collectionPanelActions.SET_COLLECTION(updatedCollection));
dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_UPDATE_FORM_NAME }));
dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_UPDATE_FORM_NAME));
dispatch(snackbarActions.OPEN_SNACKBAR({