From 36028afa37ff530e4547b301fc32b102f68f6666 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Tue, 28 Nov 2023 23:06:30 -0300 Subject: [PATCH 01/18] Update Wagon List styles --- src/pages/Wagon/Type/WagonTypeCreate.vue | 4 +- src/pages/Wagon/Type/WagonTypeList.vue | 60 +++++-------- src/pages/Wagon/WagonList.vue | 102 +++++++++-------------- 3 files changed, 64 insertions(+), 102 deletions(-) diff --git a/src/pages/Wagon/Type/WagonTypeCreate.vue b/src/pages/Wagon/Type/WagonTypeCreate.vue index adfd41049..f4ece640a 100644 --- a/src/pages/Wagon/Type/WagonTypeCreate.vue +++ b/src/pages/Wagon/Type/WagonTypeCreate.vue @@ -248,7 +248,7 @@ function exceedMaxHeight(pos) { :rules="[(val) => !!val || t('wagon.warnings.nameNotEmpty')]" /> -
+
diff --git a/src/pages/Wagon/WagonList.vue b/src/pages/Wagon/WagonList.vue index 5e512aa92..bc94d4c5f 100644 --- a/src/pages/Wagon/WagonList.vue +++ b/src/pages/Wagon/WagonList.vue @@ -5,6 +5,8 @@ import VnPaginate from 'src/components/ui/VnPaginate.vue'; import { useArrayData } from 'src/composables/useArrayData'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; +import CardList2 from 'components/ui/CardList2.vue'; +import VnLv from 'components/ui/VnLv.vue'; const quasar = useQuasar(); const arrayData = useArrayData('WagonList'); @@ -55,69 +57,43 @@ async function remove(row) { auto-load >
From 9b0d30a776d573d9fd7f424e4fc4a9ae6b300032 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Wed, 29 Nov 2023 09:28:12 -0500 Subject: [PATCH 02/18] Primeras correcciones --- .vscode/settings.json | 2 -- src/pages/InvoiceOut/InvoiceOutList.vue | 15 +++++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) 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/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index fa7af4052..2d2fd5093 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -1,5 +1,5 @@ @@ -110,15 +96,21 @@ const emit = defineEmits(['onFetch']); - + {{ t('components.cardDescriptor.moreOptions') }} - - - {{ option }} - + + 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" > + From db81ab8acf99e9b43986d375e2c847b1d36cd6ed Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 29 Nov 2023 14:21:26 -0300 Subject: [PATCH 04/18] Cambios solicitados --- src/composables/inputSelectFilterFn.js | 33 ---- src/composables/useUserConfig.js | 3 + src/i18n/en/index.js | 5 +- src/i18n/es/index.js | 1 + src/pages/InvoiceOut/InvoiceOutGlobal.vue | 24 +-- src/pages/InvoiceOut/InvoiceOutGlobalForm.vue | 127 +++++--------- src/pages/Travel/TravelCreate.vue | 79 +++------ src/pages/Travel/TravelFilter.vue | 156 ++++++------------ src/stores/travel.js | 6 +- 9 files changed, 135 insertions(+), 299 deletions(-) delete mode 100644 src/composables/inputSelectFilterFn.js 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/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(() => { diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 2d2fd5093..36a0af4a3 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -10,7 +10,7 @@ import { toDate, toCurrency } from 'src/filters/index'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import InvoiceOutFilter from './InvoiceOutFilter.vue'; import VnLv from 'src/components/ui/VnLv.vue'; -import CardList2 from 'src/components/ui/CardList2.vue'; +import CardList from 'src/components/ui/CardList.vue'; const { t } = useI18n(); const arrayElements = ref([]); @@ -177,7 +177,7 @@ const downloadCsv = (rows) => { @click="downloadCsv(rows)" />
- { v-for="row of rows" > - + diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue index 3b7f84343..aaf0aa27a 100644 --- a/src/pages/Shelving/ShelvingList.vue +++ b/src/pages/Shelving/ShelvingList.vue @@ -3,7 +3,7 @@ import VnPaginate from 'components/ui/VnPaginate.vue'; import { useStateStore } from 'stores/useStateStore'; import { useI18n } from 'vue-i18n'; import { onMounted, onUnmounted } from 'vue'; -import CardList2 from 'components/ui/CardList2.vue'; +import CardList from 'components/ui/CardList.vue'; import VnLv from 'components/ui/VnLv.vue'; import { useQuasar } from 'quasar'; import { useRouter } from 'vue-router'; @@ -71,7 +71,7 @@ function viewSummary(id) { auto-load > - + - + {{ t('supplier.list.newSupplier') }} diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index 3a674a2bc..cd632a1e7 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -4,7 +4,7 @@ import { useStateStore } from 'stores/useStateStore'; import { useRouter } from 'vue-router'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; -import CardList2 from 'src/components/ui/CardList2.vue'; +import CardList from 'src/components/ui/CardList.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import { useQuasar } from 'quasar'; import SupplierSummaryDialog from './Card/SupplierSummaryDialog.vue'; @@ -47,7 +47,7 @@ const viewSummary = (id) => {
- +
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index 5826423d1..7198b723a 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -120,11 +120,11 @@ function viewSummary(id) { /> diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index 2a4f312a1..c7f4a6df5 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -5,7 +5,7 @@ import { toDate } from 'src/filters/index'; import { useRouter } from 'vue-router'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; -import CardList2 from 'src/components/ui/CardList2.vue'; +import CardList from 'src/components/ui/CardList.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import TravelSummaryDialog from './Card/TravelSummaryDialog.vue'; import { useTravelStore } from 'src/stores/travel.js'; @@ -62,7 +62,7 @@ onMounted(async () => { order="shipped DESC, landed DESC" > - + diff --git a/src/pages/Wagon/Type/WagonTypeList.vue b/src/pages/Wagon/Type/WagonTypeList.vue index bcc3b7ffa..504b40353 100644 --- a/src/pages/Wagon/Type/WagonTypeList.vue +++ b/src/pages/Wagon/Type/WagonTypeList.vue @@ -5,7 +5,7 @@ import VnPaginate from 'src/components/ui/VnPaginate.vue'; import { useArrayData } from 'src/composables/useArrayData'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; -import CardList2 from 'components/ui/CardList2.vue'; +import CardList from 'components/ui/CardList.vue'; import VnLv from 'components/ui/VnLv.vue'; const quasar = useQuasar(); @@ -50,7 +50,7 @@ async function remove(row) { auto-load > - + diff --git a/src/pages/Wagon/WagonList.vue b/src/pages/Wagon/WagonList.vue index e936f075b..73db61646 100644 --- a/src/pages/Wagon/WagonList.vue +++ b/src/pages/Wagon/WagonList.vue @@ -5,7 +5,7 @@ import VnPaginate from 'src/components/ui/VnPaginate.vue'; import { useArrayData } from 'src/composables/useArrayData'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; -import CardList2 from 'components/ui/CardList2.vue'; +import CardList from 'components/ui/CardList.vue'; import VnLv from 'components/ui/VnLv.vue'; const quasar = useQuasar(); @@ -57,7 +57,7 @@ async function remove(row) { auto-load > - + diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index cb75cdee3..be679f3a4 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -85,19 +85,17 @@ function viewSummary(id) { From 524e89319ee86c9e547bc403e069d5237d5d31ef Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Thu, 30 Nov 2023 15:57:54 -0300 Subject: [PATCH 11/18] Implement shelving logs --- src/components/common/VnLog.vue | 141 +++++++++++++----------- src/composables/useArrayData.js | 4 +- src/i18n/en/index.js | 1 + src/i18n/es/index.js | 1 + src/pages/Shelving/Card/ShelvingLog.vue | 53 +++++++++ src/router/modules/shelving.js | 11 +- 6 files changed, 145 insertions(+), 66 deletions(-) create mode 100644 src/pages/Shelving/Card/ShelvingLog.vue diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 1213c8bbc..b14aae7be 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -19,6 +19,18 @@ const props = defineProps({ type: String, default: null, }, + url: { + type: String, + default: null, + }, + mapper: { + type: Function, + default: null, + }, + filter: { + type: Object, + default: null, + } }); const columns = [ @@ -65,17 +77,18 @@ function actionColor(action) {