Merge from ecomp 718fd196 - Modern UI
[vid.git] / vid-webpack-master / src / app / shared / storeUtil / utils / cr / cr.actions.ts
1 import {Action, ActionCreator} from "redux";
2 import {ActionOnFirstLevel} from "../firstLevel/firstLevel.actions";
3
4 export enum CrActions{
5   DELETE_ACTION_CR_INSTANCE = "DELETE_ACTION_CR_INSTANCE",
6   UNDO_DELETE_ACTION_CR_INSTANCE = "UNDO_DELETE_ACTION_CR_INSTANCE"
7 }
8
9 export const deleteActionCrInstance: ActionCreator<ActionOnFirstLevel> = (collectionResourceStoreKey, serviceId) => ({
10   type: CrActions.DELETE_ACTION_CR_INSTANCE,
11   firstLevelName: 'collectionResources',
12   storeKey: collectionResourceStoreKey,
13   serviceId: serviceId
14 });
15
16 export const undoDeleteActionCrInstance: ActionCreator<ActionOnFirstLevel> = (collectionResourceStoreKey, serviceId) => ({
17   type: CrActions.UNDO_DELETE_ACTION_CR_INSTANCE,
18   firstLevelName: 'collectionResources',
19   storeKey: collectionResourceStoreKey,
20   serviceId: serviceId
21 });