Moviendo logica
This commit is contained in:
parent
544f54e95d
commit
fdfba78d21
2 changed files with 4 additions and 5 deletions
|
@ -74,9 +74,10 @@ export default {
|
|||
...mapActions('ui', ["toast", "error"]),
|
||||
async confirmar() {
|
||||
if (this.grupo_de_compra_nuevo)
|
||||
this.crear();
|
||||
await this.crear();
|
||||
else
|
||||
this.modificar();
|
||||
await this.modificar();
|
||||
this.cerrar();
|
||||
},
|
||||
async crear() {
|
||||
await this.crearBarrio({
|
||||
|
@ -98,7 +99,6 @@ export default {
|
|||
passAdmin: this.passAdmin,
|
||||
passOllas: this.passOllas,
|
||||
})
|
||||
this.cerrar();
|
||||
},
|
||||
cerrar() {
|
||||
this.toggleModalBarrio();
|
||||
|
|
3
resources/js/store/modules/comisiones.js
vendored
3
resources/js/store/modules/comisiones.js
vendored
|
@ -29,8 +29,6 @@ const mutations = {
|
|||
},
|
||||
seleccionarGrupoDeCompra(state, { grupo_de_compra }) {
|
||||
state.grupo_de_compra_actual = grupo_de_compra;
|
||||
if (!grupo_de_compra)
|
||||
state.grupo_de_compra_nuevo = false;
|
||||
},
|
||||
actualizarGrupoDeCompra(state, { gdc_id, nombre, region }) {
|
||||
const barrio = state.grupos_de_compra.find(gdc => gdc.id === gdc_id);
|
||||
|
@ -46,6 +44,7 @@ const mutations = {
|
|||
},
|
||||
agregarGrupoDeCompra(state, grupo_de_compra) {
|
||||
state.grupos_de_compra.push(grupo_de_compra);
|
||||
state.grupo_de_compra_nuevo = false;
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue