8713-testToMaster #1539
|
@ -121,12 +121,16 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'shipped',
|
name: 'shipped',
|
||||||
|
component: 'time',
|
||||||
|
columnFilter: false,
|
||||||
label: t('ticketList.hour'),
|
label: t('ticketList.hour'),
|
||||||
format: (row) => toTimeFormat(row.shipped),
|
format: (row) => toTimeFormat(row.shipped),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'zoneLanding',
|
name: 'zoneLanding',
|
||||||
|
component: 'time',
|
||||||
|
columnFilter: false,
|
||||||
label: t('ticketList.closure'),
|
label: t('ticketList.closure'),
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(toTimeFormat(row.zoneLanding)),
|
format: (row, dashIfEmpty) => dashIfEmpty(toTimeFormat(row.zoneLanding)),
|
||||||
},
|
},
|
||||||
|
@ -146,9 +150,16 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'province',
|
name: 'provinceFk',
|
||||||
label: t('ticketList.province'),
|
label: t('ticketList.province'),
|
||||||
columnClass: 'expand',
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'Provinces',
|
||||||
|
},
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.province),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -182,9 +193,21 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'warehouse',
|
name: 'warehouseFk',
|
||||||
label: t('ticketList.warehouse'),
|
label: t('globals.warehouse'),
|
||||||
columnClass: 'expand',
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'warehouses',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
optionLabel: 'name',
|
||||||
|
optionValue: 'id',
|
||||||
|
},
|
||||||
|
format: (row) => row.warehouse,
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
cardVisible: false,
|
||||||
|
create: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -216,6 +239,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
title: t('components.smartCard.viewSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
|
isPrimary: true,
|
||||||
action: (row, evt) => {
|
action: (row, evt) => {
|
||||||
if (evt && evt.ctrlKey) {
|
if (evt && evt.ctrlKey) {
|
||||||
const url = router.resolve({
|
const url = router.resolve({
|
||||||
|
@ -251,11 +275,9 @@ const fetchAvailableAgencies = async (formData) => {
|
||||||
const response = await getAgencies(formData, selectedClient.value);
|
const response = await getAgencies(formData, selectedClient.value);
|
||||||
if (!response) return;
|
if (!response) return;
|
||||||
|
|
||||||
const { options, agency } = response
|
const { options, agency } = response;
|
||||||
if(options)
|
if (options) agenciesOptions.value = options;
|
||||||
agenciesOptions.value = options;
|
if (agency) formData.agencyModeId = agency;
|
||||||
if(agency)
|
|
||||||
formData.agencyModeId = agency;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchClient = async (formData) => {
|
const fetchClient = async (formData) => {
|
||||||
|
@ -330,7 +352,7 @@ function openBalanceDialog(ticket) {
|
||||||
const description = ref([]);
|
const description = ref([]);
|
||||||
const firstTicketClientId = checkedTickets[0].clientFk;
|
const firstTicketClientId = checkedTickets[0].clientFk;
|
||||||
const isSameClient = checkedTickets.every(
|
const isSameClient = checkedTickets.every(
|
||||||
(ticket) => ticket.clientFk === firstTicketClientId
|
(ticket) => ticket.clientFk === firstTicketClientId,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!isSameClient) {
|
if (!isSameClient) {
|
||||||
|
@ -369,7 +391,7 @@ async function onSubmit() {
|
||||||
description: dialogData.value.value.description,
|
description: dialogData.value.value.description,
|
||||||
clientFk: dialogData.value.value.clientFk,
|
clientFk: dialogData.value.value.clientFk,
|
||||||
email: email[0].email,
|
email: email[0].email,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (data) notify('globals.dataSaved', 'positive');
|
if (data) notify('globals.dataSaved', 'positive');
|
||||||
|
@ -388,32 +410,32 @@ function setReference(data) {
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case 1:
|
case 1:
|
||||||
newDescription = `${t(
|
newDescription = `${t(
|
||||||
'ticketList.creditCard'
|
'ticketList.creditCard',
|
||||||
)}, ${dialogData.value.value.description.replace(
|
)}, ${dialogData.value.value.description.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
''
|
'',
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
newDescription = `${t(
|
newDescription = `${t(
|
||||||
'ticketList.cash'
|
'ticketList.cash',
|
||||||
)}, ${dialogData.value.value.description.replace(
|
)}, ${dialogData.value.value.description.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
''
|
'',
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
newDescription = `${newDescription.replace(
|
newDescription = `${newDescription.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
''
|
'',
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
newDescription = `${t(
|
newDescription = `${t(
|
||||||
'ticketList.transfers'
|
'ticketList.transfers',
|
||||||
)}, ${dialogData.value.value.description.replace(
|
)}, ${dialogData.value.value.description.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
''
|
'',
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 3317:
|
case 3317:
|
||||||
|
|
Loading…
Reference in New Issue