fix: ticketList columnfilter
gitea/salix-front/pipeline/pr-test This commit looks good
Details
gitea/salix-front/pipeline/pr-test This commit looks good
Details
This commit is contained in:
parent
1972e921df
commit
2ec5c2b49f
|
@ -121,12 +121,16 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'shipped',
|
||||
component: 'time',
|
||||
columnFilter: false,
|
||||
label: t('ticketList.hour'),
|
||||
format: (row) => toTimeFormat(row.shipped),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'zoneLanding',
|
||||
component: 'time',
|
||||
columnFilter: false,
|
||||
label: t('ticketList.closure'),
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toTimeFormat(row.zoneLanding)),
|
||||
},
|
||||
|
@ -146,9 +150,16 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'province',
|
||||
name: 'provinceFk',
|
||||
label: t('ticketList.province'),
|
||||
columnClass: 'expand',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Provinces',
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.province),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -182,9 +193,21 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'warehouse',
|
||||
label: t('ticketList.warehouse'),
|
||||
columnClass: 'expand',
|
||||
name: 'warehouseFk',
|
||||
label: t('globals.warehouse'),
|
||||
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',
|
||||
|
@ -216,6 +239,7 @@ const columns = computed(() => [
|
|||
{
|
||||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
isPrimary: true,
|
||||
action: (row, evt) => {
|
||||
if (evt && evt.ctrlKey) {
|
||||
const url = router.resolve({
|
||||
|
@ -232,7 +256,7 @@ const columns = computed(() => [
|
|||
|
||||
function resetAgenciesSelector(formData) {
|
||||
agenciesOptions.value = [];
|
||||
if(formData) formData.agencyModeId = null;
|
||||
if (formData) formData.agencyModeId = null;
|
||||
}
|
||||
|
||||
function redirectToLines(id) {
|
||||
|
@ -240,7 +264,7 @@ function redirectToLines(id) {
|
|||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
const onClientSelected = async (formData) => {
|
||||
const onClientSelected = async (formData) => {
|
||||
resetAgenciesSelector(formData);
|
||||
await fetchClient(formData);
|
||||
await fetchAddresses(formData);
|
||||
|
@ -248,14 +272,12 @@ const onClientSelected = async (formData) => {
|
|||
|
||||
const fetchAvailableAgencies = async (formData) => {
|
||||
resetAgenciesSelector(formData);
|
||||
const response= await getAgencies(formData, selectedClient.value);
|
||||
const response = await getAgencies(formData, selectedClient.value);
|
||||
if (!response) return;
|
||||
|
||||
const { options, agency } = response
|
||||
if(options)
|
||||
agenciesOptions.value = options;
|
||||
if(agency)
|
||||
formData.agencyModeId = agency;
|
||||
|
||||
const { options, agency } = response;
|
||||
if (options) agenciesOptions.value = options;
|
||||
if (agency) formData.agencyModeId = agency;
|
||||
};
|
||||
|
||||
const fetchClient = async (formData) => {
|
||||
|
@ -330,7 +352,7 @@ function openBalanceDialog(ticket) {
|
|||
const description = ref([]);
|
||||
const firstTicketClientId = checkedTickets[0].clientFk;
|
||||
const isSameClient = checkedTickets.every(
|
||||
(ticket) => ticket.clientFk === firstTicketClientId
|
||||
(ticket) => ticket.clientFk === firstTicketClientId,
|
||||
);
|
||||
|
||||
if (!isSameClient) {
|
||||
|
@ -369,7 +391,7 @@ async function onSubmit() {
|
|||
description: dialogData.value.value.description,
|
||||
clientFk: dialogData.value.value.clientFk,
|
||||
email: email[0].email,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (data) notify('globals.dataSaved', 'positive');
|
||||
|
@ -388,32 +410,32 @@ function setReference(data) {
|
|||
switch (data) {
|
||||
case 1:
|
||||
newDescription = `${t(
|
||||
'ticketList.creditCard'
|
||||
'ticketList.creditCard',
|
||||
)}, ${dialogData.value.value.description.replace(
|
||||
/^(Credit Card, |Cash, |Transfers, )/,
|
||||
''
|
||||
'',
|
||||
)}`;
|
||||
break;
|
||||
case 2:
|
||||
newDescription = `${t(
|
||||
'ticketList.cash'
|
||||
'ticketList.cash',
|
||||
)}, ${dialogData.value.value.description.replace(
|
||||
/^(Credit Card, |Cash, |Transfers, )/,
|
||||
''
|
||||
'',
|
||||
)}`;
|
||||
break;
|
||||
case 3:
|
||||
newDescription = `${newDescription.replace(
|
||||
/^(Credit Card, |Cash, |Transfers, )/,
|
||||
''
|
||||
'',
|
||||
)}`;
|
||||
break;
|
||||
case 4:
|
||||
newDescription = `${t(
|
||||
'ticketList.transfers'
|
||||
'ticketList.transfers',
|
||||
)}, ${dialogData.value.value.description.replace(
|
||||
/^(Credit Card, |Cash, |Transfers, )/,
|
||||
''
|
||||
'',
|
||||
)}`;
|
||||
break;
|
||||
case 3317:
|
||||
|
|
Loading…
Reference in New Issue