summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/redux
diff options
context:
space:
mode:
authorgabrhr <[email protected]>2022-05-31 03:58:23 -0500
committergabrhr <[email protected]>2022-05-31 03:58:23 -0500
commitcbc7d7f7494508fda69e88c76702a878bebca0e2 (patch)
tree7a3bec98a7deb82ac95850835d08b2a305b8a0cc /front/odiparpack/app/redux
parent32fb17de8f78317b165b6f269a8bab2d4e852d0d (diff)
downloadDP1_project-cbc7d7f7494508fda69e88c76702a878bebca0e2.tar.gz
DP1_project-cbc7d7f7494508fda69e88c76702a878bebca0e2.tar.bz2
DP1_project-cbc7d7f7494508fda69e88c76702a878bebca0e2.zip
Add Almacenes
- todo de almacenes, redux, pagina - mejoro form de pedido (etiqueta estado, RUC) #TODO - Ver combobox con API
Diffstat (limited to 'front/odiparpack/app/redux')
-rw-r--r--front/odiparpack/app/redux/modules/almacen.js16
-rw-r--r--front/odiparpack/app/redux/reducers.js3
2 files changed, 19 insertions, 0 deletions
diff --git a/front/odiparpack/app/redux/modules/almacen.js b/front/odiparpack/app/redux/modules/almacen.js
new file mode 100644
index 0000000..bb9b7d6
--- /dev/null
+++ b/front/odiparpack/app/redux/modules/almacen.js
@@ -0,0 +1,16 @@
+import { LISTA_ALMACEN } from 'ba-actions/actionTypes';
+
+const initState = {
+ almacenes : []
+}
+
+const almacen = (state = initState, action) => {
+ switch (action.type) {
+ case LISTA_ALMACEN:
+ return { ...state, pedidos: action.payload }
+ default :
+ return state
+ }
+}
+
+export default almacen; \ No newline at end of file
diff --git a/front/odiparpack/app/redux/reducers.js b/front/odiparpack/app/redux/reducers.js
index e0e2547..0c2e9b8 100644
--- a/front/odiparpack/app/redux/reducers.js
+++ b/front/odiparpack/app/redux/reducers.js
@@ -23,6 +23,7 @@ import initval from './modules/initForm';
//Odipar
import pedido from './modules/pedido';
import message from './modules/message'
+import almacen from './modules/almacen';
/**
* Branching reducers to use one reducer for many components
@@ -60,7 +61,9 @@ export default function createReducer(injectedReducers) {
crudTableForm,
crudTbFrmDemo: branchReducer(crudTableForm, 'crudTbFrmDemo'),
crudPedido: branchReducer(crudTableForm, 'crudPedido'),
+ crudAlmacen: branchReducer(crudTableForm, 'crudAlmacen'),
pedido,
+ almacen,
message,
language: languageProviderReducer,
router: connectRouter(history),