From 8861ee038dfbf44da1b97f8cf91a6bb4517f86ab Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 9 Jan 2024 10:35:39 +0100 Subject: [PATCH 01/86] refs #6384 fix: redirect to same path when id change --- src/components/ui/VnSearchbar.vue | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index 35f6c1548..bb54f6d31 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -72,15 +72,10 @@ async function search() { }); if (!props.redirect) return; - const rows = store.data; - const module = route.matched[1]; - if (rows.length === 1) { - const [firstRow] = rows; - await router.push({ path: `${module.path}/${firstRow.id}` }); - } else if (route.matched.length > 3) { - await router.push({ path: `/${module.path}` }); - arrayData.updateStateParams(); - } + const { matched: matches } = route; + const { path } = matches[matches.length-1]; + const newRoute = path.replace(':id', searchText.value); + await router.push(newRoute); } From d139d670f17bc8f239455937b7ed47b12e41d20e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 9 Jan 2024 10:37:59 +0100 Subject: [PATCH 02/86] refs #6384 perf: replace code with VnSubToolbar --- src/pages/Claim/Card/ClaimCard.vue | 1 - src/pages/Customer/Card/CustomerCard.vue | 7 ++----- src/pages/InvoiceIn/Card/InvoiceInCard.vue | 7 ++----- src/pages/Supplier/Card/SupplierCard.vue | 7 ++----- src/pages/Ticket/Card/TicketCard.vue | 7 ++----- src/pages/Travel/Card/TravelCard.vue | 7 ++----- src/pages/Worker/Card/WorkerCard.vue | 7 ++----- 7 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue index b6c948c96..8ebfcc285 100644 --- a/src/pages/Claim/Card/ClaimCard.vue +++ b/src/pages/Claim/Card/ClaimCard.vue @@ -1,6 +1,5 @@ @@ -11,11 +12,7 @@ const stateStore = useStateStore(); - -
- -
-
+
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue index 972eb52ec..19397b62e 100644 --- a/src/pages/Worker/Card/WorkerCard.vue +++ b/src/pages/Worker/Card/WorkerCard.vue @@ -4,6 +4,7 @@ import { useStateStore } from 'stores/useStateStore'; import WorkerDescriptor from './WorkerDescriptor.vue'; import LeftMenu from 'components/LeftMenu.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; +import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; const stateStore = useStateStore(); const { t } = useI18n(); @@ -26,11 +27,7 @@ const { t } = useI18n(); - -
- -
-
+
From 762daa620b6e62da265491912e915b948e33fcde Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 9 Jan 2024 12:06:17 +0100 Subject: [PATCH 03/86] refs #6384 test: e2e --- test/cypress/integration/vnSearchBar.spec.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/cypress/integration/vnSearchBar.spec.js diff --git a/test/cypress/integration/vnSearchBar.spec.js b/test/cypress/integration/vnSearchBar.spec.js new file mode 100644 index 000000000..6a769c9d9 --- /dev/null +++ b/test/cypress/integration/vnSearchBar.spec.js @@ -0,0 +1,20 @@ +/// +describe('VnSearchBar', () => { + beforeEach(() => { + cy.login('developer'); + cy.visit('/'); + }); + + it('should redirect to new customer', () => { + cy.visit('#/customer/1112/basic-data') + cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click(); + cy.get('.q-item > .q-item__label').should('have.text',' #1112') + cy.get('.fullscreen').click(); + cy.get('#searchbar > form > label > div:nth-child(1) input').clear(); + cy.get('#searchbar > form > label > div:nth-child(1) input').type('1{enter}'); + cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click(); + cy.get('.q-item > .q-item__label').should('have.text',' #1') + }); + + + }); From b4f330a2378ea217ee8e10a4d8f955b055a33e8b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 9 Jan 2024 12:20:56 +0100 Subject: [PATCH 04/86] refs #6384 test: e2e --- test/cypress/integration/vnSearchBar.spec.js | 15 +++++++-------- test/cypress/support/commands.js | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/test/cypress/integration/vnSearchBar.spec.js b/test/cypress/integration/vnSearchBar.spec.js index 6a769c9d9..d6dea0780 100644 --- a/test/cypress/integration/vnSearchBar.spec.js +++ b/test/cypress/integration/vnSearchBar.spec.js @@ -7,14 +7,13 @@ describe('VnSearchBar', () => { it('should redirect to new customer', () => { cy.visit('#/customer/1112/basic-data') - cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click(); + cy.openLeftMenu(); cy.get('.q-item > .q-item__label').should('have.text',' #1112') - cy.get('.fullscreen').click(); - cy.get('#searchbar > form > label > div:nth-child(1) input').clear(); - cy.get('#searchbar > form > label > div:nth-child(1) input').type('1{enter}'); - cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click(); + cy.closeLeftMenu(); + cy.clearSearchbar(); + cy.writeSearchbar('1{enter}'); + cy.openLeftMenu(); cy.get('.q-item > .q-item__label').should('have.text',' #1') + cy.closeLeftMenu(); }); - - - }); +}); diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 4dfde6e21..7effb94a6 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -166,6 +166,23 @@ Cypress.Commands.add('openRightMenu', (element) => { cy.get('#actions-append').click(); }); +Cypress.Commands.add('openLeftMenu', (element) => { + if (element) cy.waitForElement(element); + cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click(); +}); +Cypress.Commands.add('closeLeftMenu', (element) => { + if (element) cy.waitForElement(element); + cy.get('.fullscreen').click(); +}); + +Cypress.Commands.add('clearSearchbar', (element) => { + if (element) cy.waitForElement(element); + cy.get('#searchbar > form > label > div:nth-child(1) input').clear(); +}); + +Cypress.Commands.add('writeSearchbar', (value) => { + cy.get('#searchbar > form > label > div:nth-child(1) input').type(value); +}); Cypress.Commands.add('validateContent', (selector, expectedValue) => { cy.get(selector).should('have.text', expectedValue); }); From bdbc34d4e7fb9a1a1bb9f5183cf9f7f955f7471b Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 9 Jan 2024 14:00:51 +0100 Subject: [PATCH 05/86] refs #6325 claimRatio --- src/pages/Customer/Card/CustomerSummary.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index 6693274ac..4ebd6efab 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -38,7 +38,7 @@ const balanceDue = computed(() => { const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : '')); const claimRate = computed(() => { - return customer.value.claimsRatio.claimingRate * 100; + return customer.value.claimsRatio.claimingRate; }); const priceIncreasingRate = computed(() => { From 3e8744c8371be5ea1df84cb5c542223ca0629196 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 9 Jan 2024 14:24:29 +0100 Subject: [PATCH 06/86] fix: refs #6630 fix css --- src/components/common/VnLog.vue | 51 ++++++++++++++++----------------- src/components/ui/VnAvatar.vue | 3 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 0949fb5cb..1794c3850 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -415,7 +415,7 @@ setLogTree();
@@ -425,6 +425,7 @@ setLogTree(); class="cursor-pointer" :worker="userLog.user.id" :title="userLog.user.nickname" + size="lg" /> .loading { + display: flex; + justify-content: center; + } + & > .q-card { + min-width: 180px; + max-width: 400px; + + & > .header { + color: $dark; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } +} .origin-log { &:first-child > .origin-info { margin-top: 0; } & > .origin-info { - width: 100%; - max-width: 42em; margin-top: 28px; gap: 6px; @@ -847,14 +864,15 @@ setLogTree(); } } .user-log { + display: flex; width: 100%; max-width: 40em; - & > .timeline { position: relative; - padding-right: 5px; - width: 50px; + padding-right: 1px; + width: 38px; min-width: 38px; + flex-grow: auto; & > .arrow { height: 8px; width: 8px; @@ -874,7 +892,7 @@ setLogTree(); position: absolute; background-color: $primary; width: 2px; - left: 23px; + left: 19px; z-index: -1; top: 0; bottom: -8px; @@ -984,25 +1002,6 @@ setLogTree(); } } } -.q-menu { - display: block; - - & > .loading { - display: flex; - justify-content: center; - } - & > .q-card { - min-width: 180px; - max-width: 400px; - - & > .header { - color: $dark; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } -} en: diff --git a/src/components/ui/VnAvatar.vue b/src/components/ui/VnAvatar.vue index 85bece243..0cda98b32 100644 --- a/src/components/ui/VnAvatar.vue +++ b/src/components/ui/VnAvatar.vue @@ -5,13 +5,14 @@ const $props = defineProps({ worker: { type: Number, required: true }, description: { type: String, default: null }, clickable: { type: Boolean, default: false }, + size: { type: String, default: 'xl' }, }); const session = useSession(); const token = session.getToken(); @@ -666,7 +667,6 @@ setLogTree(); option-label="locale" :options="actions" @update:model-value="selectFilter('action')" - @clear="() => selectFilter('action')" hide-selected /> diff --git a/src/components/ui/VnAvatar.vue b/src/components/ui/VnAvatar.vue index 566497395..d26aeac19 100644 --- a/src/components/ui/VnAvatar.vue +++ b/src/components/ui/VnAvatar.vue @@ -4,6 +4,7 @@ import { useSession } from 'src/composables/useSession'; const $props = defineProps({ workerId: { type: Number, required: true }, description: { type: String, default: null }, + size: { type: String, default: 'xl' }, }); const session = useSession(); const token = session.getToken(); From 3c8022ac459f92d10cc67959e2e4ca3ebfdb47ec Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 10 Jan 2024 16:49:09 +0100 Subject: [PATCH 14/86] feat: refs #6630 VnAvatar letter feature added --- src/components/common/VnLog.vue | 4 ++-- src/components/ui/VnAvatar.vue | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index b42dac386..4dcb86780 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -422,13 +422,13 @@ setLogTree(); >
- + diff --git a/src/components/ui/VnAvatar.vue b/src/components/ui/VnAvatar.vue index d26aeac19..5a5483084 100644 --- a/src/components/ui/VnAvatar.vue +++ b/src/components/ui/VnAvatar.vue @@ -1,20 +1,37 @@ - - 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 7eeffcee7..4b326c572 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 23210600ac78e89925c22a2905dde02d5bd0c6f0 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Mon, 22 Jan 2024 11:00:03 -0500 Subject: [PATCH 67/86] Se hace correccion solicitada en issuecomment-39539 --- .../Customer/Card/CustomerBillingData.vue | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/pages/Customer/Card/CustomerBillingData.vue b/src/pages/Customer/Card/CustomerBillingData.vue index cee583f39..a455e6db2 100644 --- a/src/pages/Customer/Card/CustomerBillingData.vue +++ b/src/pages/Customer/Card/CustomerBillingData.vue @@ -1,8 +1,10 @@