diff --git a/.husky/addReferenceTag.js b/.husky/addReferenceTag.js index 857d15739..a88baf2e1 100644 --- a/.husky/addReferenceTag.js +++ b/.husky/addReferenceTag.js @@ -26,7 +26,7 @@ if (branchName) { const splitedMsg = msg.split(':'); if (splitedMsg.length > 1) { - const finalMsg = splitedMsg[0] + ': ' + referenceTag + splitedMsg.slice(1).join(':'); + const finalMsg = `${splitedMsg[0]}: ${referenceTag}${splitedMsg.slice(1).join(':')}`; writeFileSync(msgPath, finalMsg); } } diff --git a/Jenkinsfile b/Jenkinsfile index a9db9d369..59bf09e22 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -125,7 +125,7 @@ pipeline { sh "docker-compose ${env.COMPOSE_PARAMS} pull db" sh "docker-compose ${env.COMPOSE_PARAMS} up -d" - def modules = sh(script: 'node test/cypress/docker/find/find.js', returnStdout: true).trim() + def modules = sh(script: "node test/cypress/docker/find/find.js ${env.COMPOSE_TAG}", returnStdout: true).trim() echo "E2E MODULES: ${modules}" image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") { sh "sh test/cypress/docker/cypressParallel.sh 1 '${modules}'" diff --git a/cypress.config.js b/cypress.config.js index 7458c0b05..55eefb97e 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,6 +1,9 @@ import { defineConfig } from 'cypress'; -let urlHost, reporter, reporterOptions, timeouts; +let urlHost; +let reporter; +let reporterOptions; +let timeouts; if (process.env.CI) { urlHost = 'front'; diff --git a/index.html b/index.html index c1bd4681b..63b2f2f51 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + <%= productName %> @@ -12,7 +12,12 @@ content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>" /> - + diff --git a/package.json b/package.json index b7b04287d..f903a5ab6 100644 --- a/package.json +++ b/package.json @@ -89,4 +89,4 @@ "vite": "^6.0.11", "vitest": "^0.31.1" } -} \ No newline at end of file +} diff --git a/postcss.config.js b/postcss.config.js index 9ec43d0cb..164f207d4 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,4 +1,3 @@ -/* eslint-disable */ // https://github.com/michael-ciniawsky/postcss-load-config import autoprefixer from 'autoprefixer'; diff --git a/quasar.config.js b/quasar.config.js index 2bc0be37f..227f5840c 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -13,7 +13,7 @@ import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'; import path from 'path'; const target = `http://${process.env.CI ? 'back' : 'localhost'}:3000`; -export default configure(function (/* ctx */) { +export default configure((/* ctx */) => { return { eslint: { // fix: true, diff --git a/quasar.extensions.json b/quasar.extensions.json index 050f605cc..867769090 100644 --- a/quasar.extensions.json +++ b/quasar.extensions.json @@ -1,8 +1,6 @@ { "@quasar/testing-unit-vitest": { - "options": [ - "scripts" - ] + "options": ["scripts"] }, "@quasar/qcalendar": {} } diff --git a/quasar.testing.json b/quasar.testing.json index a59d9af89..6957efe67 100644 --- a/quasar.testing.json +++ b/quasar.testing.json @@ -1,5 +1,5 @@ { - "unit-vitest": { - "runnerCommand": "vitest run" - } -} \ No newline at end of file + "unit-vitest": { + "runnerCommand": "vitest run" + } +} diff --git a/src/App.vue b/src/App.vue index 0217c45c2..bec50ae9d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,7 +39,7 @@ quasar.iconMapFn = (iconName) => { diff --git a/src/components/EntityCalendarGrid.vue b/src/components/EntityCalendarGrid.vue new file mode 100644 index 000000000..19fb5a061 --- /dev/null +++ b/src/components/EntityCalendarGrid.vue @@ -0,0 +1,126 @@ + + + diff --git a/src/components/FilterTravelForm.vue b/src/components/FilterTravelForm.vue index 4aad327b2..f2a7a09eb 100644 --- a/src/components/FilterTravelForm.vue +++ b/src/components/FilterTravelForm.vue @@ -156,6 +156,9 @@ const selectTravel = ({ id }) => { option-label="name" option-value="id" v-model="travelFilterParams.warehouseOutFk" + :where="{ + isOrigin: true, + }" /> { option-label="name" option-value="id" v-model="travelFilterParams.warehouseInFk" + :where="{ + isDestiny: true, + }" /> { (data) => ( (rectificativeTypeOptions = data), (invoiceParams.cplusRectificationTypeFk = data.filter( - (type) => type.description == 'I – Por diferencias' + (type) => type.description == 'I – Por diferencias', )[0].id) ) " @@ -68,7 +68,7 @@ const refund = async () => { (data) => ( (siiTypeInvoiceOutsOptions = data), (invoiceParams.siiTypeInvoiceOutFk = data.filter( - (type) => type.code == 'R4' + (type) => type.code == 'R4', )[0].id) ) " diff --git a/src/components/RegularizeStockForm.vue b/src/components/RegularizeStockForm.vue index 91a2e5d39..340a18f9d 100644 --- a/src/components/RegularizeStockForm.vue +++ b/src/components/RegularizeStockForm.vue @@ -40,6 +40,9 @@ const onDataSaved = (data) => { url="Warehouses" @on-fetch="(data) => (warehousesOptions = data)" auto-load + :where="{ + isInventory: true, + }" /> diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index 82d7c772c..bdba421da 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -1,6 +1,6 @@ diff --git a/src/components/VnTable/filters/tableFooter.js b/src/components/VnTable/filters/tableFooter.js index 9c7d080f6..610bf2ac0 100644 --- a/src/components/VnTable/filters/tableFooter.js +++ b/src/components/VnTable/filters/tableFooter.js @@ -6,7 +6,7 @@ export default function (initialFooter, data) { }); return acc; }, - { ...initialFooter } + { ...initialFooter }, ); return footer; } diff --git a/src/components/__tests__/CrudModel.spec.js b/src/components/__tests__/CrudModel.spec.js index 475f56aec..2ac820fac 100644 --- a/src/components/__tests__/CrudModel.spec.js +++ b/src/components/__tests__/CrudModel.spec.js @@ -241,7 +241,7 @@ describe('CrudModel', () => { await vm.saveChanges(data); - expect(postMock).toHaveBeenCalledWith(vm.url + '/crud', data); + expect(postMock).toHaveBeenCalledWith(`${vm.url}/crud`, data); expect(vm.isLoading).toBe(false); expect(vm.hasChanges).toBe(false); expect(vm.originalData).toEqual(JSON.parse(JSON.stringify(vm.formData))); diff --git a/src/components/__tests__/Leftmenu.spec.js b/src/components/__tests__/Leftmenu.spec.js index 5bddc104c..0aff101e0 100644 --- a/src/components/__tests__/Leftmenu.spec.js +++ b/src/components/__tests__/Leftmenu.spec.js @@ -142,14 +142,14 @@ describe('getRoutes', () => { const fn = (props) => getRoutes(props, getMethodA, getMethodB); it('should call getMethodB when source is card', () => { - let props = { source: 'methodB' }; + const props = { source: 'methodB' }; fn(props); expect(getMethodB).toHaveBeenCalled(); expect(getMethodA).not.toHaveBeenCalled(); }); it('should call getMethodA when source is main', () => { - let props = { source: 'methodA' }; + const props = { source: 'methodA' }; fn(props); expect(getMethodA).toHaveBeenCalled(); @@ -157,7 +157,7 @@ describe('getRoutes', () => { }); it('should call getMethodA when source is not exists or undefined', () => { - let props = { source: 'methodC' }; + const props = { source: 'methodC' }; expect(() => fn(props)).toThrowError('Method not defined'); expect(getMethodA).not.toHaveBeenCalled(); diff --git a/src/components/common/VnBankDetailsForm.vue b/src/components/common/VnBankDetailsForm.vue new file mode 100644 index 000000000..4e13a4d86 --- /dev/null +++ b/src/components/common/VnBankDetailsForm.vue @@ -0,0 +1,93 @@ + + diff --git a/src/components/common/VnBreadcrumbs.vue b/src/components/common/VnBreadcrumbs.vue index 334ab4d21..f883731ad 100644 --- a/src/components/common/VnBreadcrumbs.vue +++ b/src/components/common/VnBreadcrumbs.vue @@ -15,7 +15,7 @@ let root = ref(null); watchEffect(() => { matched.value = currentRoute.value.matched.filter( - (matched) => !!matched?.meta?.title || !!matched?.meta?.icon + (matched) => !!matched?.meta?.title || !!matched?.meta?.icon, ); breadcrumbs.value.length = 0; if (!matched.value[0]) return; diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue index 0b9cc2cce..fb3ece207 100644 --- a/src/components/common/VnCard.vue +++ b/src/components/common/VnCard.vue @@ -33,7 +33,7 @@ onBeforeRouteLeave(() => { }); onBeforeMount(async () => { - stateStore.cardDescriptorChangeValue(markRaw(props.descriptor)); + if (props.visual) stateStore.cardDescriptorChangeValue(markRaw(props.descriptor)); const route = router.currentRoute.value; try { diff --git a/src/components/common/VnCheckboxMenu.vue b/src/components/common/VnCheckboxMenu.vue new file mode 100644 index 000000000..1752897c6 --- /dev/null +++ b/src/components/common/VnCheckboxMenu.vue @@ -0,0 +1,104 @@ + + + + +en: + tooManyResults: Too many results. Please narrow down your search. + records: '{rows} records' +es: + Select all: Seleccionar todo + tooManyResults: Demasiados registros. Restringe la búsqueda. + records: '{rows} registros' + diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue index 345870aa4..d175a4167 100644 --- a/src/components/common/VnDmsList.vue +++ b/src/components/common/VnDmsList.vue @@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar'; import axios from 'axios'; +import { usePrintService } from 'composables/usePrintService'; import VnUserLink from '../ui/VnUserLink.vue'; import { downloadFile } from 'src/composables/downloadFile'; @@ -23,6 +24,7 @@ const rows = ref([]); const dmsRef = ref(); const formDialog = ref({}); const token = useSession().getTokenMultimedia(); +const { openReport } = usePrintService(); const $props = defineProps({ model: { @@ -199,12 +201,7 @@ const columns = computed(() => [ color: 'primary', }), click: (prop) => - downloadFile( - prop.row.id, - $props.downloadModel, - undefined, - prop.row.download, - ), + openReport(`dms/${prop.row.id}/downloadFile`, {}, '_blank'), }, { component: QBtn, diff --git a/src/components/common/VnInputBic.vue b/src/components/common/VnInputBic.vue deleted file mode 100644 index b29644912..000000000 --- a/src/components/common/VnInputBic.vue +++ /dev/null @@ -1,44 +0,0 @@ - - diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index 5028e876d..fbff1d222 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -21,7 +21,7 @@ watch( (newValue) => { if (!modelValue.value) return; modelValue.value = formatLocation(newValue) ?? null; - } + }, ); const mixinRules = [requiredFieldRule]; @@ -45,7 +45,7 @@ const formatLocation = (obj, properties = locationProperties) => { }); const filteredParts = parts.filter( - (part) => part !== null && part !== undefined && part !== '' + (part) => part !== null && part !== undefined && part !== '', ); return filteredParts.join(', '); diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 7020c8489..6e9128a43 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -1,5 +1,5 @@ diff --git a/src/components/ui/VnAvatar.vue b/src/components/ui/VnAvatar.vue index 0fe943ee2..7381e46ae 100644 --- a/src/components/ui/VnAvatar.vue +++ b/src/components/ui/VnAvatar.vue @@ -17,7 +17,7 @@ const token = getTokenMultimedia(); const { t } = useI18n(); const src = computed( - () => `/api/Images/user/160x160/${$props.workerId}/download?access_token=${token}` + () => `/api/Images/user/160x160/${$props.workerId}/download?access_token=${token}`, ); const title = computed(() => $props.title?.toUpperCase() || t('globals.system')); const showLetter = ref(false); diff --git a/src/components/ui/VnLogo.vue b/src/components/ui/VnLogo.vue index 3b955289d..3f9d0c915 100644 --- a/src/components/ui/VnLogo.vue +++ b/src/components/ui/VnLogo.vue @@ -13,7 +13,7 @@ const src = computed({ get() { return new URL( `../../assets/${$props.logo}${Dark.isActive ? '_dark' : ''}.svg`, - import.meta.url + import.meta.url, ).href; }, }); diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue index 9cedbccfa..f7c176286 100644 --- a/src/components/ui/VnNotes.vue +++ b/src/components/ui/VnNotes.vue @@ -1,10 +1,11 @@