Compare commits

...

2 Commits

Author SHA1 Message Date
Javier Segarra 09804e06c7 feat: refs #7134 #7124 handle filter
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 14:28:47 +01:00
Javier Segarra 78e70f2b69 feat: refs #7134 #7124 handle columns 2024-11-20 14:28:41 +01:00
2 changed files with 50 additions and 49 deletions

View File

@ -6,9 +6,8 @@ import { useAcl } from 'src/composables/useAcl';
import axios from 'axios';
import { useQuasar } from 'quasar';
import { getSupplierRisk } from 'src/composables/getRisk';
import RightMenu from 'src/components/common/RightMenu.vue';
import { toCurrency, toDate, toDateHourMin } from 'src/filters';
import { dashIfEmpty, toCurrency, toDate, toDateHourMin } from 'src/filters';
import { useState } from 'composables/useState';
import { useStateStore } from 'stores/useStateStore';
import { usePrintService } from 'composables/usePrintService';
@ -74,40 +73,41 @@ const companyFilterColumn = {
};
const columns = computed(() => [
// {
// align: 'left',
// name: 'payed',
// label: t('Date'),
// format: ({ payed }) => toDate(payed),
// cardVisible: true,
// },
{
align: 'left',
name: 'payed',
label: t('Date'),
format: ({ payed }) => toDate(payed),
cardVisible: true,
},
{
align: 'left',
name: 'created',
name: 'dated',
label: t('Creation date'),
format: ({ created }) => toDateHourMin(created),
format: ({ dated }) => toDateHourMin(dated),
cardVisible: true,
},
// {
// align: 'left',
// label: t('Employee'),
// columnField: {
// component: 'userLink',
// attrs: ({ row }) => {
// return {
// workerId: row.workerFk,
// name: row.userName,
// };
// },
// },
// cardVisible: true,
// },
{
align: 'left',
label: t('Employee'),
columnField: {
component: 'userLink',
attrs: ({ row }) => {
return {
workerId: row.workerFk,
name: row.userName,
};
},
},
cardVisible: true,
},
{
align: 'left',
name: 'description',
name: 'sref',
label: t('Reference'),
isTitle: true,
class: 'extend',
format: ({ sref }) => dashIfEmpty(sref),
},
{
align: 'left',
@ -117,23 +117,23 @@ const columns = computed(() => [
},
{
align: 'left',
name: 'debit',
name: 'invoiceEuros',
label: t('Debit'),
format: ({ debit }) => debit && toCurrency(debit),
format: ({ invoiceEuros }) => invoiceEuros && toCurrency(invoiceEuros),
isId: true,
},
{
align: 'left',
name: 'credit',
name: 'paymentEuros',
label: t('Havings'),
format: ({ credit }) => credit && toCurrency(credit),
format: ({ paymentEuros }) => paymentEuros && toCurrency(paymentEuros),
cardVisible: true,
},
{
align: 'left',
name: 'balance',
name: 'euroBalance',
label: t('Balance'),
format: ({ balance }) => toCurrency(balance),
format: ({ euroBalance }) => toCurrency(euroBalance),
cardVisible: true,
},
{
@ -146,23 +146,23 @@ const columns = computed(() => [
align: 'left',
name: 'tableActions',
actions: [
{
title: t('globals.downloadPdf'),
icon: 'cloud_download',
show: (row) => row.isInvoice,
action: (row) => showBalancePdf(row),
},
{
title: t('Send compensation'),
icon: 'outgoing_mail',
show: (row) => !!row.isCompensation,
action: ({ id }) =>
openConfirmationModal(
t('Send compensation'),
t('Do you want to report compensation to the supplier by mail?'),
() => sendEmail(`Receipts/${id}/balance-compensation-email`)
),
},
// {
// title: t('globals.downloadPdf'),
// icon: 'cloud_download',
// show: (row) => row.isInvoice,
// action: (row) => showBalancePdf(row),
// },
// {
// title: t('Send compensation'),
// icon: 'outgoing_mail',
// show: (row) => !!row.isCompensation,
// action: ({ id }) =>
// openConfirmationModal(
// t('Send compensation'),
// t('Do you want to report compensation to the supplier by mail?'),
// () => sendEmail(`Receipts/${id}/balance-compensation-email`)
// ),
// },
],
},
]);

View File

@ -23,6 +23,7 @@ defineProps({
</div>
</template>
<template #body="{ params, searchFn }">
{{ params }}
<QItem>
<QItemSection>
<VnInputDate