From 1e09e9e4bb39d060e9e82373ce8be5e7ed4286e9 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 27 Mar 2024 10:07:27 +0100 Subject: [PATCH] refs #6321 perf: move dialogs to new files --- 7014.patch | 46 + autofocus.patch | 72 + multimediaTokeCypress.patch | 33 + package.json | 1 + patch/6336.patch | 245 ++ patch/7017.patch | 30 + patch/777.patch | 13 + patch/changes.patch | 232 ++ patch/entryLatestBuys.patch | 230 ++ patch/quasarCustomComponents.patch | 43 + patch/test.patch | 0 pnpm-lock.yaml | 14 + quasar.extensions.json | 3 +- quasar.patch | 2013 +++++++++++++++++ .../Ticket/Negative/NegativeOriginDialog.vue | 92 + src/pages/Ticket/Negative/TicketLackList.vue | 22 +- .../Negative/TotalNegativeOriginDialog.vue | 116 + testt.patch | 13 + workerPDA.patch | 138 ++ 19 files changed, 3350 insertions(+), 6 deletions(-) create mode 100644 7014.patch create mode 100644 autofocus.patch create mode 100644 multimediaTokeCypress.patch create mode 100644 patch/6336.patch create mode 100644 patch/7017.patch create mode 100644 patch/777.patch create mode 100644 patch/changes.patch create mode 100644 patch/entryLatestBuys.patch create mode 100644 patch/quasarCustomComponents.patch create mode 100644 patch/test.patch create mode 100644 quasar.patch create mode 100644 src/pages/Ticket/Negative/NegativeOriginDialog.vue create mode 100644 src/pages/Ticket/Negative/TotalNegativeOriginDialog.vue create mode 100644 testt.patch create mode 100644 workerPDA.patch 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() { + + +