From e13e630cd6e4fc0b1ff92098a28a770794c7bb9a Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Wed, 20 Apr 2022 10:19:29 -0500 Subject: =?UTF-8?q?A=C3=B1adir=20plantilla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Base para front --- front/odiparpack/app/actions/CrudTbActions.js | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 front/odiparpack/app/actions/CrudTbActions.js (limited to 'front/odiparpack/app/actions/CrudTbActions.js') diff --git a/front/odiparpack/app/actions/CrudTbActions.js b/front/odiparpack/app/actions/CrudTbActions.js new file mode 100644 index 0000000..969eff4 --- /dev/null +++ b/front/odiparpack/app/actions/CrudTbActions.js @@ -0,0 +1,37 @@ +import * as types from './actionTypes'; + +export const fetchAction = (items, branch) => ({ + branch, + type: `${branch}/${types.FETCH_DATA}`, + items +}); +export const addAction = (anchor, branch) => ({ + branch, + type: `${branch}/${types.ADD_EMPTY_ROW}`, + anchor +}); +export const removeAction = (item, branch) => ({ + branch, + type: `${branch}/${types.REMOVE_ROW}`, + item +}); +export const updateAction = (event, item, branch) => ({ + branch, + type: `${branch}/${types.UPDATE_ROW}`, + event, + item +}); +export const editAction = (item, branch) => ({ + branch, + type: `${branch}/${types.EDIT_ROW}`, + item +}); +export const saveAction = (item, branch) => ({ + branch, + type: `${branch}/${types.SAVE_ROW}`, + item +}); +export const closeNotifAction = branch => ({ + branch, + type: `${branch}/${types.CLOSE_NOTIF}`, +}); -- cgit v1.2.3