diff options
| author | gabrhr <[email protected]> | 2022-06-06 11:35:56 -0500 |
|---|---|---|
| committer | gabrhr <[email protected]> | 2022-06-06 11:35:56 -0500 |
| commit | fab7d63333b86b9fe0f1c52d2c642b52bbf506c0 (patch) | |
| tree | 59e3541bbe92c67fdf54bc0ef6efabb0a4fe1d6c /front/odiparpack/app/api/camion.js | |
| parent | 3a91d18704ee5ac783b398b1589ee2b14ea35321 (diff) | |
| download | DP1_project-fab7d63333b86b9fe0f1c52d2c642b52bbf506c0.tar.gz DP1_project-fab7d63333b86b9fe0f1c52d2c642b52bbf506c0.tar.bz2 DP1_project-fab7d63333b86b9fe0f1c52d2c642b52bbf506c0.zip | |
Add CRUD Camiones
- 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
Diffstat (limited to 'front/odiparpack/app/api/camion.js')
| -rw-r--r-- | front/odiparpack/app/api/camion.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/front/odiparpack/app/api/camion.js b/front/odiparpack/app/api/camion.js index 8229bbf..b368522 100644 --- a/front/odiparpack/app/api/camion.js +++ b/front/odiparpack/app/api/camion.js @@ -1,6 +1,21 @@ -import { apiGet } from '../utils/odipar/api'; +import { apiDelete, apiGet, apiPost, apiPut } from '../utils/odipar/api'; //GET APIS export const getCamionAPI = async () => { return await apiGet(`camion/`) } + +//POST APIS +export const insertarCamionAPI = async (data) => { + return await apiPost(`camion/`, data) +} + +//PUT APIS +export const editarCamionAPI = async (data) => { + return await apiPut(`camion/`, data) +} + +//DELETE APIS +export const eliminarCamionAPI = async (id) => { + return await apiDelete(`camion/${id}`) +} |
