From 3cf3687b84f24d926f051370ba96be43beb23151 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Mon, 12 Feb 2024 13:54:17 -0500 Subject: [PATCH] Correccion de comentarios3 --- src/i18n/en/index.js | 2 + src/i18n/es/index.js | 3 + src/pages/Customer/Card/CustomerBalance.vue | 57 ++++++++-- src/pages/Customer/Card/CustomerBasicData.vue | 102 +++++++++++++----- src/pages/Customer/Card/CustomerCredits.vue | 6 +- .../Customer/Card/CustomerDescriptor.vue | 24 ++++- .../Customer/Card/CustomerFileManagement.vue | 6 +- src/pages/Customer/Card/CustomerGreuges.vue | 4 +- .../Customer/Card/CustomerRecoveries.vue | 8 +- src/pages/Customer/Card/CustomerSamples.vue | 5 +- .../CustomerCreditContractsInsurance.vue | 6 +- .../CustomerFileManagementCreate.vue | 2 +- .../components/CustomerFileManagementEdit.vue | 2 +- .../components/CustomerNewPayment.vue | 4 +- 14 files changed, 171 insertions(+), 60 deletions(-) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 36aaeaedb..7dc414e2a 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -225,11 +225,13 @@ export default { socialName: 'Fiscal name', businessType: 'Business type', contact: 'Contact', + youCanSaveMultipleEmails: 'You can save multiple emails', email: 'Email', phone: 'Phone', mobile: 'Mobile', salesPerson: 'Sales person', contactChannel: 'Contact channel', + previousClient: 'Previous client', }, extendedList: { tableVisibleColumns: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index eeed05533..46287e8b6 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -224,11 +224,14 @@ export default { socialName: 'Nombre fiscal', businessType: 'Tipo de negocio', contact: 'Contacto', + youCanSaveMultipleEmails: + 'Puedeguardar varios correos electrónicos encadenandolos mediante comas sin espacios, ejemplo: user@dominio.com,user2@dominio.com siendo el primer correo electrónico el principal', email: 'Email', phone: 'Teléfono', mobile: 'Móvil', salesPerson: 'Comercial', contactChannel: 'Canal de contacto', + previousClient: 'Cliente anterior', }, extendedList: { tableVisibleColumns: { diff --git a/src/pages/Customer/Card/CustomerBalance.vue b/src/pages/Customer/Card/CustomerBalance.vue index a718275af..ca21c3585 100644 --- a/src/pages/Customer/Card/CustomerBalance.vue +++ b/src/pages/Customer/Card/CustomerBalance.vue @@ -3,15 +3,17 @@ import { computed, onBeforeMount, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; -import { date, QCheckbox, QBtn, useQuasar } from 'quasar'; +import axios from 'axios'; +import { QCheckbox, QBtn, useQuasar, QField, QPopupEdit } from 'quasar'; -import { toCurrency } from 'src/filters'; +import { toCurrency, toDate, toDateHour } from 'src/filters'; import { useState } from 'src/composables/useState'; import { useStateStore } from 'stores/useStateStore'; import { useValidator } from 'src/composables/useValidator'; import FetchData from 'components/FetchData.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; +import VnInput from 'src/components/common/VnInput.vue'; import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; @@ -58,7 +60,8 @@ const tableColumnComponents = { event: () => {}, }, description: { - component: 'span', + component: QField, + attrs: () => ({ readonly: true, dense: true }), props: () => {}, event: () => {}, }, @@ -96,14 +99,14 @@ const columns = computed(() => [ { align: 'left', field: 'payed', - format: (value) => date.formatDate(value, 'DD/MM/YYYY'), + format: (value) => toDate(value), label: t('Date'), name: 'payed', }, { align: 'left', field: 'created', - format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'), + format: (value) => toDateHour(value), label: t('Creation date'), name: 'created', }, @@ -182,6 +185,15 @@ const updateCompanyId = (id) => { } getData(); }; + +const saveFieldValue = async (event) => { + try { + const payload = { description: event.value }; + await axios.patch(`Receipts/${event.key}`, payload); + } catch (err) { + return err; + } +}; + + +es: + In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente + diff --git a/src/pages/Customer/Card/CustomerCredits.vue b/src/pages/Customer/Card/CustomerCredits.vue index e59c3edf9..055ba5f9b 100644 --- a/src/pages/Customer/Card/CustomerCredits.vue +++ b/src/pages/Customer/Card/CustomerCredits.vue @@ -3,9 +3,9 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute, useRouter } from 'vue-router'; -import { date, QBtn } from 'quasar'; +import { QBtn } from 'quasar'; -import { toCurrency } from 'src/filters'; +import { toCurrency, toDateHour } from 'src/filters'; import FetchData from 'components/FetchData.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; @@ -55,7 +55,7 @@ const columns = computed(() => [ field: 'created', label: t('Since'), name: 'created', - format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'), + format: (value) => toDateHour(value), }, { align: 'left', diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue index 222406d8a..005951c7a 100644 --- a/src/pages/Customer/Card/CustomerDescriptor.vue +++ b/src/pages/Customer/Card/CustomerDescriptor.vue @@ -2,10 +2,13 @@ import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; + import { toCurrency } from 'src/filters'; + +import useCardDescription from 'src/composables/useCardDescription'; + import CardDescriptor from 'components/ui/CardDescriptor.vue'; import VnLv from 'src/components/ui/VnLv.vue'; -import useCardDescription from 'src/composables/useCardDescription'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; const $props = defineProps({ @@ -95,7 +98,10 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity diff --git a/src/pages/Customer/Card/CustomerFileManagement.vue b/src/pages/Customer/Card/CustomerFileManagement.vue index c845493ae..eaf9c006a 100644 --- a/src/pages/Customer/Card/CustomerFileManagement.vue +++ b/src/pages/Customer/Card/CustomerFileManagement.vue @@ -3,8 +3,10 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute, useRouter } from 'vue-router'; -import { date, QBadge, QBtn, QCheckbox } from 'quasar'; +import { QBadge, QBtn, QCheckbox } from 'quasar'; + import { downloadFile } from 'src/composables/downloadFile'; +import { toDateHour } from 'src/filters'; import FetchData from 'components/FetchData.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; @@ -161,7 +163,7 @@ const columns = computed(() => [ field: (value) => value.dms.created, label: t('Created'), name: 'created', - format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'), + format: (value) => toDateHour(value), }, { align: 'right', diff --git a/src/pages/Customer/Card/CustomerGreuges.vue b/src/pages/Customer/Card/CustomerGreuges.vue index 487f4b382..9a2c5028b 100644 --- a/src/pages/Customer/Card/CustomerGreuges.vue +++ b/src/pages/Customer/Card/CustomerGreuges.vue @@ -5,7 +5,7 @@ import { useRoute, useRouter } from 'vue-router'; import { date, QBtn } from 'quasar'; -import { toCurrency } from 'src/filters'; +import { toCurrency, toDateHour } from 'src/filters'; import FetchData from 'components/FetchData.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; @@ -73,7 +73,7 @@ const columns = computed(() => [ field: 'shipped', label: t('Date'), name: 'date', - format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'), + format: (value) => toDateHour(value), }, { align: 'left', diff --git a/src/pages/Customer/Card/CustomerRecoveries.vue b/src/pages/Customer/Card/CustomerRecoveries.vue index 749eec4cc..e275d7d53 100644 --- a/src/pages/Customer/Card/CustomerRecoveries.vue +++ b/src/pages/Customer/Card/CustomerRecoveries.vue @@ -3,9 +3,7 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute, useRouter } from 'vue-router'; -import { date, QBtn } from 'quasar'; - -import { toCurrency } from 'src/filters'; +import { toCurrency, toDate } from 'src/filters'; import FetchData from 'components/FetchData.vue'; @@ -49,14 +47,14 @@ const columns = computed(() => [ field: 'started', label: t('Since'), name: 'since', - format: (value) => date.formatDate(value, 'DD/MM/YYYY'), + format: (value) => toDate(value), }, { align: 'left', field: 'finished', label: t('To'), name: 'to', - format: (value) => date.formatDate(value, 'DD/MM/YYYY'), + format: (value) => toDate(value), }, { align: 'left', diff --git a/src/pages/Customer/Card/CustomerSamples.vue b/src/pages/Customer/Card/CustomerSamples.vue index fba6402ed..f5cc93274 100644 --- a/src/pages/Customer/Card/CustomerSamples.vue +++ b/src/pages/Customer/Card/CustomerSamples.vue @@ -3,10 +3,11 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute, useRouter } from 'vue-router'; -import { date, QBtn } from 'quasar'; +import { QBtn } from 'quasar'; import FetchData from 'components/FetchData.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import { toDateHour } from 'src/filters'; const { t } = useI18n(); const route = useRoute(); @@ -54,7 +55,7 @@ const columns = computed(() => [ field: 'created', label: t('Sent'), name: 'sent', - format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'), + format: (value) => toDateHour(value), }, { align: 'left', diff --git a/src/pages/Customer/components/CustomerCreditContractsInsurance.vue b/src/pages/Customer/components/CustomerCreditContractsInsurance.vue index 57f877a54..f0a97ec92 100644 --- a/src/pages/Customer/components/CustomerCreditContractsInsurance.vue +++ b/src/pages/Customer/components/CustomerCreditContractsInsurance.vue @@ -3,9 +3,7 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; -import { date } from 'quasar'; - -import { toCurrency } from 'src/filters'; +import { toCurrency, toDateHour } from 'src/filters'; import FetchData from 'components/FetchData.vue'; @@ -43,7 +41,7 @@ const columns = computed(() => [ { align: 'left', field: 'created', - format: (value) => date.formatDate(value, 'DD/MM/YYYY'), + format: (value) => toDateHour(value), label: t('Created'), name: 'created', }, diff --git a/src/pages/Customer/components/CustomerFileManagementCreate.vue b/src/pages/Customer/components/CustomerFileManagementCreate.vue index 27fb7baa2..eeddd0d76 100644 --- a/src/pages/Customer/components/CustomerFileManagementCreate.vue +++ b/src/pages/Customer/components/CustomerFileManagementCreate.vue @@ -182,7 +182,7 @@ const inputFileRef = ref(); >