From fab7d63333b86b9fe0f1c52d2c642b52bbf506c0 Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Mon, 6 Jun 2022 11:35:56 -0500 Subject: Add CRUD Camiones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - están ok funcionando: listar, insertar, editar, eliminar #TODO - añadir todos los puntos - Mejorar el path del punto con funcion - añadir tiempos segun distancia - estetica al final (camion, colores, etc) - Arreglar combos - Añadir los reducer de pedidos, rutas, almacen Camiones CRUD - ver codigo de camion corelativo - añadir Ciudad origen --- front/odiparpack/app/redux/modules/camion.js | 4 +++- front/odiparpack/app/redux/modules/tipoCamion.js | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 front/odiparpack/app/redux/modules/tipoCamion.js (limited to 'front/odiparpack/app/redux') diff --git a/front/odiparpack/app/redux/modules/camion.js b/front/odiparpack/app/redux/modules/camion.js index 5cfe7d8..03394d7 100644 --- a/front/odiparpack/app/redux/modules/camion.js +++ b/front/odiparpack/app/redux/modules/camion.js @@ -1,4 +1,4 @@ -import { LISTA_CAMION } from 'ba-actions/actionTypes'; +import { LISTA_CAMION, NUEVO_CAMION } from 'ba-actions/actionTypes'; const initState = { camiones : [] @@ -8,6 +8,8 @@ const camion = (state = initState, action) => { switch (action.type) { case LISTA_CAMION: return { ...state, camiones: action.payload } + case NUEVO_CAMION: + return { ...state } default : return state } diff --git a/front/odiparpack/app/redux/modules/tipoCamion.js b/front/odiparpack/app/redux/modules/tipoCamion.js new file mode 100644 index 0000000..c5e690a --- /dev/null +++ b/front/odiparpack/app/redux/modules/tipoCamion.js @@ -0,0 +1,16 @@ +import { LISTA_TIPO_CAMION } from 'ba-actions/actionTypes'; + +const initState = { + tipos : [] +} + +const camion = (state = initState, action) => { + switch (action.type) { + case LISTA_TIPO_CAMION: + return { ...state, tipos: action.payload } + default : + return state + } +} + +export default camion; \ No newline at end of file -- cgit v1.2.3