[ARVADOS-WORKBENCH2] updated: 1.2.0-438-g8ae34cc
Git user
git at public.curoverse.com
Tue Sep 25 05:51:01 EDT 2018
Summary of changes:
src/store/trash/trash-actions.ts | 6 ++++++
1 file changed, 6 insertions(+)
via 8ae34cc6c505d6359bf300d111d0c7b4e4e68a15 (commit)
from 8a570b430be529010e28929c589103ad6ffebedd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 8ae34cc6c505d6359bf300d111d0c7b4e4e68a15
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Tue Sep 25 11:36:32 2018 +0200
Navigate back to the trash after restoring a collection
Feature #14244
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/store/trash/trash-actions.ts b/src/store/trash/trash-actions.ts
index 5cf952e..b59276c 100644
--- a/src/store/trash/trash-actions.ts
+++ b/src/store/trash/trash-actions.ts
@@ -10,6 +10,8 @@ import { trashPanelActions } from "~/store/trash-panel/trash-panel-action";
import { activateSidePanelTreeItem, loadSidePanelTreeProjects } from "~/store/side-panel-tree/side-panel-tree-actions";
import { projectPanelActions } from "~/store/project-panel/project-panel-action";
import { ResourceKind } from "~/models/resource";
+import { navigateToTrash } from '../navigation/navigation-action';
+import { matchTrashRoute, matchCollectionRoute } from '../../routes/routes';
export const toggleProjectTrashed = (uuid: string, ownerUuid: string, isTrashed: boolean) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<any> => {
@@ -46,8 +48,12 @@ export const toggleCollectionTrashed = (uuid: string, isTrashed: boolean) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<any> => {
try {
if (isTrashed) {
+ const { location } = getState().router;
dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Restoring from trash..." }));
await services.collectionService.untrash(uuid);
+ if (matchCollectionRoute(location ? location.pathname : '')) {
+ dispatch(navigateToTrash);
+ }
dispatch(trashPanelActions.REQUEST_ITEMS());
dispatch(snackbarActions.OPEN_SNACKBAR({
message: "Restored from trash",
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list