summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/storeUtil/utils/ncf/ncf.actions.ts
blob: 00b5d9f0256703e923a60dcc50f0ea6cf43827a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {Action, ActionCreator} from "redux";

export enum NcfActions{
  DELETE_ACTION_NCF_INSTANCE = "DELETE_ACTION_NCF_INSTANCE",
  UNDO_DELETE_ACTION_NCF_INSTANCE = "UNDO_DELETE_ACTION_NCF_INSTANCE"

}
export interface DeleteActionNcfInstanceAction extends Action {
  collectionResourceStoreKey: string,
  ncfStoreKey : string;
  serviceId : string;
}

export interface UndoDeleteActionNcfInstanceAction extends Action {
  collectionResourceStoreKey: string,
  ncfStoreKey: string;
  serviceId?: string;
}


export const deleteActionNcfInstance: ActionCreator<DeleteActionNcfInstanceAction> = (collectionResourceStoreKey, ncfStoreKey, serviceId) => ({
  type: NcfActions.DELETE_ACTION_NCF_INSTANCE,
  collectionResourceStoreKey: collectionResourceStoreKey,
  ncfStoreKey: ncfStoreKey,
  serviceId: serviceId
});

export const undoDeleteActionNcfInstance: ActionCreator<UndoDeleteActionNcfInstanceAction> = (collectionResourceStoreKey, ncfStoreKey, serviceId) => ({
  type: NcfActions.UNDO_DELETE_ACTION_NCF_INSTANCE,
  collectionResourceStoreKey: collectionResourceStoreKey,
  ncfStoreKey: ncfStoreKey,
  serviceId: serviceId
});