diff --git a/7014.patch b/7014.patch new file mode 100644 index 000000000..84fe2d88d --- /dev/null +++ b/7014.patch @@ -0,0 +1,46 @@ +diff --git a/src/layouts/ViewLayout.vue b/src/layouts/ViewLayout.vue +new file mode 100644 +index 00000000..4812e7a8 +--- /dev/null ++++ b/src/layouts/ViewLayout.vue +@@ -0,0 +1,16 @@ ++ ++ +diff --git a/src/pages/Claim/ClaimMain.vue b/src/pages/Claim/ClaimMain.vue +index f0dc2e50..6a294fe8 100644 +--- a/src/pages/Claim/ClaimMain.vue ++++ b/src/pages/Claim/ClaimMain.vue +@@ -1,17 +1,7 @@ + + + diff --git a/autofocus.patch b/autofocus.patch new file mode 100644 index 000000000..6303b8046 --- /dev/null +++ b/autofocus.patch @@ -0,0 +1,72 @@ +diff --git a/quasar.config.js b/quasar.config.js +index 2d828950..80ddc375 100644 +--- a/quasar.config.js ++++ b/quasar.config.js +@@ -29,7 +29,7 @@ module.exports = configure(function (/* ctx */) { + // app boot file (/src/boot) + // --> boot files are part of "main.js" + // https://v2.quasar.dev/quasar-cli/boot-files +- boot: ['i18n', 'axios', 'vnDate', 'validations'], ++ boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar'], + + // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css + css: ['app.scss'], +diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js +new file mode 100644 +index 00000000..7130b071 +--- /dev/null ++++ b/src/boot/qformMixin.js +@@ -0,0 +1,28 @@ ++import { QForm } from 'quasar'; ++import { getCurrentInstance } from 'vue'; ++ ++export default { ++ inject: { QForm }, ++ component: { QForm }, ++ components: { QForm }, ++ extends: { QForm }, ++ mounted: function () { ++ const vm = getCurrentInstance(); ++ if (vm.type.name === 'QForm') ++ if (![ 'searchbarForm'].includes(this.$el?.id)) { ++ let that = this; ++ const elementsArray = Array.from(this.$el.elements); ++ const index = elementsArray.findIndex(element => element.classList.contains('q-field__native')); ++ ++ if (index !== -1) { ++ const firstInputElement = elementsArray[index]; ++ firstInputElement.focus(); ++ } ++ document.addEventListener('keyup', function (evt) { ++ if (evt.keyCode === 13) { ++ that.onSubmit(); ++ } ++ }); ++ } ++ }, ++}; +diff --git a/src/boot/quasar.js b/src/boot/quasar.js +new file mode 100644 +index 00000000..a8d9b7ad +--- /dev/null ++++ b/src/boot/quasar.js +@@ -0,0 +1,6 @@ ++import { boot } from 'quasar/wrappers'; ++import qFormMixin from './qformMixin'; ++ ++export default boot(({ app }) => { ++ app.mixin(qFormMixin); ++}); +diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue +index baab4829..a8065948 100644 +--- a/src/components/ui/VnSearchbar.vue ++++ b/src/components/ui/VnSearchbar.vue +@@ -108,7 +108,7 @@ async function search() { + + +