import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions';
import { openCollectionCopyDialog } from '~/store/collections/collection-copy-actions';
import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
+import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
export const collectionResourceActionSet: ContextMenuActionSet = [[
{
{
icon: MoveToIcon,
name: "Move to",
- execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
+ execute: (dispatch, resource) => {
+ dispatch<any>(openMoveCollectionDialog(resource));
+ }
},
{
component: ToggleFavoriteAction,
{
component: ToggleTrashAction,
execute: (dispatch, resource) => {
- dispatch<any>(toggleCollectionTrashed(resource));
+ dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
}
},
{
name: "Copy to project",
execute: (dispatch, resource) => {
dispatch<any>(openCollectionCopyDialog(resource));
- },
+ }
},
{
icon: DetailsIcon,
name: "View details",
- execute: (dispatch, resource) => {
- // add code
+ execute: dispatch => {
+ dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
}
},
{