This commit is contained in:
parent
6ac52e0b5f
commit
6c9406cfb0
|
@ -47,14 +47,13 @@ const userParams = {
|
||||||
to: null,
|
to: null,
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
initializeFromQuery();
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
if (!route.query.createForm) return;
|
if (!route.query.createForm) return;
|
||||||
onClientSelected(JSON.parse(route.query.createForm));
|
onClientSelected(JSON.parse(route.query.createForm));
|
||||||
});
|
});
|
||||||
// Método para inicializar las variables desde la query string
|
|
||||||
const initializeFromQuery = () => {
|
const initializeFromQuery = () => {
|
||||||
const query = route.query.table ? JSON.parse(route.query.table) : {};
|
const query = route.query.table ? JSON.parse(route.query.table) : {};
|
||||||
|
|
||||||
// Asigna los valores a las variables correspondientes
|
|
||||||
from.value = query.from || from.toISOString();
|
from.value = query.from || from.toISOString();
|
||||||
to.value = query.to || to.toISOString();
|
to.value = query.to || to.toISOString();
|
||||||
Object.assign(userParams, { from, to });
|
Object.assign(userParams, { from, to });
|
||||||
|
@ -312,11 +311,6 @@ const getDateColor = (date) => {
|
||||||
if (comparation < 0) return 'bg-success';
|
if (comparation < 0) return 'bg-success';
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
initializeFromQuery();
|
|
||||||
stateStore.rightDrawer = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
async function makeInvoice(ticket) {
|
async function makeInvoice(ticket) {
|
||||||
const ticketsIds = ticket.map((item) => item.id);
|
const ticketsIds = ticket.map((item) => item.id);
|
||||||
const { data } = await axios.post(`Tickets/invoiceTicketsAndPdf`, { ticketsIds });
|
const { data } = await axios.post(`Tickets/invoiceTicketsAndPdf`, { ticketsIds });
|
||||||
|
|
Loading…
Reference in New Issue