From edb701c35390296d96a2e1637d43dd80dc437df2 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 17 Jan 2025 09:44:30 +0100 Subject: [PATCH 01/10] fix: refs #7408 fix quasarconfig, vncomponents --- quasar.config.js | 11 ++++++++++- src/boot/vn-components.js | 13 +++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/boot/vn-components.js diff --git a/quasar.config.js b/quasar.config.js index b59c62eeb..d5e6f78c0 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -29,7 +29,16 @@ 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', 'quasar', 'quasar.defaults'], + boot: [ + 'i18n', + 'axios', + 'vnDate', + 'validations', + 'quasar', + 'quasar.defaults', + 'global-components', + ], + importStrategy: 'auto', // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css css: ['app.scss'], diff --git a/src/boot/vn-components.js b/src/boot/vn-components.js new file mode 100644 index 000000000..f83a0975b --- /dev/null +++ b/src/boot/vn-components.js @@ -0,0 +1,13 @@ +// src/boot/vn-components.js +import { defineAsyncComponent } from 'vue'; + +const components = import.meta.glob('src/components/**/*.vue'); +export default ({ app }) => { + for (const path in components) { + const componentName = path + .split('/') + .pop() + .replace(/\.\w+$/, ''); + app.component(componentName, defineAsyncComponent(components[path])); + } +}; -- 2.40.1 From a0f06772d09e9e37c924db768964ec7d8eba1ea1 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 17 Jan 2025 10:48:22 +0100 Subject: [PATCH 02/10] fix: refs #7408 remove import LV --- src/pages/Account/AccountConnections.vue | 1 - src/pages/Account/Alias/Card/AliasDescriptor.vue | 2 -- src/pages/Account/Alias/Card/AliasSummary.vue | 2 -- src/pages/Account/Card/AccountDescriptor.vue | 1 - src/pages/Account/Card/AccountSummary.vue | 1 - src/pages/Account/Role/Card/RoleDescriptor.vue | 1 - src/pages/Account/Role/Card/RoleSummary.vue | 1 - src/pages/Claim/Card/ClaimDescriptor.vue | 1 - src/pages/Claim/Card/ClaimSummary.vue | 1 - src/pages/Customer/Card/CustomerDescriptor.vue | 1 - src/pages/Customer/Card/CustomerSummary.vue | 1 - src/pages/Department/Card/DepartmentDescriptor.vue | 1 - src/pages/Department/Card/DepartmentSummary.vue | 1 - src/pages/Entry/Card/EntryDescriptor.vue | 1 - src/pages/Entry/Card/EntrySummary.vue | 1 - src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue | 6 ++++-- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 1 - src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue | 1 - src/pages/InvoiceOut/Card/InvoiceOutSummary.vue | 1 - src/pages/Item/Card/ItemDescriptor.vue | 1 - src/pages/Item/Card/ItemSummary.vue | 1 - src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue | 1 - src/pages/Item/ItemType/Card/ItemTypeSummary.vue | 1 - src/pages/Order/Card/OrderDescriptor.vue | 1 - src/pages/Order/Card/OrderLines.vue | 1 - src/pages/Route/Agency/Card/AgencyModes.vue | 3 +-- src/pages/Route/Agency/Card/AgencyWorkcenter.vue | 1 - src/pages/Supplier/Card/SupplierAddresses.vue | 1 - src/pages/Supplier/Card/SupplierDescriptor.vue | 1 - src/pages/Supplier/Card/SupplierSummary.vue | 1 - src/pages/Ticket/Card/TicketDescriptor.vue | 1 - src/pages/Ticket/Card/TicketSummary.vue | 1 - src/pages/Travel/Card/TravelDescriptor.vue | 1 - src/pages/Travel/Card/TravelSummary.vue | 1 - src/pages/Worker/Card/WorkerDescriptor.vue | 1 - src/pages/Worker/Card/WorkerSummary.vue | 1 - src/pages/Zone/Card/ZoneDescriptor.vue | 1 - src/pages/Zone/Card/ZoneSummary.vue | 1 - 38 files changed, 5 insertions(+), 42 deletions(-) diff --git a/src/pages/Account/AccountConnections.vue b/src/pages/Account/AccountConnections.vue index ba4ed49c8..880fd93d6 100644 --- a/src/pages/Account/AccountConnections.vue +++ b/src/pages/Account/AccountConnections.vue @@ -4,7 +4,6 @@ import { useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import VnPaginate from 'components/ui/VnPaginate.vue'; import CardList from 'src/components/ui/CardList.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import { toDateTimeFormat } from 'src/filters/date.js'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; diff --git a/src/pages/Account/Alias/Card/AliasDescriptor.vue b/src/pages/Account/Alias/Card/AliasDescriptor.vue index 2e01fad01..cdd27d221 100644 --- a/src/pages/Account/Alias/Card/AliasDescriptor.vue +++ b/src/pages/Account/Alias/Card/AliasDescriptor.vue @@ -5,8 +5,6 @@ import { useI18n } from 'vue-i18n'; import { useQuasar } from 'quasar'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; - import useCardDescription from 'src/composables/useCardDescription'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; diff --git a/src/pages/Account/Alias/Card/AliasSummary.vue b/src/pages/Account/Alias/Card/AliasSummary.vue index 1f76fe7c2..2ffc80c45 100644 --- a/src/pages/Account/Alias/Card/AliasSummary.vue +++ b/src/pages/Account/Alias/Card/AliasSummary.vue @@ -4,8 +4,6 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardSummary from 'components/ui/CardSummary.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; - import { useArrayData } from 'src/composables/useArrayData'; const route = useRoute(); diff --git a/src/pages/Account/Card/AccountDescriptor.vue b/src/pages/Account/Card/AccountDescriptor.vue index 4e5328de6..03a5b8965 100644 --- a/src/pages/Account/Card/AccountDescriptor.vue +++ b/src/pages/Account/Card/AccountDescriptor.vue @@ -3,7 +3,6 @@ import { ref, computed, onMounted } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; import AccountDescriptorMenu from './AccountDescriptorMenu.vue'; import VnImg from 'src/components/ui/VnImg.vue'; diff --git a/src/pages/Account/Card/AccountSummary.vue b/src/pages/Account/Card/AccountSummary.vue index ca17c7975..939dffc72 100644 --- a/src/pages/Account/Card/AccountSummary.vue +++ b/src/pages/Account/Card/AccountSummary.vue @@ -4,7 +4,6 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardSummary from 'components/ui/CardSummary.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import { useArrayData } from 'src/composables/useArrayData'; import AccountDescriptorMenu from './AccountDescriptorMenu.vue'; diff --git a/src/pages/Account/Role/Card/RoleDescriptor.vue b/src/pages/Account/Role/Card/RoleDescriptor.vue index 0a555346d..aaa6e645c 100644 --- a/src/pages/Account/Role/Card/RoleDescriptor.vue +++ b/src/pages/Account/Role/Card/RoleDescriptor.vue @@ -3,7 +3,6 @@ import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; diff --git a/src/pages/Account/Role/Card/RoleSummary.vue b/src/pages/Account/Role/Card/RoleSummary.vue index f0daa77fb..b76a3acc4 100644 --- a/src/pages/Account/Role/Card/RoleSummary.vue +++ b/src/pages/Account/Role/Card/RoleSummary.vue @@ -3,7 +3,6 @@ import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardSummary from 'components/ui/CardSummary.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import { useArrayData } from 'src/composables/useArrayData'; const route = useRoute(); diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue index 02b63dd8e..36dd63bda 100644 --- a/src/pages/Claim/Card/ClaimDescriptor.vue +++ b/src/pages/Claim/Card/ClaimDescriptor.vue @@ -7,7 +7,6 @@ import { useState } from 'src/composables/useState'; import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue'; import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import { getUrl } from 'src/composables/getUrl'; diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue index 66fb151e5..d10fae67e 100644 --- a/src/pages/Claim/Card/ClaimSummary.vue +++ b/src/pages/Claim/Card/ClaimSummary.vue @@ -7,7 +7,6 @@ import { toDate, toCurrency } from 'src/filters'; import dashIfEmpty from 'src/filters/dashIfEmpty'; import { useSession } from 'src/composables/useSession'; -import VnLv from 'src/components/ui/VnLv.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; import FetchData from 'components/FetchData.vue'; diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue index cb49109d0..19dd87b47 100644 --- a/src/pages/Customer/Card/CustomerDescriptor.vue +++ b/src/pages/Customer/Card/CustomerDescriptor.vue @@ -8,7 +8,6 @@ import { dashIfEmpty, toCurrency, toDate } from 'src/filters'; import useCardDescription from 'src/composables/useCardDescription'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue'; diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index d2eb125d7..21d2af338 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -6,7 +6,6 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue'; import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters'; import CardSummary from 'components/ui/CardSummary.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; import VnLinkMail from 'src/components/ui/VnLinkMail.vue'; import CustomerSummaryTable from 'src/pages/Customer/components/CustomerSummaryTable.vue'; diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue index e08495faf..5939f907d 100644 --- a/src/pages/Department/Card/DepartmentDescriptor.vue +++ b/src/pages/Department/Card/DepartmentDescriptor.vue @@ -3,7 +3,6 @@ import { computed, ref } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { useVnConfirm } from 'composables/useVnConfirm'; -import VnLv from 'src/components/ui/VnLv.vue'; import CardDescriptor from 'src/components/ui/CardDescriptor.vue'; import useCardDescription from 'src/composables/useCardDescription'; diff --git a/src/pages/Department/Card/DepartmentSummary.vue b/src/pages/Department/Card/DepartmentSummary.vue index d41f8622b..3d268c4be 100644 --- a/src/pages/Department/Card/DepartmentSummary.vue +++ b/src/pages/Department/Card/DepartmentSummary.vue @@ -4,7 +4,6 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardSummary from 'components/ui/CardSummary.vue'; import { getUrl } from 'src/composables/getUrl'; -import VnLv from 'src/components/ui/VnLv.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; const route = useRoute(); diff --git a/src/pages/Entry/Card/EntryDescriptor.vue b/src/pages/Entry/Card/EntryDescriptor.vue index c54ecc3f0..84d5ae5ab 100644 --- a/src/pages/Entry/Card/EntryDescriptor.vue +++ b/src/pages/Entry/Card/EntryDescriptor.vue @@ -4,7 +4,6 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import { toDate } from 'src/filters'; import { getUrl } from 'src/composables/getUrl'; diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue index 755e39454..7dc69eb4a 100644 --- a/src/pages/Entry/Card/EntrySummary.vue +++ b/src/pages/Entry/Card/EntrySummary.vue @@ -4,7 +4,6 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardSummary from 'components/ui/CardSummary.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; import { toDate, toCurrency } from 'src/filters'; diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index 4d9e180eb..f04e0eeb5 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -4,7 +4,6 @@ import { useRouter, onBeforeRouteUpdate } from 'vue-router'; import { useI18n } from 'vue-i18n'; import axios from 'axios'; import { toCurrency, toDate } from 'src/filters'; -import VnLv from 'src/components/ui/VnLv.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; import FetchData from 'src/components/FetchData.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; @@ -167,7 +166,10 @@ const createInvoiceInCorrection = async () => {