From 701f1e100f0de4d0a0a5ac4aea68686fdaf0ec66 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 21 Nov 2023 12:50:05 +0100 Subject: [PATCH 001/131] refs #5858 feat: add catch when patch FormModel --- src/components/FormModel.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index e8a9e4c17..f8daea34e 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -80,7 +80,13 @@ async function save() { }); } isLoading.value = true; - await axios.patch($props.urlUpdate || $props.url, formData.value); + try { + await axios.patch($props.urlUpdate || $props.url, formData.value); + } catch (err) { + if (err) { + isLoading.value = false; + } + } originalData.value = JSON.parse(JSON.stringify(formData.value)); hasChanges.value = false; From 333050b6a78b07921ce583266d73bd6704099d64 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 22 Nov 2023 07:12:34 +0100 Subject: [PATCH 002/131] refs #5858 feat: add format validation --- src/composables/useValidator.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/composables/useValidator.js b/src/composables/useValidator.js index bc48332a2..625f20911 100644 --- a/src/composables/useValidator.js +++ b/src/composables/useValidator.js @@ -37,6 +37,15 @@ export function useValidator() { const { t } = useI18n(); const validations = function (validation) { return { + format: (value) =>{ + const {allowNull, with: format, allowBlank} = validation; + const message = t(validation.message) || validation.message; + if(!allowBlank && value ==='') return message + if(!allowNull && value === null) return message + + const isValid = new RegExp(format).test(value) + if(!isValid) return message + }, presence: (value) => { let message = `Value can't be empty`; if (validation.message) From 4ccb11997e51ed17830dcae7349d9db9a03be9d2 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 22 Dec 2023 10:32:57 +0100 Subject: [PATCH 003/131] refs #5878 lint: eslint --- src/composables/useValidator.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/composables/useValidator.js b/src/composables/useValidator.js index 364d11391..5ad96ea1b 100644 --- a/src/composables/useValidator.js +++ b/src/composables/useValidator.js @@ -30,14 +30,14 @@ export function useValidator() { const { t } = useI18n(); const validations = function (validation) { return { - format: (value) =>{ - const {allowNull, with: format, allowBlank} = validation; + format: (value) => { + const { allowNull, with: format, allowBlank } = validation; const message = t(validation.message) || validation.message; - if(!allowBlank && value ==='') return message - if(!allowNull && value === null) return message + if (!allowBlank && value === '') return message; + if (!allowNull && value === null) return message; - const isValid = new RegExp(format).test(value) - if(!isValid) return message + const isValid = new RegExp(format).test(value); + if (!isValid) return message; }, presence: (value) => { let message = `Value can't be empty`; From 232827ef48f3aecbaf401721c5e1046471f23898 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 28 Dec 2023 16:02:04 +0100 Subject: [PATCH 004/131] WIP: corrective section created: refs #4466 --- src/components/CrudModel.vue | 10 +- src/components/LeftMenu.vue | 2 +- src/components/common/VnSelectFilter.vue | 2 +- src/i18n/en/index.js | 5 + src/i18n/es/index.js | 5 + .../InvoiceIn/Card/InvoiceInBasicData.vue | 3 +- src/pages/InvoiceIn/Card/InvoiceInCard.vue | 20 +- .../InvoiceIn/Card/InvoiceInCorrective.vue | 160 +++++++++++ .../InvoiceIn/Card/InvoiceInDescriptor.vue | 252 +++++++++++++++++- src/router/modules/invoiceIn.js | 30 +++ 10 files changed, 460 insertions(+), 29 deletions(-) create mode 100644 src/pages/InvoiceIn/Card/InvoiceInCorrective.vue diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 75353a35a..dcffc1a28 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -76,8 +76,13 @@ defineExpose({ reset, hasChanges, saveChanges, + getFormData, }); +function getFormData() { + return formData.value; +} + async function fetch(data) { if (data && Array.isArray(data)) { let $index = 0; @@ -196,12 +201,13 @@ function getChanges() { const creates = []; const pk = $props.primaryKey; - for (const [i, row] of formData.value.entries()) { + console.log(pk, row); if (!row[pk]) { creates.push(row); } else if (originalData.value) { const data = getDifferences(originalData.value[i], row); + console.log(data); if (!isEmpty(data)) { updates.push({ data, @@ -211,7 +217,7 @@ function getChanges() { } } const changes = { updates, creates }; - + console.log('ddd', changes); for (let prop in changes) { if (changes[prop].length === 0) changes[prop] = undefined; } diff --git a/src/components/LeftMenu.vue b/src/components/LeftMenu.vue index 2eac97c65..253f3c161 100644 --- a/src/components/LeftMenu.vue +++ b/src/components/LeftMenu.vue @@ -50,7 +50,7 @@ function addChildren(module, route, parent) { const matches = findMatches(mainMenus, route); for (const child of matches) { - navigation.addMenuItem(module, child, parent); + if (!child.meta.hidden) navigation.addMenuItem(module, child, parent); } } } diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index 568da613f..35cb72cf2 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -102,7 +102,7 @@ const value = computed({ name="close" @click.stop="value = null" class="cursor-pointer" - size="18px" + size="xs" /> diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index 244fb50bb..377a39a0e 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -116,3 +116,9 @@ watch(options, (newValue) => { + + diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 0a306dc5f..708a170a2 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -216,7 +216,9 @@ function formatValue(value) { - + + + + + es: No filters applied: No se han aplicado filtros diff --git a/src/pages/Claim/ClaimFilter.vue b/src/pages/Claim/ClaimFilter.vue index b06f47653..ee702ffdd 100644 --- a/src/pages/Claim/ClaimFilter.vue +++ b/src/pages/Claim/ClaimFilter.vue @@ -36,123 +36,122 @@ const states = ref(); - - en: params: diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue index 36a9add89..593b45509 100644 --- a/src/pages/Customer/CustomerFilter.vue +++ b/src/pages/Customer/CustomerFilter.vue @@ -37,153 +37,134 @@ const zones = ref(); - - en: params: diff --git a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue index 43ceb1bac..f26af5975 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue @@ -46,163 +46,148 @@ const authors = ref(); - - en: params: diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue index 46b4e1e7b..df898e7c1 100644 --- a/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue @@ -145,27 +145,26 @@ const shouldRenderColumn = (colName) => { - - es: Social name: Razón social diff --git a/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue index 650158278..957abb7a3 100644 --- a/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue +++ b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue @@ -36,91 +36,80 @@ const clients = ref(); - - en: params: diff --git a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue index a19b35a20..74ea2c203 100644 --- a/src/pages/Customer/Payments/CustomerPaymentsFilter.vue +++ b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue @@ -27,71 +27,60 @@ function isValidNumber(value) { diff --git a/src/pages/Entry/EntryFilter.vue b/src/pages/Entry/EntryFilter.vue index 59ce06a00..f137b05e8 100644 --- a/src/pages/Entry/EntryFilter.vue +++ b/src/pages/Entry/EntryFilter.vue @@ -54,151 +54,149 @@ const suppliersOptions = ref([]); diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue index f8198d237..dec798906 100644 --- a/src/pages/InvoiceIn/InvoiceInFilter.vue +++ b/src/pages/InvoiceIn/InvoiceInFilter.vue @@ -36,55 +36,121 @@ const suppliersRef = ref(); - - en: params: diff --git a/src/pages/InvoiceOut/InvoiceOutFilter.vue b/src/pages/InvoiceOut/InvoiceOutFilter.vue index 124ea00d1..f8a430b51 100644 --- a/src/pages/InvoiceOut/InvoiceOutFilter.vue +++ b/src/pages/InvoiceOut/InvoiceOutFilter.vue @@ -41,95 +41,89 @@ function setWorkers(data) { diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue index 028246aeb..3adfa1d13 100644 --- a/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue +++ b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue @@ -27,87 +27,83 @@ const props = defineProps({ - - en: params: diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index c325a9b05..760c48726 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -219,183 +219,181 @@ const getCategoryClass = (category, params) => { diff --git a/src/pages/Order/Card/OrderFilter.vue b/src/pages/Order/Card/OrderFilter.vue index b49f0b115..62bfe0e02 100644 --- a/src/pages/Order/Card/OrderFilter.vue +++ b/src/pages/Order/Card/OrderFilter.vue @@ -59,162 +59,152 @@ const sourceList = ref(null); - - en: params: diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue index 45580d913..4be1981ab 100644 --- a/src/pages/Route/Card/RouteFilter.vue +++ b/src/pages/Route/Card/RouteFilter.vue @@ -61,144 +61,142 @@ const warehouseList = ref([]); diff --git a/src/pages/Route/Cmr/CmrFilter.vue b/src/pages/Route/Cmr/CmrFilter.vue index a5bf5513b..553f19431 100644 --- a/src/pages/Route/Cmr/CmrFilter.vue +++ b/src/pages/Route/Cmr/CmrFilter.vue @@ -28,103 +28,101 @@ const countries = ref(); diff --git a/src/pages/Shelving/Card/ShelvingFilter.vue b/src/pages/Shelving/Card/ShelvingFilter.vue index 423402f89..6767f6d97 100644 --- a/src/pages/Shelving/Card/ShelvingFilter.vue +++ b/src/pages/Shelving/Card/ShelvingFilter.vue @@ -41,7 +41,11 @@ function setParkings(data) { @on-fetch="setWorkers" auto-load /> - + diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue index b0b584257..7b74117bb 100644 --- a/src/pages/Ticket/TicketFilter.vue +++ b/src/pages/Ticket/TicketFilter.vue @@ -56,66 +56,138 @@ const warehouses = ref(); diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue index 260b0fb42..cac8e093d 100644 --- a/src/pages/Travel/ExtraCommunityFilter.vue +++ b/src/pages/Travel/ExtraCommunityFilter.vue @@ -66,158 +66,149 @@ const decrement = (paramsObj, key) => { - es: Search claim: Buscar reclamación diff --git a/src/pages/Claim/ClaimRmaList.vue b/src/pages/Claim/ClaimRmaList.vue index 3774932e3..b906e32fa 100644 --- a/src/pages/Claim/ClaimRmaList.vue +++ b/src/pages/Claim/ClaimRmaList.vue @@ -84,7 +84,7 @@ async function remove({ id }) { -
+
{ -
+
{ - - es: Search customer: Buscar cliente diff --git a/src/pages/Customer/Payments/CustomerPayments.vue b/src/pages/Customer/Payments/CustomerPayments.vue index de774e63e..eedaaf137 100644 --- a/src/pages/Customer/Payments/CustomerPayments.vue +++ b/src/pages/Customer/Payments/CustomerPayments.vue @@ -122,7 +122,7 @@ function stateColor(row) { -
+
.customer-payments { - .card-list { - width: 100%; - max-width: 60em; - - .q-table--dense .q-table th:first-child { - padding-left: 0; - } - td { - max-width: 130px; - overflow: hidden; - text-overflow: ellipsis; - } + .q-table--dense .q-table th:first-child { + padding-left: 0; + } + td { + max-width: 130px; + overflow: hidden; + text-overflow: ellipsis; } } diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 40747178c..0cf707efa 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -47,7 +47,7 @@ onMounted(async () => { -
+
{ - - es: Search entries: Buscar entradas diff --git a/src/pages/InvoiceIn/InvoiceInList.vue b/src/pages/InvoiceIn/InvoiceInList.vue index bf791c10e..2f508ec34 100644 --- a/src/pages/InvoiceIn/InvoiceInList.vue +++ b/src/pages/InvoiceIn/InvoiceInList.vue @@ -71,7 +71,7 @@ function viewSummary(id) { -
+
- - es: Search invoice: Buscar factura emitida diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 292fa2e0a..36d1d3aad 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -181,7 +181,7 @@ const downloadCsv = () => {
-
+
{ - - en: searchInvoice: Search issued invoice diff --git a/src/pages/Order/OrderCatalog.vue b/src/pages/Order/OrderCatalog.vue index 55f5e7da1..21442d10d 100644 --- a/src/pages/Order/OrderCatalog.vue +++ b/src/pages/Order/OrderCatalog.vue @@ -1,7 +1,7 @@ @@ -70,7 +70,7 @@ function extractTags(items) { -
+
diff --git a/src/pages/Order/OrderVolume.vue b/src/pages/Order/OrderVolume.vue index 4f4c269f6..5bb106edc 100644 --- a/src/pages/Order/OrderVolume.vue +++ b/src/pages/Order/OrderVolume.vue @@ -35,7 +35,7 @@ const loadVolumes = async (rows) => { auto-load /> -
+
{ } diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue index df7cff932..c6b08075f 100644 --- a/src/pages/Supplier/Card/SupplierAddresses.vue +++ b/src/pages/Supplier/Card/SupplierAddresses.vue @@ -47,7 +47,7 @@ const redirectToUpdateView = (addressData) => { - - diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index ea7bc3cb0..d504e127a 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -44,7 +44,7 @@ const viewSummary = (id) => { -
+
- - en: Search suppliers: Search suppliers diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index 9186eb6ad..6f57ad0b9 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -74,7 +74,7 @@ function viewSummary(id) { -
+
- - es: Search ticket: Buscar ticket diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index 889f096aa..dbbdaca93 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -56,7 +56,7 @@ onMounted(async () => { -
+
{ - - en: addEntry: Add entry diff --git a/src/pages/Wagon/Type/WagonTypeList.vue b/src/pages/Wagon/Type/WagonTypeList.vue index 8e4ace744..a7c713039 100644 --- a/src/pages/Wagon/Type/WagonTypeList.vue +++ b/src/pages/Wagon/Type/WagonTypeList.vue @@ -42,7 +42,7 @@ async function remove(row) { - - diff --git a/src/pages/Wagon/WagonList.vue b/src/pages/Wagon/WagonList.vue index 77d9da0bf..18417f433 100644 --- a/src/pages/Wagon/WagonList.vue +++ b/src/pages/Wagon/WagonList.vue @@ -48,7 +48,7 @@ async function remove(row) { - - diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index e7e86d16e..0e9868a04 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -64,7 +64,7 @@ const redirectToCreateView = () => { -
+
{ - - es: Search worker: Buscar trabajador From d0d57f71e0a02738dfa6144b34e566ec2d85d9ee Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Wed, 24 Jan 2024 06:51:52 -0400 Subject: [PATCH 018/131] Implement routes report --- src/pages/Route/RouteList.vue | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 591f723e9..392d7f8cb 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -15,11 +15,13 @@ import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue'; import RouteFilter from 'pages/Route/Card/RouteFilter.vue'; import { useQuasar } from 'quasar'; import RouteSummaryDialog from 'pages/Route/Card/RouteSummaryDialog.vue'; +import {useSession} from "composables/useSession"; const stateStore = useStateStore(); const { t } = useI18n(); const { validate } = useValidator(); const quasar = useQuasar(); +const session = useSession(); const to = Date.vnNew(); to.setDate(to.getDate() + 1); @@ -149,6 +151,23 @@ const cloneRoutes = () => { startingDate.value = null; }; +const showRouteReport = () => { + const ids = selectedRows.value.map(row => row?.id) + const idString = ids.join(',') + let url; + + if (selectedRows.value.length <= 1) { + url = `api/Routes/${idString}/driver-route-pdf?access_token=${session.getToken()}`; + } else { + const params = new URLSearchParams({ + access_token: session.getToken(), + id: idString + }) + url = `api/Routes/downloadZip?${params.toString()}`; + } + window.open(url, '_blank'); +} + const markAsServed = () => { selectedRows.value.forEach((row) => { if (row?.id) { @@ -206,7 +225,6 @@ function previewRoute(id) { autofocus /> - @@ -239,7 +257,15 @@ function previewRoute(id) { > {{ t('Clone Selected Routes') }} - + + {{ t('Download selected routes as PDF') }} + From 899633171d0e8830e71481fa165b92ad925269cc Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 24 Jan 2024 10:47:48 -0300 Subject: [PATCH 019/131] Suppliers corrections --- src/pages/Supplier/Card/SupplierBasicData.vue | 12 ++ .../Supplier/Card/SupplierBillingData.vue | 11 +- .../Supplier/Card/SupplierConsumption.vue | 35 ++--- .../Card/SupplierConsumptionFilter.vue | 17 +-- .../Supplier/Card/SupplierDescriptor.vue | 72 ++++++++++- src/pages/Supplier/SupplierCreate.vue | 8 ++ src/pages/Supplier/SupplierList.vue | 14 +- src/pages/Supplier/SupplierListFilter.vue | 122 ++++++++++++++++++ 8 files changed, 259 insertions(+), 32 deletions(-) create mode 100644 src/pages/Supplier/SupplierListFilter.vue diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue index b73ce9346..747784943 100644 --- a/src/pages/Supplier/Card/SupplierBasicData.vue +++ b/src/pages/Supplier/Card/SupplierBasicData.vue @@ -48,6 +48,13 @@ const workersOptions = ref([]); map-options :rules="validate('supplier.workerFk')" > + + + +es: + Responsible for approving invoices: Responsable de aprobar las facturas + diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue index 1237a0403..bf5ccb115 100644 --- a/src/pages/Supplier/Card/SupplierBillingData.vue +++ b/src/pages/Supplier/Card/SupplierBillingData.vue @@ -13,6 +13,13 @@ const { t } = useI18n(); const paymethodsOptions = ref([]); const payDemsOptions = ref([]); + +const formatPayDems = (data) => { + payDemsOptions.value = data.map(({ id, payDem }) => ({ + id: id, + payDem: payDem || '0', + })); +}; - +
diff --git a/src/pages/Customer/components/CustomerConsigneeCreate.vue b/src/pages/Customer/components/CustomerConsigneeCreate.vue index 92ce47bf2..7bc6c2e88 100644 --- a/src/pages/Customer/components/CustomerConsigneeCreate.vue +++ b/src/pages/Customer/components/CustomerConsigneeCreate.vue @@ -10,7 +10,7 @@ import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; -import VnSelectCreate from 'src/components/common/VnSelectCreate.vue'; +import VnSelectDialog from 'src/components/common/VnSelectDialog.vue'; import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue'; @@ -113,7 +113,7 @@ const toCustomerConsignees = () => {
- { - +
@@ -223,7 +223,7 @@ const toCustomerConsignees = () => { />
- { - +
diff --git a/src/pages/Customer/components/CustomerConsigneeEdit.vue b/src/pages/Customer/components/CustomerConsigneeEdit.vue index 43649c58e..98996e479 100644 --- a/src/pages/Customer/components/CustomerConsigneeEdit.vue +++ b/src/pages/Customer/components/CustomerConsigneeEdit.vue @@ -10,7 +10,7 @@ import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; -import VnSelectCreate from 'src/components/common/VnSelectCreate.vue'; +import VnSelectDialog from 'src/components/common/VnSelectDialog.vue'; import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue'; @@ -168,7 +168,7 @@ const onDataSaved = () => {
- { - +
@@ -278,7 +278,7 @@ const onDataSaved = () => { />
- { - +
diff --git a/src/pages/Entry/Card/EntryBasicData.vue b/src/pages/Entry/Card/EntryBasicData.vue index 9dc59ec21..a98a1227f 100644 --- a/src/pages/Entry/Card/EntryBasicData.vue +++ b/src/pages/Entry/Card/EntryBasicData.vue @@ -8,6 +8,8 @@ import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; +import VnSelectDialog from 'src/components/common/VnSelectDialog.vue'; +import FilterTravelForm from 'src/components/FilterTravelForm.vue'; import { toDate } from 'src/filters'; @@ -18,6 +20,10 @@ const suppliersOptions = ref([]); const travelsOptions = ref([]); const companiesOptions = ref([]); const currenciesOptions = ref([]); + +const onFilterTravelSelected = (formData, id) => { + formData.travelFk = id; +}; - +
diff --git a/src/pages/Worker/WorkerCreate.vue b/src/pages/Worker/WorkerCreate.vue index 5cc3993ea..0883995e6 100644 --- a/src/pages/Worker/WorkerCreate.vue +++ b/src/pages/Worker/WorkerCreate.vue @@ -7,7 +7,7 @@ import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; -import VnSelectCreate from 'src/components/common/VnSelectCreate.vue'; +import VnSelectDialog from 'src/components/common/VnSelectDialog.vue'; import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue'; import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; import VnInput from 'src/components/common/VnInput.vue'; @@ -184,7 +184,7 @@ onMounted(async () => {
- { - +
{ :rules="validate('Worker.iban')" />
- { - +
From b8a56391228a063af726c87c4313a28e1aab5909 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Thu, 25 Jan 2024 17:29:24 -0500 Subject: [PATCH 023/131] Se crea tarjeta de historial --- src/pages/Customer/Card/CustomerBalance.vue | 3 +- src/pages/Customer/Card/CustomerLog.vue | 252 +++++++++++++++++- src/pages/Customer/Card/CustomerNotes.vue | 34 +++ .../Customer/Card/CustomerRecoveries.vue | 33 +++ 4 files changed, 319 insertions(+), 3 deletions(-) diff --git a/src/pages/Customer/Card/CustomerBalance.vue b/src/pages/Customer/Card/CustomerBalance.vue index 5d296881f..65c260a02 100644 --- a/src/pages/Customer/Card/CustomerBalance.vue +++ b/src/pages/Customer/Card/CustomerBalance.vue @@ -146,6 +146,7 @@ onBeforeMount(() => { }); const getData = () => { + stateStore.rightDrawer = true; getReceipts(); getClientRisks(); }; @@ -158,7 +159,6 @@ const getReceipts = async () => { }; const { data } = await axios.get('Receipts/filter', { params }); rows.value = data; - stateStore.rightDrawer = true; }; const getClientRisks = async () => { @@ -170,7 +170,6 @@ const getClientRisks = async () => { params: { filter: JSON.stringify(filter) }, }); clientRisks.value = data; - console.log(clientRisks.value[0].amount); }; const showNewPaymentDialog = () => { diff --git a/src/pages/Customer/Card/CustomerLog.vue b/src/pages/Customer/Card/CustomerLog.vue index fe59bf2dc..4d0a0c838 100644 --- a/src/pages/Customer/Card/CustomerLog.vue +++ b/src/pages/Customer/Card/CustomerLog.vue @@ -1,3 +1,253 @@ + + + + +es: + Search: Buscar + Search by id or concept: xxx + Entity: Entidad + All: Todo + User: Usuario + System: Sistema + Changes: Cambios + Search by changes: xxx + Creates: Crea + Edits: Modifica + Deletes: Elimina + Accesses: Accede + Date: Fecha + To: Hasta + Quit filter: Quitar filtro + diff --git a/src/pages/Customer/Card/CustomerNotes.vue b/src/pages/Customer/Card/CustomerNotes.vue index 0909758f3..95c3befe8 100644 --- a/src/pages/Customer/Card/CustomerNotes.vue +++ b/src/pages/Customer/Card/CustomerNotes.vue @@ -6,6 +6,40 @@ import { date } from 'quasar'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; +const response = { + fields: [ + 'id', + 'originFk', + 'userFk', + 'action', + 'changedModel', + 'oldInstance', + 'newInstance', + 'creationDate', + 'changedModel', + 'changedModelId', + 'changedModelValue', + 'description', + ], + include: [ + { + relation: 'user', + scope: { + fields: ['nickname', 'name', 'image'], + include: { relation: 'worker', scope: { fields: ['id'] } }, + }, + }, + ], + order: ['creationDate DESC', 'id DESC'], + limit: 20, + where: { + and: [ + { originFk: '1' }, + { userFk: { neq: null } }, + { action: { inq: ['insert', 'update', 'delete', 'select'] } }, + ], + }, +}; const { t } = useI18n(); const route = useRoute(); const router = useRouter(); diff --git a/src/pages/Customer/Card/CustomerRecoveries.vue b/src/pages/Customer/Card/CustomerRecoveries.vue index 7247145f2..df5c7f6e2 100644 --- a/src/pages/Customer/Card/CustomerRecoveries.vue +++ b/src/pages/Customer/Card/CustomerRecoveries.vue @@ -11,6 +11,39 @@ import { toCurrency } from 'src/filters'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +const response = { + fields: [ + 'id', + 'originFk', + 'userFk', + 'action', + 'changedModel', + 'oldInstance', + 'newInstance', + 'creationDate', + 'changedModel', + 'changedModelId', + 'changedModelValue', + 'description', + ], + include: [ + { + relation: 'user', + scope: { + fields: ['nickname', 'name', 'image'], + include: { relation: 'worker', scope: { fields: ['id'] } }, + }, + }, + ], + order: ['creationDate DESC', 'id DESC'], + limit: 20, + where: { + and: [ + { originFk: '1' }, + { action: { inq: ['insert', 'update', 'delete', 'select'] } }, + ], + }, +}; const { t } = useI18n(); const route = useRoute(); const router = useRouter(); From ed926189dde3128c6a90d66254030a7a840a4f7f Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Fri, 26 Jan 2024 10:47:36 -0500 Subject: [PATCH 024/131] Correcciones solicitadas en la revision del pr --- src/pages/Customer/Card/CustomerBalance.vue | 64 +++++++++---------- .../components/CustomerNewPayment.vue | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/pages/Customer/Card/CustomerBalance.vue b/src/pages/Customer/Card/CustomerBalance.vue index 5d296881f..184667d6e 100644 --- a/src/pages/Customer/Card/CustomerBalance.vue +++ b/src/pages/Customer/Card/CustomerBalance.vue @@ -1,9 +1,8 @@ + + + + +es: + Warehouse: Almacén + Type the visible quantity: Introduce la cantidad visible + Regularize stock: Regularizar stock + diff --git a/src/composables/useState.js b/src/composables/useState.js index 1c797e992..6ad8eb22c 100644 --- a/src/composables/useState.js +++ b/src/composables/useState.js @@ -25,6 +25,7 @@ export function useState() { lang: user.value.lang, darkMode: user.value.darkMode, companyFk: user.value.companyFk, + warehouseFk: user.value.warehouseFk, }; }); } @@ -37,6 +38,7 @@ export function useState() { lang: data.lang, darkMode: data.darkMode, companyFk: data.companyFk, + warehouseFk: data.warehouseFk, }; } diff --git a/src/composables/useUserConfig.js b/src/composables/useUserConfig.js index e05d7fb5c..a33779be7 100644 --- a/src/composables/useUserConfig.js +++ b/src/composables/useUserConfig.js @@ -12,6 +12,7 @@ export function useUserConfig() { const user = state.getUser().value; user.darkMode = data.darkMode; user.companyFk = data.companyFk; + user.warehouseFk = data.warehouseFk; state.setUser(user); return data; diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 1a7a4c27e..ea8769c58 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1060,6 +1060,25 @@ export default { totalEntries: 'Total entries', }, }, + item: { + pageTitles: { + items: 'Items', + list: 'List', + diary: 'Diary', + tags: 'Tags', + }, + descriptor: { + item: 'Item', + buyer: 'Buyer', + color: 'Color', + category: 'Category', + stems: 'Stems', + visible: 'Visible', + available: 'Available', + warehouseText: 'Calculated on the warehouse of { warehouseName }', + itemDiary: 'Item diary', + }, + }, components: { topbar: {}, userPanel: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 83de42ee0..9f407ab0b 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -1060,6 +1060,25 @@ export default { totalEntries: 'Ent. totales', }, }, + item: { + pageTitles: { + items: 'Artículos', + list: 'Listado', + diary: 'Histórico', + tags: 'Etiquetas', + }, + descriptor: { + item: 'Artículo', + buyer: 'Comprador', + color: 'Color', + category: 'Categoría', + stems: 'Tallos', + visible: 'Visible', + available: 'Disponible', + warehouseText: 'Calculado sobre el almacén de { warehouseName }', + itemDiary: 'Registro de compra-venta', + }, + }, components: { topbar: {}, userPanel: { diff --git a/src/pages/Item/Card/ItemCard.vue b/src/pages/Item/Card/ItemCard.vue new file mode 100644 index 000000000..57c3a434d --- /dev/null +++ b/src/pages/Item/Card/ItemCard.vue @@ -0,0 +1,25 @@ + + diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue new file mode 100644 index 000000000..e5183779b --- /dev/null +++ b/src/pages/Item/Card/ItemDescriptor.vue @@ -0,0 +1,260 @@ + + + + + +es: + Regularize stock: Regularizar stock + Clone: Clonar + All it's properties will be copied: Todas sus propiedades serán copiadas + Do you want to clone this item?: ¿Desea clonar este artículo? + + + diff --git a/src/pages/Item/Card/ItemDescriptorProxy.vue b/src/pages/Item/Card/ItemDescriptorProxy.vue new file mode 100644 index 000000000..58471dc83 --- /dev/null +++ b/src/pages/Item/Card/ItemDescriptorProxy.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/pages/Item/Card/ItemDiary.vue b/src/pages/Item/Card/ItemDiary.vue new file mode 100644 index 000000000..21249349f --- /dev/null +++ b/src/pages/Item/Card/ItemDiary.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/Card/ItemSummary.vue b/src/pages/Item/Card/ItemSummary.vue new file mode 100644 index 000000000..567fbf32b --- /dev/null +++ b/src/pages/Item/Card/ItemSummary.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/Card/ItemSummaryDialog.vue b/src/pages/Item/Card/ItemSummaryDialog.vue new file mode 100644 index 000000000..4af617fd9 --- /dev/null +++ b/src/pages/Item/Card/ItemSummaryDialog.vue @@ -0,0 +1,5 @@ + diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue new file mode 100644 index 000000000..95f4380e4 --- /dev/null +++ b/src/pages/Item/Card/ItemTags.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue new file mode 100644 index 000000000..49a5dbb64 --- /dev/null +++ b/src/pages/Item/ItemList.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/ItemMain.vue b/src/pages/Item/ItemMain.vue new file mode 100644 index 000000000..c1f2a31db --- /dev/null +++ b/src/pages/Item/ItemMain.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue index 7baa8ded5..06438349b 100644 --- a/src/pages/Supplier/Card/SupplierConsumption.vue +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -7,6 +7,7 @@ import { useQuasar } from 'quasar'; import FetchedTags from 'components/ui/FetchedTags.vue'; import SendEmailDialog from 'components/common/SendEmailDialog.vue'; import SupplierConsumptionFilter from './SupplierConsumptionFilter.vue'; +import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import { toDate } from 'src/filters'; import { dashIfEmpty } from 'src/filters'; @@ -174,7 +175,10 @@ onMounted(async () => { {{ row.invoiceNumber }} - {{ buy.itemName }} + + {{ buy.itemName }} + + {{ buy.subName }} diff --git a/src/router/modules/index.js b/src/router/modules/index.js index cc5034959..84a26798d 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -1,3 +1,4 @@ +import Item from './item'; import Customer from './customer'; import Ticket from './ticket'; import Claim from './claim'; @@ -14,6 +15,7 @@ import Department from './department'; import Entry from './entry'; export default [ + Item, Customer, Ticket, Claim, diff --git a/src/router/modules/item.js b/src/router/modules/item.js new file mode 100644 index 000000000..d3462e15c --- /dev/null +++ b/src/router/modules/item.js @@ -0,0 +1,70 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/item', + name: 'Item', + meta: { + title: 'items', + icon: 'vn:item', + }, + component: RouterView, + redirect: { name: 'ItemMain' }, + menus: { + main: [], + card: [], + }, + children: [ + { + path: '', + name: 'ItemMain', + component: () => import('src/pages/Item/ItemMain.vue'), + redirect: { name: 'Itemlist' }, + children: [ + { + path: 'list', + name: 'ItemList', + meta: { + title: 'list', + icon: 'view_list', + }, + component: () => import('src/pages/Item/ItemList.vue'), + }, + ], + }, + { + name: 'ItemCard', + path: ':id', + component: () => import('src/pages/Item/Card/ItemCard.vue'), + redirect: { name: 'ItemSummary' }, + children: [ + { + name: 'ItemSummary', + path: 'summary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Item/Card/ItemSummary.vue'), + }, + { + path: 'diary', + name: 'ItemDiary', + meta: { + title: 'diary', + icon: 'vn:transaction', + }, + component: () => import('src/pages/Item/Card/ItemDiary.vue'), + }, + { + path: 'tags', + name: 'ItemTags', + meta: { + title: 'Tags', + icon: 'vn:tags', + }, + component: () => import('src/pages/Item/Card/ItemTags.vue'), + }, + ], + }, + ], +}; diff --git a/src/router/routes.js b/src/router/routes.js index 6a2fa6a97..d1027955f 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,3 +1,4 @@ +import item from './modules/item'; import customer from './modules/customer'; import ticket from './modules/ticket'; import claim from './modules/claim'; @@ -51,6 +52,7 @@ const routes = [ component: () => import('../pages/Dashboard/DashboardMain.vue'), }, // Module routes + item, customer, ticket, claim, diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index 2eda6f686..568063d1d 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -7,19 +7,19 @@ import routes from 'src/router/modules'; export const useNavigationStore = defineStore('navigationStore', () => { const modules = [ - 'customer', - 'claim', - 'ticket', - 'invoiceOut', - 'invoiceIn', - 'worker', 'shelving', 'order', - 'wagon', - 'route', - 'supplier', - 'travel', + 'customer', 'entry', + 'travel', + 'invoiceOut', + 'invoiceIn', + 'supplier', + 'claim', + 'route', + 'ticket', + 'worker', + 'wagon', ]; const pinnedModules = ref([]); const role = useRole(); From 9d90a3808f0c4e41b71e474791e0b9c24e763f6b Mon Sep 17 00:00:00 2001 From: wbuezas Date: Fri, 26 Jan 2024 16:40:59 -0300 Subject: [PATCH 027/131] apply item descriptor in OrderCatalogItem --- src/pages/Order/Card/OrderCatalogItem.vue | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/pages/Order/Card/OrderCatalogItem.vue b/src/pages/Order/Card/OrderCatalogItem.vue index 140a4c349..5056e0523 100644 --- a/src/pages/Order/Card/OrderCatalogItem.vue +++ b/src/pages/Order/Card/OrderCatalogItem.vue @@ -1,10 +1,13 @@ -{ - "en": { - "deleteShelving": "Delete Shelving" - }, - "es": { - "deleteShelving": "Eliminar carro" - } -} +es: + Confirm deletion: Confirmar eliminación + Are you sure you want to delete this shelving?: ¿Seguro que quieres eliminar este carro? + Delete Shelving: Eliminar carro diff --git a/src/pages/Shelving/Card/ShelvingFilter.vue b/src/pages/Shelving/Card/ShelvingFilter.vue index 423402f89..d4ec41e15 100644 --- a/src/pages/Shelving/Card/ShelvingFilter.vue +++ b/src/pages/Shelving/Card/ShelvingFilter.vue @@ -112,9 +112,11 @@ en: parkingFk: Parking userFk: Worker isRecyclable: Recyclable + search: Search es: params: parkingFk: Parking userFk: Trabajador isRecyclable: Reciclable + search: Contiene diff --git a/src/pages/Shelving/Card/ShelvingSearchbar.vue b/src/pages/Shelving/Card/ShelvingSearchbar.vue index 89a4de01e..829d7719c 100644 --- a/src/pages/Shelving/Card/ShelvingSearchbar.vue +++ b/src/pages/Shelving/Card/ShelvingSearchbar.vue @@ -7,12 +7,12 @@ const { t } = useI18n(); - es: Search shelving: Buscar carros diff --git a/src/pages/Shelving/Card/ShelvingSummary.vue b/src/pages/Shelving/Card/ShelvingSummary.vue index f1f914385..5f93c4a02 100644 --- a/src/pages/Shelving/Card/ShelvingSummary.vue +++ b/src/pages/Shelving/Card/ShelvingSummary.vue @@ -24,7 +24,7 @@ const hideRightDrawer = () => { if (!isDialog) { stateStore.rightDrawer = false; } -} +}; onMounted(hideRightDrawer); onUnmounted(hideRightDrawer); const filter = { @@ -69,9 +69,13 @@ const filter = {