Compare commits
No commits in common. "db056e7d34071ba5c3a65db9dabff1b4f29a389a" and "09fce4e96a0b155fc2eed36f66ec5911c29f207e" have entirely different histories.
db056e7d34
...
09fce4e96a
3 changed files with 4 additions and 12 deletions
|
@ -13,7 +13,7 @@ class OllasController extends Controller
|
||||||
{
|
{
|
||||||
$tipoOlla = TipoPedido::firstOrCreate(['nombre' => 'olla']);
|
$tipoOlla = TipoPedido::firstOrCreate(['nombre' => 'olla']);
|
||||||
$pedido = $gdc->subpedidos()->firstOrCreate([
|
$pedido = $gdc->subpedidos()->firstOrCreate([
|
||||||
'nombre' => 'Pedido de Ollas de ' . $gdc->nombre,
|
'nombre' => 'Pedido de Olla de ' . $gdc->nombre,
|
||||||
'tipo_pedido_id' => $tipoOlla->id,
|
'tipo_pedido_id' => $tipoOlla->id,
|
||||||
]);
|
]);
|
||||||
return response()->json(new SubpedidoResource($pedido));
|
return response()->json(new SubpedidoResource($pedido));
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
<script>
|
<script>
|
||||||
import PedidosMain from "../pedidos/PedidosMain.vue";
|
import PedidosMain from "../pedidos/PedidosMain.vue";
|
||||||
import { mapActions, mapMutations } from "vuex";
|
import { mapActions } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OllasBody",
|
name: "OllasBody",
|
||||||
components: { PedidosMain },
|
components: { PedidosMain },
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('pedido', ["getPedidoDeOllas", "getGrupoDeCompra"]),
|
...mapActions('pedido', ["getPedidoDeOllas", "getGrupoDeCompra"]),
|
||||||
...mapMutations('ui', ["migasOllas"])
|
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.getGrupoDeCompra();
|
await this.getGrupoDeCompra();
|
||||||
await this.getPedidoDeOllas();
|
await this.getPedidoDeOllas();
|
||||||
this.migasOllas();
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
10
resources/js/store/modules/ui.js
vendored
10
resources/js/store/modules/ui.js
vendored
|
@ -35,10 +35,7 @@ const mutations = {
|
||||||
reset(state) {
|
reset(state) {
|
||||||
state.show_chismosa = false;
|
state.show_chismosa = false;
|
||||||
state.show_devoluciones = false;
|
state.show_devoluciones = false;
|
||||||
},
|
}
|
||||||
migasOllas(state) {
|
|
||||||
state.migas.reverse().pop();
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
|
@ -56,7 +53,7 @@ const actions = {
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(miga.action, miga.arguments ?? null, { root: true });
|
dispatch(miga.action, miga.arguments ?? null, { root: true });
|
||||||
state.migas = dropWhile(state.migas.reverse(), (m => m.nombre !== miga.nombre)).reverse();
|
state.migas = dropWhile(state.migas.reverse(),(m => m.nombre !== miga.nombre)).reverse();
|
||||||
},
|
},
|
||||||
toast(_, { mensaje }) {
|
toast(_, { mensaje }) {
|
||||||
return window.bulmaToast.toast({
|
return window.bulmaToast.toast({
|
||||||
|
@ -75,9 +72,6 @@ const actions = {
|
||||||
resetear({ commit }) {
|
resetear({ commit }) {
|
||||||
commit("reset");
|
commit("reset");
|
||||||
},
|
},
|
||||||
migasOllas({ commit }) {
|
|
||||||
commit("migasOllas");
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
Loading…
Add table
Reference in a new issue