diff --git a/src/boot/mainShortcutMixin.js b/src/boot/mainShortcutMixin.js deleted file mode 100644 index 8e5f147db..000000000 --- a/src/boot/mainShortcutMixin.js +++ /dev/null @@ -1,38 +0,0 @@ -import routes from 'src/router/modules'; -import { useRouter } from 'vue-router'; - -let isNotified = false; - -export default { - created: function () { - const router = useRouter(); - const keyBindingMap = routes - .filter((route) => route.meta.keyBinding) - .reduce((map, route) => { - map['Key' + route.meta.keyBinding.toUpperCase()] = route.path; - return map; - }, {}); - - const handleKeyDown = (event) => { - const { ctrlKey, altKey, code } = event; - - if (ctrlKey && altKey && keyBindingMap[code] && !isNotified) { - event.preventDefault(); - router.push(keyBindingMap[code]); - isNotified = true; - } - }; - - const handleKeyUp = (event) => { - const { ctrlKey, altKey } = event; - - // Resetea la bandera cuando se sueltan las teclas ctrl o alt - if (!ctrlKey || !altKey) { - isNotified = false; - } - }; - - window.addEventListener('keydown', handleKeyDown); - window.addEventListener('keyup', handleKeyUp); - }, -}; diff --git a/src/boot/quasar.js b/src/boot/quasar.js index 7845719fe..01fe68d8b 100644 --- a/src/boot/quasar.js +++ b/src/boot/quasar.js @@ -1,6 +1,5 @@ import { boot } from 'quasar/wrappers'; import qFormMixin from './qformMixin'; -import mainShortcutMixin from './mainShortcutMixin'; import keyShortcut from './keyShortcut'; import useNotify from 'src/composables/useNotify.js'; import { CanceledError } from 'axios'; @@ -9,7 +8,6 @@ const { notify } = useNotify(); export default boot(({ app }) => { app.mixin(qFormMixin); - app.mixin(mainShortcutMixin); app.directive('shortcut', keyShortcut); app.config.errorHandler = (error) => { let message; diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 030ca1388..03cba8ac7 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -108,11 +108,11 @@ watch( watch( () => postcodeFormData.provinceFk, - async (newProvinceFk) => { + async (newProvinceFk, oldValueFk) => { if (Array.isArray(newProvinceFk)) { newProvinceFk = newProvinceFk[0]; } - if (newProvinceFk !== postcodeFormData.provinceFk) { + if (newProvinceFk !== oldValueFk) { await townsFetchDataRef.value.fetch({ where: { provinceFk: newProvinceFk }, }); @@ -147,13 +147,7 @@ async function handleCountries(data) { auto-load url="Towns/location" /> - + -import { markRaw, computed, defineModel } from 'vue'; +import { markRaw, computed } from 'vue'; import { QIcon, QCheckbox } from 'quasar'; import { dashIfEmpty } from 'src/filters'; diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index b17fd4407..9da0b26a4 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -1,5 +1,5 @@