summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/storeUtil/utils/cr/cr.actions.ts
blob: 428a309d766049b5b6d0f06f78a91740dd6c427e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {Action, ActionCreator} from "redux";
import {ActionOnFirstLevel} from "../firstLevel/firstLevel.actions";

export enum CrActions{
  DELETE_ACTION_CR_INSTANCE = "DELETE_ACTION_CR_INSTANCE",
  UNDO_DELETE_ACTION_CR_INSTANCE = "UNDO_DELETE_ACTION_CR_INSTANCE"
}

export const deleteActionCrInstance: ActionCreator<ActionOnFirstLevel> = (collectionResourceStoreKey, serviceId) => ({
  type: CrActions.DELETE_ACTION_CR_INSTANCE,
  firstLevelName: 'collectionResources',
  storeKey: collectionResourceStoreKey,
  serviceId: serviceId
});

export const undoDeleteActionCrInstance: ActionCreator<ActionOnFirstLevel> = (collectionResourceStoreKey, serviceId) => ({
  type: CrActions.UNDO_DELETE_ACTION_CR_INSTANCE,
  firstLevelName: 'collectionResources',
  storeKey: collectionResourceStoreKey,
  serviceId: serviceId
});