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/components/Tables | |
| 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/components/Tables')
| -rw-r--r-- | front/odiparpack/app/components/Tables/CrudTableForm.js | 15 | ||||
| -rw-r--r-- | front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/front/odiparpack/app/components/Tables/CrudTableForm.js b/front/odiparpack/app/components/Tables/CrudTableForm.js index 017a3fc..5e99280 100644 --- a/front/odiparpack/app/components/Tables/CrudTableForm.js +++ b/front/odiparpack/app/components/Tables/CrudTableForm.js @@ -15,21 +15,30 @@ class CrudTableForm extends React.Component { this.props.fetchData(this.props.dataInit, this.props.branch); } } + + renderData(){ + this.props.dispatch(this.props.getDataAPI()).then((res) => { + if (res) { + this.props.fetchData(res.data, this.props.branch); + } + }) + }6 + sendValues = (values) => { setTimeout(() => { this.props.submit(values, this.props.branch); }, 500); if (this.props.editingId === this.props.initValues.get('id')) { - this.props.dispatch(this.props.editRowAPI()).then((res) => { + this.props.dispatch(this.props.editRowAPI(values)).then((res) => { if (res) { console.log("EDIT RO ", res) } }) } else { - this.props.dispatch(this.props.addNewAPI()).then((res) => { + this.props.dispatch(this.props.addNewAPI(values)).then((res) => { if (res) { - console.log("ADD NEW FORM ", res) + this.renderData(); } }) } diff --git a/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js b/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js index f6be3fd..5e58ca7 100644 --- a/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js +++ b/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js @@ -29,7 +29,7 @@ class RowReadOnly extends React.Component { } = this.props; const eventDel = () => { removeRow(item, branch); - this.props.dispatch(removeRowAPI()).then((res) => { + this.props.dispatch(removeRowAPI(item.get('id'))).then((res) => { if (res) { console.log("REMOVE READ ONLY ", res) } |
