From 92e172fcaf8874678f36f77df9dd04cf9a7a53ac Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 25 Apr 2024 12:56:02 +0200 Subject: [PATCH 01/65] feat: refs #7039 country change column country - name --- src/components/CreateBankEntityForm.vue | 4 ++-- src/components/CreateNewPostcodeForm.vue | 2 +- src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue | 2 +- src/pages/Supplier/SupplierListFilter.vue | 4 ++-- src/pages/Worker/Card/WorkerBasicData.vue | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 2d098beb0..6bf0afe56 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -26,7 +26,7 @@ const bankEntityFormData = reactive({ }); const countriesFilter = { - fields: ['id', 'country', 'code'], + fields: ['id', 'name', 'code'], }; const countriesOptions = ref([]); @@ -83,7 +83,7 @@ onMounted(async () => { v-model="data.countryFk" :options="countriesOptions" option-value="id" - option-label="country" + option-label="name" hide-selected :required="true" :rules="validate('bankEntity.countryFk')" diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 02e84849c..2c546acc3 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -142,7 +142,7 @@ const onProvinceCreated = async ({ name }, formData) => { :label="t('Country')" :options="countriesOptions" hide-selected - option-label="country" + option-label="name" option-value="id" v-model="data.countryFk" :rules="validate('postcode.countryFk')" diff --git a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue index 746ee130f..cf1c852a7 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue @@ -90,7 +90,7 @@ function getTotal(type) { url="Countries" auto-load @on-fetch="(data) => (countries = data)" - sort-by="country" + sort-by="name" /> @@ -92,7 +92,7 @@ const countriesOptions = ref([]); @update:model-value="searchFn()" :options="countriesOptions" option-value="id" - option-label="country" + option-label="name" hide-selected dense outlined diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue index 775472065..5fccd665b 100644 --- a/src/pages/Worker/Card/WorkerBasicData.vue +++ b/src/pages/Worker/Card/WorkerBasicData.vue @@ -36,8 +36,8 @@ const workersFilter = { limit: 30, }; const countriesFilter = { - fields: ['id', 'country', 'code'], - order: 'country ASC', + fields: ['id', 'name', 'code'], + order: 'name ASC', limit: 30, }; const educationLevelsFilter = { fields: ['id', 'name'], order: 'name ASC', limit: 30 }; @@ -126,7 +126,7 @@ const maritalStatus = [ :label="t('Origin country')" :options="countriesOptions" hide-selected - option-label="country" + option-label="name" option-value="id" v-model="data.originCountryFk" /> From 93bbd0c222634a86a888ec41ce868c4e3e56348d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 26 Apr 2024 10:48:25 +0200 Subject: [PATCH 02/65] fix: icons --- src/router/modules/customer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js index 5ef5945f3..092d60639 100644 --- a/src/router/modules/customer.js +++ b/src/router/modules/customer.js @@ -87,7 +87,7 @@ export default { name: 'CustomerNotifications', meta: { title: 'notifications', - icon: 'notifications', + icon: 'campaign', }, component: () => import( @@ -99,7 +99,7 @@ export default { name: 'CustomerDefaulter', meta: { title: 'defaulter', - icon: 'vn:risk', + icon: 'vn:defaulter', }, component: () => import('src/pages/Customer/Defaulter/CustomerDefaulter.vue'), From f169ca6778c6d0c327239cb13331ceab4d66e2a2 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 26 Apr 2024 11:02:48 +0200 Subject: [PATCH 03/65] fix: add button showPDF --- src/pages/Customer/Card/CustomerBalance.vue | 24 +++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/pages/Customer/Card/CustomerBalance.vue b/src/pages/Customer/Card/CustomerBalance.vue index f7d22a345..420bef9bc 100644 --- a/src/pages/Customer/Card/CustomerBalance.vue +++ b/src/pages/Customer/Card/CustomerBalance.vue @@ -11,6 +11,7 @@ import { useState } from 'src/composables/useState'; import { useStateStore } from 'stores/useStateStore'; import { useValidator } from 'src/composables/useValidator'; import { usePrintService } from 'src/composables/usePrintService'; +import { useSession } from 'src/composables/useSession'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; import FetchData from 'components/FetchData.vue'; @@ -19,6 +20,9 @@ import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue'; +const session = useSession(); + +const tokenMultimedia = session.getTokenMultimedia(); const { sendEmail } = usePrintService(); const { t } = useI18n(); @@ -188,6 +192,11 @@ const saveFieldValue = async (row) => { const sendEmailAction = () => { sendEmail(`Suppliers/${route.params.id}/campaign-metrics-email`); }; + +const showBalancePdf = (balance) => { + const url = `api/InvoiceOuts/${balance.id}/download?access_token=${tokenMultimedia}`; + window.open(url, '_blank'); +};