Cambio de nombre de modulos + info de devoluciones habilitadas movida de pedido a barrio

This commit is contained in:
Alejandro Tasistro 2025-05-21 16:23:47 -03:00
parent 6c7e62bcb0
commit 7bfbbd9309
5 changed files with 7 additions and 6 deletions

View file

@ -16,6 +16,7 @@ class GrupoDeCompraReducido extends JsonResource
return [
'id' => $this->id,
'nombre' => $this->nombre,
'devoluciones_habilitadas' => $this->devoluciones_habilitadas,
];
}
}

View file

@ -22,7 +22,6 @@ class SubpedidoResource extends JsonResource
return [
'id' => $this->id,
'nombre' => $this->nombre,
'grupo_de_compra' => $this->grupoDeCompra,
'productos' => $productos,
'aprobado' => (bool) $this->aprobado,
'total' => number_format($this->total(),2),

View file

@ -2,8 +2,8 @@ import Vue from 'vue';
import Vuex from 'vuex';
import admin from "./modules/admin";
import login from "./modules/login";
import chismosa from "./modules/chismosa";
import session from "./modules/session";
import chismosa from "./modules/pedido";
import session from "./modules/barrio";
Vue.use(Vuex);

View file

@ -1,14 +1,17 @@
import axios from "axios";
const state = {
lastFetch: null,
grupo_de_compra_id: null,
grupo_de_compra: null
grupo_de_compra: null,
devoluciones_habilitadas: null,
};
const mutations = {
setState(state, { grupo_de_compra }) {
state.grupo_de_compra_id = grupo_de_compra.id;
state.grupo_de_compra = grupo_de_compra.nombre;
state.devoluciones_habilitadas = grupo_de_compra.devoluciones_habilitadas;
}
};

View file

@ -8,7 +8,6 @@ const state = {
total_transporte: null,
cantidad_transporte: null,
total_sin_devoluciones: null,
devoluciones_habilitadas: null,
devoluciones_total: null,
devoluciones_notas: null,
};
@ -24,7 +23,6 @@ const mutations = {
state.total_transporte = pedido.total_transporte;
state.cantidad_transporte = pedido.cantidad_transporte;
state.total_sin_devoluciones = pedido.total_sin_devoluciones;
state.devoluciones_habilitadas = pedido.grupo_de_compra.devoluciones_habilitadas;
state.devoluciones_total = pedido.devoluciones_total;
state.devoluciones_notas = pedido.devoluciones_notas;
},