diff --git a/.vscode/settings.json b/.vscode/settings.json
index f175e4b82..817977448 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -15,8 +15,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": ["axios"],
-
- "editor.tabSize": 2,
"files.autoSave": "onFocusChange",
"files.trimTrailingWhitespace": true,
"editor.hover.enabled": true,
diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue
index 2a3ee6161..04f10ace9 100644
--- a/src/components/common/VnSelectFilter.vue
+++ b/src/components/common/VnSelectFilter.vue
@@ -89,7 +89,12 @@ const value = computed({
ref="vnSelectRef"
>
-
+
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index 0b15f2998..9116425df 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -57,20 +57,6 @@ async function getData() {
emit('onFetch', data);
}
-// watch($props, async () => {
-// entity.value = null;
-// await fetch();
-// });
-
-const options = [
- 'Transferir factura a ...',
- 'Ver factura ...',
- 'Enviar factura ...',
- 'Eliminar factura',
- 'Asentar factura',
- 'Regenerar PDF factura',
- 'Abono ...',
-];
const emit = defineEmits(['onFetch']);
@@ -110,15 +96,21 @@ const emit = defineEmits(['onFetch']);
-
+
{{ t('components.cardDescriptor.moreOptions') }}
-
-
- {{ option }}
-
+
+
diff --git a/src/composables/inputSelectFilterFn.js b/src/composables/inputSelectFilterFn.js
deleted file mode 100644
index 778d78a2a..000000000
--- a/src/composables/inputSelectFilterFn.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Filtra las opciones basadas en un valor de entrada y actualiza las opciones filtradas.
- *
- * @param {string} val - El valor de entrada para filtrar las opciones. (la emite el evento @filter del componente QSelect)
- * @param {Function} update - Función de actualización que debe ser llamada para actualizar las opciones filtradas.(la provee el evento @filter del componente QSelect)
- * @param {Function} abort - Función que puede ser llamada para abortar o cancelar el filtrado actual. (la provee el evento @filter del componente QSelect)
- * @param {Object} optionsToFilter - Objeto que contiene las opciones originales y filtradas.
- */
-
-function normalizeString(text) {
- return text
- .toLowerCase()
- .normalize('NFD')
- .replace(/[\u0300-\u036f]/g, '');
-}
-
-export function inputSelectFilter(val, update, abort, optionsToFilter) {
- if (val === '') {
- update(() => {
- optionsToFilter.filtered = JSON.parse(
- JSON.stringify(optionsToFilter.original)
- );
- });
- return;
- }
-
- update(() => {
- const searchQuery = val.toLowerCase();
- optionsToFilter.filtered = optionsToFilter.original.filter((option) =>
- normalizeString(option.label).includes(normalizeString(searchQuery))
- );
- });
-}
diff --git a/src/composables/useUserConfig.js b/src/composables/useUserConfig.js
index 2a22ae339..692943978 100644
--- a/src/composables/useUserConfig.js
+++ b/src/composables/useUserConfig.js
@@ -1,8 +1,10 @@
import axios from 'axios';
import { useState } from './useState';
+import useNotify from './useNotify';
export function useUserConfig() {
const state = useState();
+ const { notify } = useNotify();
async function fetch() {
try {
@@ -14,6 +16,7 @@ export function useUserConfig() {
return data;
} catch (error) {
+ notify('globals.errors.userConfig', 'negative');
console.error('Error fetching user config:', error);
}
}
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index 743977f42..d92f11789 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -44,6 +44,7 @@ export default {
statusInternalServerError: 'An internal server error has ocurred',
statusBadGateway: 'It seems that the server has fall down',
statusGatewayTimeout: 'Could not contact the server',
+ userConfig: 'Error fetching user config',
},
login: {
title: 'Login',
@@ -399,9 +400,9 @@ export default {
chooseValidCompany: 'Choose a valid company',
chooseValidPrinter: 'Choose a valid printer',
fillDates: 'Invoice date and the max date should be filled',
- invoiceDateLessThanMaxDate: "Invoice date can't be less than max date",
+ invoiceDateLessThanMaxDate: 'Invoice date can not be less than max date',
invoiceWithFutureDate: 'Exists an invoice with a future date',
- noTicketsToInvoice: "There aren't clients to invoice",
+ noTicketsToInvoice: 'There are not clients to invoice',
criticalInvoiceError: 'Critical invoicing error, process stopped',
},
table: {
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index 431553d79..3a7d09c3c 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -44,6 +44,7 @@ export default {
statusInternalServerError: 'Ha ocurrido un error interno del servidor',
statusBadGateway: 'Parece ser que el servidor ha caído',
statusGatewayTimeout: 'No se ha podido contactar con el servidor',
+ userConfig: 'Error al obtener configuración de usuario',
},
login: {
title: 'Inicio de sesión',
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue
index 4271f7f38..d3e38a1fe 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue
@@ -7,6 +7,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
+import InvoiceOutDescriptorMenu from './InvoiceOutDescriptorMenu.vue';
const $props = defineProps({
id: {
@@ -59,6 +60,9 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
@on-fetch="setData"
data-key="invoiceOutData"
>
+
+
+
+
+ Transferir factura a ...
+
+
+ Ver factura ...
+
+
+ Enviar factura ...
+
+
+ Eliminar factura
+
+
+ Asentar factura
+
+
+ Regenerar PDF factura
+
+
+ Abono ...
+
+
diff --git a/src/pages/InvoiceOut/InvoiceOutGlobal.vue b/src/pages/InvoiceOut/InvoiceOutGlobal.vue
index 20ed4695a..c4e853219 100644
--- a/src/pages/InvoiceOut/InvoiceOutGlobal.vue
+++ b/src/pages/InvoiceOut/InvoiceOutGlobal.vue
@@ -74,20 +74,6 @@ const columns = computed(() => {
];
});
-const cardStatusText = computed(() => {
- return t(`status.${status.value}`);
-});
-
-const percentageStatusText = computed(() => {
- return `${getPercentage.value}% (${getAddressNumber.value} ${t('of')} ${
- getNAddresses.value
- })`;
-});
-
-const pdfStatusText = computed(() => {
- return `${nPdfs.value} ${t('of')} ${totalPdfs.value} PDFs`;
-});
-
const rows = computed(() => {
if (!errors && !errors.length > 0) return [];
return errors.value.map((row) => {
@@ -110,7 +96,7 @@ onUnmounted(() => {
-
+
@@ -119,9 +105,11 @@ onUnmounted(() => {
- {{ cardStatusText }}
- {{ percentageStatusText }}
- {{ pdfStatusText }}
+ {{ t(`status.${status}`) }}
+ {{
+ `${getPercentage}% (${getAddressNumber} ${t('of')} ${getNAddresses})`
+ }}
+ {{ `${nPdfs} ${t('of')} ${totalPdfs} PDFs` }}
diff --git a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
index be1a65f59..05b642f1f 100644
--- a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
+++ b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
@@ -1,10 +1,10 @@