From 78e70f2b698e8bada5503e5ac7e190993003eddd Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 20 Nov 2024 14:28:41 +0100 Subject: [PATCH] feat: refs #7134 #7124 handle columns --- src/pages/Supplier/Card/SupplierBalance.vue | 98 ++++++++++----------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/pages/Supplier/Card/SupplierBalance.vue b/src/pages/Supplier/Card/SupplierBalance.vue index 9fb424220..dcfa7c72b 100644 --- a/src/pages/Supplier/Card/SupplierBalance.vue +++ b/src/pages/Supplier/Card/SupplierBalance.vue @@ -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`) + // ), + // }, ], }, ]);