funcion/refactor-general #45

Open
atasistro wants to merge 198 commits from funcion/refactor-general into master
Showing only changes of commit a594e8a049 - Show all commits

View file

@ -25,7 +25,7 @@
v-text="subpedidoExistente.nombre"></p>
</div>
<div class="buttons column is-half-mobile is-one-third-desktop is-one-third-tablet">
<button class="button is-danger" @click="elegirSubpedido(subpedidoExistente)">Continuar pedido
<button class="button is-danger" @click="elegirPedido({ pedido: subpedidoExistente })">Continuar pedido
</button>
</div>
</div>
@ -67,21 +67,7 @@ export default {
},
async submit() {
await this.crearPedido({ nombre: this.searchString, grupo_de_compra_id: this.grupo_de_compra_id });
this.guardarSubpedidoEnSesion({ id: this.pedido_id, nombre: this.nombre });
},
elegirSubpedido(subpedido) {
//lo guardamos en sesion
this.guardarSubpedidoEnSesion(subpedido);
},
guardarSubpedidoEnSesion(subpedido) {
this.elegirPedido({ pedido: subpedido });
axios.post("/subpedidos/guardar_sesion", {
subpedido: subpedido,
grupo_de_compra_id: this.grupo_de_compra_id
}).then(_ => {
Event.$emit('obtener-sesion')
});
}
}
}
</script>