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])); + } +}; diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 2da3aa994..3b109e7e2 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -1,11 +1,8 @@ - es: + es: isOwn: Tiene propietario isAnyVolumeAllowed: Permite cualquier volumen Search agency: Buscar agencia diff --git a/src/pages/Route/Agency/Card/AgencySummary.vue b/src/pages/Route/Agency/Card/AgencySummary.vue index 71a6d1066..9d92beb14 100644 --- a/src/pages/Route/Agency/Card/AgencySummary.vue +++ b/src/pages/Route/Agency/Card/AgencySummary.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 'components/ui/VnLv.vue'; -import VnTitle from 'src/components/common/VnTitle.vue'; const $props = defineProps({ id: { type: Number, default: 0 } }); const { t } = useI18n(); diff --git a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue index 7103ea9ce..e597efb7e 100644 --- a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue +++ b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue @@ -9,8 +9,6 @@ import FetchData from 'src/components/FetchData.vue'; import FormModelPopup from 'src/components/FormModelPopup.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; -import VnRow from 'components/ui/VnRow.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; diff --git a/src/pages/Route/Card/RouteAutonomousFilter.vue b/src/pages/Route/Card/RouteAutonomousFilter.vue index 0b807b7b3..9dbd10cd1 100644 --- a/src/pages/Route/Card/RouteAutonomousFilter.vue +++ b/src/pages/Route/Card/RouteAutonomousFilter.vue @@ -3,7 +3,6 @@ import { ref } from 'vue'; import { useI18n } from 'vue-i18n'; import FetchData from 'components/FetchData.vue'; import VnFilterPanel from 'components/ui/VnFilterPanel.vue'; -import VnSelect from 'components/common/VnSelect.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; import VnInput from 'components/common/VnInput.vue'; diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue index 72bfed1da..08a3949b6 100644 --- a/src/pages/Route/Card/RouteFilter.vue +++ b/src/pages/Route/Card/RouteFilter.vue @@ -1,10 +1,8 @@ diff --git a/src/pages/Worker/WorkerFilter.vue b/src/pages/Worker/WorkerFilter.vue index dfb5659fe..24d4dc263 100644 --- a/src/pages/Worker/WorkerFilter.vue +++ b/src/pages/Worker/WorkerFilter.vue @@ -3,7 +3,7 @@ import { ref } from 'vue'; import { useI18n } from 'vue-i18n'; import FetchData from 'components/FetchData.vue'; -import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; + import VnInput from 'src/components/common/VnInput.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 48393a8c7..a6f1513dc 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import VnTable from 'src/components/VnTable/VnTable.vue'; import WorkerSummary from './Card/WorkerSummary.vue'; -import VnRow from 'src/components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnRadio from 'src/components/common/VnRadio.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; @@ -16,8 +15,6 @@ import FetchData from 'src/components/FetchData.vue'; import WorkerFilter from './WorkerFilter.vue'; import { useState } from 'src/composables/useState'; import axios from 'axios'; -import VnSelectWorker from 'src/components/common/VnSelectWorker.vue'; -import VnSection from 'src/components/common/VnSection.vue'; const { t } = useI18n(); const tableRef = ref(); const { viewSummary } = useSummaryDialog(); diff --git a/src/pages/Zone/Card/ZoneBasicData.vue b/src/pages/Zone/Card/ZoneBasicData.vue index c38da614c..0deb4393f 100644 --- a/src/pages/Zone/Card/ZoneBasicData.vue +++ b/src/pages/Zone/Card/ZoneBasicData.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { ref } from 'vue'; import FetchData from 'components/FetchData.vue'; import FormModel from 'src/components/FormModel.vue'; -import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import { QCheckbox } from 'quasar'; import VnInputTime from 'src/components/common/VnInputTime.vue'; diff --git a/src/pages/Zone/Card/ZoneCreateWarehouse.vue b/src/pages/Zone/Card/ZoneCreateWarehouse.vue index 88f6a7701..e3f728786 100644 --- a/src/pages/Zone/Card/ZoneCreateWarehouse.vue +++ b/src/pages/Zone/Card/ZoneCreateWarehouse.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import VnSelect from 'src/components/common/VnSelect.vue'; import FetchData from 'components/FetchData.vue'; -import VnRow from 'components/ui/VnRow.vue'; import FormPopup from 'components/FormPopup.vue'; const emit = defineEmits(['onSubmitCreateWarehouse']); diff --git a/src/pages/Zone/Card/ZoneDescriptor.vue b/src/pages/Zone/Card/ZoneDescriptor.vue index f991818fb..2a2a47078 100644 --- a/src/pages/Zone/Card/ZoneDescriptor.vue +++ b/src/pages/Zone/Card/ZoneDescriptor.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 { toTimeFormat } from 'src/filters/date'; import { toCurrency } from 'filters/index'; diff --git a/src/pages/Zone/Card/ZoneEventExclusionForm.vue b/src/pages/Zone/Card/ZoneEventExclusionForm.vue index 4b6aa52bd..5ed87ae35 100644 --- a/src/pages/Zone/Card/ZoneEventExclusionForm.vue +++ b/src/pages/Zone/Card/ZoneEventExclusionForm.vue @@ -3,7 +3,6 @@ import { ref, computed, onMounted, reactive } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; -import VnRow from 'components/ui/VnRow.vue'; import FormPopup from 'components/FormPopup.vue'; import ZoneLocationsTree from './ZoneLocationsTree.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue'; diff --git a/src/pages/Zone/Card/ZoneEventInclusionForm.vue b/src/pages/Zone/Card/ZoneEventInclusionForm.vue index 805d03b27..ec9fe7997 100644 --- a/src/pages/Zone/Card/ZoneEventInclusionForm.vue +++ b/src/pages/Zone/Card/ZoneEventInclusionForm.vue @@ -3,7 +3,6 @@ import { ref, computed, onMounted } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; -import VnRow from 'components/ui/VnRow.vue'; import FormPopup from 'components/FormPopup.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue'; import VnWeekdayPicker from 'src/components/common/VnWeekdayPicker.vue'; diff --git a/src/pages/Zone/Card/ZoneSummary.vue b/src/pages/Zone/Card/ZoneSummary.vue index 124802633..65563174a 100644 --- a/src/pages/Zone/Card/ZoneSummary.vue +++ b/src/pages/Zone/Card/ZoneSummary.vue @@ -2,10 +2,7 @@ import { ref, onMounted, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; - -import VnLv from 'src/components/ui/VnLv.vue'; import CardSummary from 'components/ui/CardSummary.vue'; -import VnTitle from 'src/components/common/VnTitle.vue'; import { getUrl } from 'src/composables/getUrl'; import { toCurrency } from 'filters/index'; diff --git a/src/pages/Zone/ZoneCreate.vue b/src/pages/Zone/ZoneCreate.vue index 6db83c51d..69d2d02aa 100644 --- a/src/pages/Zone/ZoneCreate.vue +++ b/src/pages/Zone/ZoneCreate.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import FormModel from 'components/FormModel.vue'; -import VnRow from 'components/ui/VnRow.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import FetchData from 'components/FetchData.vue'; import VnInput from 'src/components/common/VnInput.vue'; diff --git a/src/pages/Zone/ZoneFilterPanel.vue b/src/pages/Zone/ZoneFilterPanel.vue index 3a35527ab..c8c8d98bc 100644 --- a/src/pages/Zone/ZoneFilterPanel.vue +++ b/src/pages/Zone/ZoneFilterPanel.vue @@ -3,8 +3,6 @@ import { ref } from 'vue'; import { useI18n } from 'vue-i18n'; import VnInput from 'components/common/VnInput.vue'; import FetchData from 'components/FetchData.vue'; -import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; -import VnSelect from 'components/common/VnSelect.vue'; const { t } = useI18n(); const props = defineProps({