This commit is contained in:
parent
cbb7bea545
commit
90610cb832
|
@ -173,13 +173,13 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
target="_blank"
|
||||
:to="{
|
||||
name: 'TicketList',
|
||||
query: { createForm: JSON.stringify({ clientFk: entity.id }) },
|
||||
query: { createForm: JSON.stringify({ clientId: entity.id }) },
|
||||
}"
|
||||
size="md"
|
||||
color="primary"
|
||||
>
|
||||
<template #default>
|
||||
<QTooltip>{{ t('New order') }}</QTooltip>
|
||||
<QTooltip>{{ t('New ticket') }}</QTooltip>
|
||||
<div class="icon-container">
|
||||
<QIcon class="icon second-icon" name="vn:ticket" />
|
||||
<QIcon
|
||||
|
@ -251,6 +251,7 @@ es:
|
|||
Customer ticket list: Listado de tickets del cliente
|
||||
Customer invoice out list: Listado de facturas del cliente
|
||||
New order: Nuevo pedido
|
||||
New ticket: Nuevo ticket
|
||||
Go to user: Ir al usuario
|
||||
Go to supplier: Ir al proveedor
|
||||
Customer unpaid: Cliente impago
|
||||
|
|
|
@ -198,6 +198,7 @@ const getDateColor = (date) => {
|
|||
formInitialData: {
|
||||
active: true,
|
||||
addressId: null,
|
||||
clientFk: null,
|
||||
},
|
||||
}"
|
||||
:user-params="{ showEmpty: false }"
|
||||
|
@ -228,7 +229,7 @@ const getDateColor = (date) => {
|
|||
<VnSelect
|
||||
url="Clients"
|
||||
:include="{ relation: 'addresses' }"
|
||||
v-model="clientId"
|
||||
v-model="data.clientFk"
|
||||
:label="t('module.customer')"
|
||||
@update:model-value="(id) => fetchClientAddress(id, data)"
|
||||
/>
|
||||
|
|
|
@ -143,15 +143,8 @@ const columns = computed(() => [
|
|||
]);
|
||||
onMounted(() => {
|
||||
if (!route.query.createForm) return;
|
||||
const clientId = route.query.createForm;
|
||||
const id = JSON.parse(clientId);
|
||||
console.error('id: ', id);
|
||||
onClientSelected(JSON.parse(route.query.createForm));
|
||||
});
|
||||
function redirectToLines(id) {
|
||||
const url = `#/ticket/${id}/sale`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
const onClientSelected = async (formData) => {
|
||||
await fetchClient(formData);
|
||||
await fetchAddresses(formData);
|
||||
|
@ -248,7 +241,7 @@ onMounted(() => {
|
|||
urlCreate: 'Tickets/new',
|
||||
title: t('ticketList.createTicket'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: { clientFk: null },
|
||||
formInitialData: { clientId: null },
|
||||
}"
|
||||
default-mode="table"
|
||||
:order="['shippedDate DESC', 'shippedHour ASC', 'zoneLanding ASC', 'id']"
|
||||
|
@ -259,12 +252,12 @@ onMounted(() => {
|
|||
auto-load
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
{{ data }}
|
||||
<VnRow>
|
||||
{{ clientId }}
|
||||
<VnSelect
|
||||
url="Clients"
|
||||
:label="t('ticketList.client')"
|
||||
v-model="data.clientFk"
|
||||
v-model="data.clientId"
|
||||
:options="clientsOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
|
@ -287,7 +280,6 @@ onMounted(() => {
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
url="Addresses"
|
||||
:label="t('ticket.create.address')"
|
||||
v-model="data.addressId"
|
||||
:options="addressesOptions"
|
||||
|
|
Loading…
Reference in New Issue