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