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/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) => { \ No newline at end of file + diff --git a/src/components/EntityCalendarGrid.vue b/src/components/EntityCalendarGrid.vue index 09ccaad07..19fb5a061 100644 --- a/src/components/EntityCalendarGrid.vue +++ b/src/components/EntityCalendarGrid.vue @@ -5,18 +5,18 @@ import { useWeekdayStore } from 'src/stores/useWeekdayStore'; import { useArrayData } from 'src/composables/useArrayData'; const props = defineProps({ - dataKey: { - type: String, - required: true, - }, - calendarComponent: { - type: Object, - required: true, - }, - additionalProps: { - type: Object, - default: () => ({}), - } + dataKey: { + type: String, + required: true, + }, + calendarComponent: { + type: Object, + required: true, + }, + additionalProps: { + type: Object, + default: () => ({}), + }, }); const stateStore = useStateStore(); @@ -28,99 +28,99 @@ const lastDay = ref(Date.vnNew()); const months = ref([]); const arrayData = useArrayData(props.dataKey); onMounted(async () => { - const initialDate = Date.vnNew(); - initialDate.setDate(1); - initialDate.setHours(0, 0, 0, 0); - date.value = initialDate; - await nextTick(); - stateStore.rightDrawer = true; + const initialDate = Date.vnNew(); + initialDate.setDate(1); + initialDate.setHours(0, 0, 0, 0); + date.value = initialDate; + await nextTick(); + stateStore.rightDrawer = true; }); onUnmounted(() => arrayData.destroy()); const emit = defineEmits([ - 'update:firstDay', - 'update:lastDay', - 'update:events', - 'onDateSelected', + 'update:firstDay', + 'update:lastDay', + 'update:events', + 'onDateSelected', ]); const date = computed({ - get: () => _date.value, - set: (value) => { - if (!(value instanceof Date)) return; - _date.value = value; - const stamp = value.getTime(); + get: () => _date.value, + set: (value) => { + if (!(value instanceof Date)) return; + _date.value = value; + const stamp = value.getTime(); - firstDay.value = new Date(stamp); - firstDay.value.setDate(1); + firstDay.value = new Date(stamp); + firstDay.value.setDate(1); - lastDay.value = new Date(stamp); - lastDay.value.setMonth(lastDay.value.getMonth() + nMonths.value); - lastDay.value.setDate(0); + lastDay.value = new Date(stamp); + lastDay.value.setMonth(lastDay.value.getMonth() + nMonths.value); + lastDay.value.setDate(0); - months.value = []; - for (let i = 0; i < nMonths.value; i++) { - const monthDate = new Date(stamp); - monthDate.setMonth(value.getMonth() + i); - months.value.push(monthDate); - } + months.value = []; + for (let i = 0; i < nMonths.value; i++) { + const monthDate = new Date(stamp); + monthDate.setMonth(value.getMonth() + i); + months.value.push(monthDate); + } - emit('update:firstDay', firstDay.value); - emit('update:lastDay', lastDay.value); - emit('refresh-events'); - }, + emit('update:firstDay', firstDay.value); + emit('update:lastDay', lastDay.value); + emit('refresh-events'); + }, }); const headerTitle = computed(() => { - if (!months.value?.length) return ''; - const getMonthName = date => - `${weekdayStore.getLocaleMonths[date.getMonth()].locale} ${date.getFullYear()}`; - return `${getMonthName(months.value[0])} - ${getMonthName(months.value[months.value.length - 1])}`; + if (!months.value?.length) return ''; + const getMonthName = (date) => + `${weekdayStore.getLocaleMonths[date.getMonth()].locale} ${date.getFullYear()}`; + return `${getMonthName(months.value[0])} - ${getMonthName(months.value[months.value.length - 1])}`; }); const step = (direction) => { - const newDate = new Date(date.value); - newDate.setMonth(newDate.getMonth() + nMonths.value * direction); - date.value = newDate; + const newDate = new Date(date.value); + newDate.setMonth(newDate.getMonth() + nMonths.value * direction); + date.value = newDate; }; defineExpose({ firstDay, - lastDay + lastDay, }); \ No newline at end of file + +
+ + {{ headerTitle }} + +
+
+ +
+
+ diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index a49ce583f..43a0d63f0 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -380,8 +380,16 @@ defineExpose({ data-cy="saveAndContinueDefaultBtn" v-if="$props.goTo" @click="saveAndGo" - :label="tMobile('globals.saveAndContinue')" - :title="t('globals.saveAndContinue')" + :label=" + tMobile('globals.saveAndContinue') + + ' ' + + t('globals.' + $props.goTo.split('/').pop()) + " + :title=" + t('globals.saveAndContinue') + + ' ' + + t('globals.' + $props.goTo.split('/').pop()) + " :disable="!hasChanges" color="primary" icon="save" diff --git a/src/components/PinnedModules.vue b/src/components/PinnedModules.vue index 5f291b580..095662baa 100644 --- a/src/components/PinnedModules.vue +++ b/src/components/PinnedModules.vue @@ -26,7 +26,7 @@ async function redirect() { if (route?.params?.id) return (window.location.href = await getUrl( - `${section}/${route.params.id}/summary` + `${section}/${route.params.id}/summary`, )); return (window.location.href = await getUrl(section + '/index')); } diff --git a/src/components/RefundInvoiceForm.vue b/src/components/RefundInvoiceForm.vue index 6dcb8b390..cea028d2f 100644 --- a/src/components/RefundInvoiceForm.vue +++ b/src/components/RefundInvoiceForm.vue @@ -55,7 +55,7 @@ const refund = async () => { (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/VnSelectProvince.vue b/src/components/VnSelectProvince.vue index d73ee964e..dfd386fc5 100644 --- a/src/components/VnSelectProvince.vue +++ b/src/components/VnSelectProvince.vue @@ -52,7 +52,7 @@ watch( } else filter.value.where = {}; await provincesFetchDataRef.value.fetch({}); emit('onProvinceFetched', provincesOptions.value); - } + }, ); diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 3c431fa14..9327dcd39 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -35,6 +35,7 @@ import { getColAlign } from 'src/composables/getColAlign'; import RightMenu from '../common/RightMenu.vue'; import VnScroll from '../common/VnScroll.vue'; import VnCheckboxMenu from '../common/VnCheckboxMenu.vue'; +import VnCheckbox from '../common/VnCheckbox.vue'; const arrayData = useArrayData(useAttrs()['data-key']); const $props = defineProps({ @@ -332,6 +333,7 @@ function stopEventPropagation(event) { function reload(params) { selected.value = []; + selectAll.value = false; CrudModelRef.value.reload(params); } @@ -645,7 +647,7 @@ const rowCtrlClickFunction = computed(() => { return () => {}; }); const handleHeaderSelection = (evt, data) => { - if (evt === 'selected' && data) { + if (evt === 'updateSelected' && selectAll.value) { selected.value = tableRef.value.rows; } else if (evt === 'selectAll') { selected.value = data; @@ -680,7 +682,15 @@ const handleHeaderSelection = (evt, data) => { :class="$attrs['class'] ?? 'q-px-md'" :limit="$attrs['limit'] ?? 100" ref="CrudModelRef" - @on-fetch="(...args) => emit('onFetch', ...args)" + @on-fetch=" + (...args) => { + if ($props.multiCheck.expand) { + selectAll = false; + selected = []; + } + emit('onFetch', ...args); + } + " :search-url="searchUrl" :disable-infinite-scroll="isTableMode" :before-save-fn="removeTextValue" @@ -718,14 +728,23 @@ const handleHeaderSelection = (evt, data) => { :data-cy > 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 @@