Arreglado parametro
This commit is contained in:
parent
fd055cd7c6
commit
a594e8a049
1 changed files with 1 additions and 15 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue