diff options
| author | gabrhr <[email protected]> | 2022-05-31 03:58:23 -0500 |
|---|---|---|
| committer | gabrhr <[email protected]> | 2022-05-31 03:58:23 -0500 |
| commit | cbc7d7f7494508fda69e88c76702a878bebca0e2 (patch) | |
| tree | 7a3bec98a7deb82ac95850835d08b2a305b8a0cc /front/odiparpack/app/actions | |
| parent | 32fb17de8f78317b165b6f269a8bab2d4e852d0d (diff) | |
| download | DP1_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/actions')
| -rw-r--r-- | front/odiparpack/app/actions/actionTypes.js | 6 | ||||
| -rw-r--r-- | front/odiparpack/app/actions/almacen.js | 19 | ||||
| -rw-r--r-- | front/odiparpack/app/actions/pedido.js | 1 |
3 files changed, 23 insertions, 3 deletions
diff --git a/front/odiparpack/app/actions/actionTypes.js b/front/odiparpack/app/actions/actionTypes.js index 5aaa47a..8fd305f 100644 --- a/front/odiparpack/app/actions/actionTypes.js +++ b/front/odiparpack/app/actions/actionTypes.js @@ -87,5 +87,7 @@ export const CLOSE_NOTIF = 'CLOSE_NOTIF'; //Odi Message export const CLOSE_MESSAGE = 'CLOSE_MESSAGE'; export const OPEN_MESSAGE = 'OPEN_MESSAGE'; - -export const LISTA_PEDIDO = 'SAVE_PEDIDO';
\ No newline at end of file +//Odi Pedido +export const LISTA_PEDIDO = 'LISTA_PEDIDO'; +//Odi Almacen +export const LISTA_ALMACEN = 'LISTA_ALMACEN';
\ No newline at end of file diff --git a/front/odiparpack/app/actions/almacen.js b/front/odiparpack/app/actions/almacen.js new file mode 100644 index 0000000..b5694cd --- /dev/null +++ b/front/odiparpack/app/actions/almacen.js @@ -0,0 +1,19 @@ +import { + getAlmacenesAPI +} from 'ba-api/almacen'; +import * as types from './actionTypes' + +export const setAlmacenes = (payload) => ({ + type: types.LISTA_ALMACEN, + payload +}); + +export const getAlmacenes = () => async dispatch => { + try{ + const res = await getAlmacenesAPI(); + dispatch(setAlmacenes({res})) + return res; + }catch(e){ + console.log(e) + } +}
\ No newline at end of file diff --git a/front/odiparpack/app/actions/pedido.js b/front/odiparpack/app/actions/pedido.js index f8e95d6..8a011f0 100644 --- a/front/odiparpack/app/actions/pedido.js +++ b/front/odiparpack/app/actions/pedido.js @@ -1,7 +1,6 @@ import { getPedidosAPI } from 'ba-api/pedido'; -import { addMessageCurry } from 'odi-utils/api'; import * as types from './actionTypes' export const setPedidos = (payload) => ({ |
