diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b68b7fa..10b7c73f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,41 @@ +# Version 25.08 - 2025-03-04 + +### Added šŸ†• + +- feat: add order for table (origin/8681_ticketAdvance_updates) by:Javier Segarra +- feat: detect when is descriptor proxy by:Javier Segarra +- feat: refs #7356 update CrudModel by:Javier Segarra +- feat: refs #8242 remove teleport by:Javier Segarra +- feat: refs #8242 use stateStore by:Javier Segarra +- fix: fixed negative bases style by:Jon +- fix: fixed style when clicking on icons by:Jon +- refactor: refs #6897 remove debug logs and unused style (origin/6897-fixSomeCaus) by:pablone +- style: refs #7356 eslint format by:Javier Segarra + +### Changed šŸ“¦ + +- perf: refs #7356 minor changes (origin/7356_ticketService) by:Javier Segarra +- refactor: refs #6897 remove debug logs and unused style (origin/6897-fixSomeCaus) by:pablone +- refactor: refs #6897 update component props and attributes for consistency and improved functionality (origin/6897-fixMinorIssues) by:pablone +- refactor: refs #6897 update component props and improve UI handling in Entry pages by:pablone +- refactor: refs #6897 update VnTable components for improved value handling and UI adjustments (origin/6897-minorFixes) by:pablone +- refactor: refs #8697 simplify date handling in ItemDiary component by:pablone + +### Fixed šŸ› ļø + +- fix: add datakey by:Javier Segarra +- fix: fixed account descriptor menu and created e2e by:Jon +- fix: fixed negative bases style by:Jon +- fix: fixed style when clicking on icons by:Jon +- fix: refs #6553 workerBusiness (origin/6553-fixWorkerBusinessV2) by:carlossa +- fix: refs #6553 workerBusiness v3 by:carlossa +- fix: refs #6897 prevent default event behavior in autocompleteExpense function by:pablone +- fix: refs #7356 chaining params by:Javier Segarra +- fix: refs #7356 ticketService by:Javier Segarra +- fix: refs #8242 workerDepartmentTree bug (origin/8242_leftMenu_responsive) by:Javier Segarra +- fix: workerBasicData by:carlossa +- Revert "revert 1015acefb7e400be2d8b5958dba69b4d98276b34" (origin/fix_revert_revert, fix_revert_revert) by:alexm + # Version 25.06 - 2025-02-18 ### Added šŸ†• diff --git a/Jenkinsfile b/Jenkinsfile index ea3f1b439..f57678938 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,6 +26,7 @@ node { // https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables echo "NODE_NAME: ${env.NODE_NAME}" echo "WORKSPACE: ${env.WORKSPACE}" + echo "CHANGE_TARGET: ${env.CHANGE_TARGET}" configFileProvider([ configFile(fileId: 'salix-front.properties', diff --git a/package.json b/package.json index 1361d1fd8..80706f895 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "25.10.0", + "version": "25.12.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -71,4 +71,4 @@ "vite": "^6.0.11", "vitest": "^0.31.1" } -} +} \ No newline at end of file diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 93a2ac96a..8c4f70f3b 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -184,8 +184,11 @@ async function saveChanges(data) { if ($props.beforeSaveFn) { changes = await $props.beforeSaveFn(changes, getChanges); } - try { + if (changes?.creates?.length === 0 && changes?.updates?.length === 0) { + return; + } + await axios.post($props.saveUrl || $props.url + '/crud', changes); } finally { isLoading.value = false; diff --git a/src/components/FilterTravelForm.vue b/src/components/FilterTravelForm.vue index 765d97763..c522d0269 100644 --- a/src/components/FilterTravelForm.vue +++ b/src/components/FilterTravelForm.vue @@ -124,7 +124,7 @@ const selectTravel = ({ id }) => { + + {{ t('ticketSale.reserved') }} + + + {{ $t('salesTicketsTable.risk') }}: - {{ toCurrency(row.risk - row.credit) }} + {{ toCurrency(row.risk - (row.credit ?? 0)) }} {{ $t('salesTicketsTable.purchaseRequest') }} - + {{ $t('salesTicketsTable.noVerifiedData') }} diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 0daa71603..c60d072fe 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -55,6 +55,10 @@ const $props = defineProps({ type: [Function, Boolean], default: null, }, + rowCtrlClick: { + type: [Function, Boolean], + default: null, + }, redirect: { type: String, default: null, diff --git a/src/components/__tests__/CrudModel.spec.js b/src/components/__tests__/CrudModel.spec.js index e0afd30ad..f6c93e0d5 100644 --- a/src/components/__tests__/CrudModel.spec.js +++ b/src/components/__tests__/CrudModel.spec.js @@ -30,8 +30,8 @@ describe('CrudModel', () => { saveFn: '', }, }); - wrapper=wrapper.wrapper; - vm=wrapper.vm; + wrapper = wrapper.wrapper; + vm = wrapper.vm; }); beforeEach(() => { @@ -143,14 +143,14 @@ describe('CrudModel', () => { }); it('should return true if object is empty', async () => { - dummyObj ={}; - result = vm.isEmpty(dummyObj); + dummyObj = {}; + result = vm.isEmpty(dummyObj); expect(result).toBe(true); }); it('should return false if object is not empty', async () => { - dummyObj = {a:1, b:2, c:3}; + dummyObj = { a: 1, b: 2, c: 3 }; result = vm.isEmpty(dummyObj); expect(result).toBe(false); @@ -158,29 +158,31 @@ describe('CrudModel', () => { it('should return true if array is empty', async () => { dummyArray = []; - result = vm.isEmpty(dummyArray); + result = vm.isEmpty(dummyArray); expect(result).toBe(true); }); - + it('should return false if array is not empty', async () => { - dummyArray = [1,2,3]; + dummyArray = [1, 2, 3]; result = vm.isEmpty(dummyArray); expect(result).toBe(false); - }) + }); }); describe('resetData()', () => { it('should add $index to elements in data[] and sets originalData and formData with data', async () => { - data = [{ - name: 'Tony', - lastName: 'Stark', - age: 42, - }]; + data = [ + { + name: 'Tony', + lastName: 'Stark', + age: 42, + }, + ]; vm.resetData(data); - + expect(vm.originalData).toEqual(data); expect(vm.originalData[0].$index).toEqual(0); expect(vm.formData).toEqual(data); @@ -200,7 +202,7 @@ describe('CrudModel', () => { lastName: 'Stark', age: 42, }; - + vm.resetData(data); expect(vm.originalData).toEqual(data); @@ -210,17 +212,19 @@ describe('CrudModel', () => { }); describe('saveChanges()', () => { - data = [{ - name: 'Tony', - lastName: 'Stark', - age: 42, - }]; + data = [ + { + name: 'Tony', + lastName: 'Stark', + age: 42, + }, + ]; it('should call saveFn if exists', async () => { await wrapper.setProps({ saveFn: vi.fn() }); vm.saveChanges(data); - + expect(vm.saveFn).toHaveBeenCalledOnce(); expect(vm.isLoading).toBe(false); expect(vm.hasChanges).toBe(false); @@ -229,13 +233,15 @@ describe('CrudModel', () => { }); it("should use default url if there's not saveFn", async () => { - const postMock =vi.spyOn(axios, 'post'); - - vm.formData = [{ - name: 'Bruce', - lastName: 'Wayne', - age: 45, - }] + const postMock = vi.spyOn(axios, 'post'); + + vm.formData = [ + { + name: 'Bruce', + lastName: 'Wayne', + age: 45, + }, + ]; await vm.saveChanges(data); diff --git a/src/components/common/VnCardBeta.vue b/src/components/common/VnCardBeta.vue index 7c82316dc..620dc2ad2 100644 --- a/src/components/common/VnCardBeta.vue +++ b/src/components/common/VnCardBeta.vue @@ -1,10 +1,9 @@