From c87f0a2cb985784beaf932b2bc8cc86b2341e46e Mon Sep 17 00:00:00 2001 From: geoffreyaldebert Date: Tue, 6 Aug 2024 20:50:23 +0200 Subject: [PATCH 1/2] migrate: bouquets to main components, views, utils and services --- .../bouquets}/BouquetCard.vue | 3 +- .../BouquetDatasetAccordionTitle.vue | 3 +- .../bouquets}/BouquetDatasetCard.vue | 0 .../bouquets}/BouquetDatasetList.vue | 8 +- .../bouquets/BouquetDatasetListExport.vue | 39 +++++ .../bouquets}/BouquetList.vue | 3 +- .../bouquets}/BouquetSearch.vue | 3 +- .../datasets/DatasetAddToBouquetModal.vue | 3 +- .../forms/SelectSpatialCoverage.vue | 0 .../components/forms/bouquet/BouquetForm.vue | 2 +- .../forms/bouquet/BouquetOwnerForm.vue | 0 .../forms/dataset/DatasetCardForSelect.vue | 0 .../forms/dataset/DatasetEditModal.vue | 0 .../forms/dataset/DatasetPropertiesFields.vue | 0 .../dataset/DatasetPropertiesTextFields.vue | 0 .../forms/dataset/SelectDataset.vue | 0 src/custom/defis/routes.ts | 8 +- .../components/BouquetDatasetListExport.vue | 2 +- src/custom/ecospheres/routes.ts | 49 ------ src/router/index.ts | 47 +++++- .../ecospheres => }/services/export.ts | 0 src/{custom/ecospheres => }/utils/bouquet.ts | 0 .../views/bouquets/BouquetDetailView.vue | 15 +- .../views/bouquets/BouquetFormView.vue | 7 +- .../views/bouquets/BouquetsListView.vue | 4 +- src/views/datasets/DatasetDetailView.vue | 2 +- src/views/topics/TopicsListView.vue | 142 ------------------ 27 files changed, 106 insertions(+), 234 deletions(-) rename src/{custom/ecospheres/components => components/bouquets}/BouquetCard.vue (98%) rename src/{custom/ecospheres/components => components/bouquets}/BouquetDatasetAccordionTitle.vue (95%) rename src/{custom/ecospheres/components => components/bouquets}/BouquetDatasetCard.vue (100%) rename src/{custom/ecospheres/components => components/bouquets}/BouquetDatasetList.vue (98%) create mode 100644 src/components/bouquets/BouquetDatasetListExport.vue rename src/{custom/ecospheres/components => components/bouquets}/BouquetList.vue (98%) rename src/{custom/ecospheres/components => components/bouquets}/BouquetSearch.vue (98%) rename src/{custom/ecospheres => }/components/datasets/DatasetAddToBouquetModal.vue (97%) rename src/{custom/ecospheres => }/components/forms/SelectSpatialCoverage.vue (100%) rename src/{custom/ecospheres => }/components/forms/bouquet/BouquetForm.vue (98%) rename src/{custom/ecospheres => }/components/forms/bouquet/BouquetOwnerForm.vue (100%) rename src/{custom/ecospheres => }/components/forms/dataset/DatasetCardForSelect.vue (100%) rename src/{custom/ecospheres => }/components/forms/dataset/DatasetEditModal.vue (100%) rename src/{custom/ecospheres => }/components/forms/dataset/DatasetPropertiesFields.vue (100%) rename src/{custom/ecospheres => }/components/forms/dataset/DatasetPropertiesTextFields.vue (100%) rename src/{custom/ecospheres => }/components/forms/dataset/SelectDataset.vue (100%) rename src/{custom/ecospheres => }/services/export.ts (100%) rename src/{custom/ecospheres => }/utils/bouquet.ts (100%) rename src/{custom/ecospheres => }/views/bouquets/BouquetDetailView.vue (97%) rename src/{custom/ecospheres => }/views/bouquets/BouquetFormView.vue (96%) rename src/{custom/ecospheres => }/views/bouquets/BouquetsListView.vue (96%) delete mode 100644 src/views/topics/TopicsListView.vue diff --git a/src/custom/ecospheres/components/BouquetCard.vue b/src/components/bouquets/BouquetCard.vue similarity index 98% rename from src/custom/ecospheres/components/BouquetCard.vue rename to src/components/bouquets/BouquetCard.vue index 99a77da18..e899c6edc 100644 --- a/src/custom/ecospheres/components/BouquetCard.vue +++ b/src/components/bouquets/BouquetCard.vue @@ -12,11 +12,10 @@ import { NoOptionSelected } from '@/model/theme' import type { Topic } from '@/model/topic' import { stripFromMarkdown } from '@/utils' import { getOwnerAvatar } from '@/utils/avatar' +import { useExtras } from '@/utils/bouquet' import { useSpatialCoverage } from '@/utils/spatial' import { getThemeColor, getThemeTextColor } from '@/utils/theme' -import { useExtras } from '../utils/bouquet' - const props = defineProps({ bouquet: { type: Object as () => Topic, diff --git a/src/custom/ecospheres/components/BouquetDatasetAccordionTitle.vue b/src/components/bouquets/BouquetDatasetAccordionTitle.vue similarity index 95% rename from src/custom/ecospheres/components/BouquetDatasetAccordionTitle.vue rename to src/components/bouquets/BouquetDatasetAccordionTitle.vue index 5b638daf0..e8f6537e2 100644 --- a/src/custom/ecospheres/components/BouquetDatasetAccordionTitle.vue +++ b/src/components/bouquets/BouquetDatasetAccordionTitle.vue @@ -1,7 +1,6 @@ + + diff --git a/src/custom/ecospheres/components/BouquetList.vue b/src/components/bouquets/BouquetList.vue similarity index 98% rename from src/custom/ecospheres/components/BouquetList.vue rename to src/components/bouquets/BouquetList.vue index 76ec5e930..42d352629 100644 --- a/src/custom/ecospheres/components/BouquetList.vue +++ b/src/components/bouquets/BouquetList.vue @@ -4,12 +4,11 @@ import { computed, onMounted } from 'vue' import { useLoading } from 'vue-loading-overlay' import { useRouter, useRoute, type LocationQueryRaw } from 'vue-router' +import BouquetCard from '@/components/bouquets/BouquetCard.vue' import { NoOptionSelected } from '@/model/theme' import type { Topic } from '@/model/topic' import { useTopicStore } from '@/store/TopicStore' -import BouquetCard from '../components/BouquetCard.vue' - const router = useRouter() const route = useRoute() const topicStore = useTopicStore() diff --git a/src/custom/ecospheres/components/BouquetSearch.vue b/src/components/bouquets/BouquetSearch.vue similarity index 98% rename from src/custom/ecospheres/components/BouquetSearch.vue rename to src/components/bouquets/BouquetSearch.vue index 67e305071..8feb0df96 100644 --- a/src/custom/ecospheres/components/BouquetSearch.vue +++ b/src/components/bouquets/BouquetSearch.vue @@ -2,14 +2,13 @@ import { ref, watchEffect, toRef, type Ref, type PropType } from 'vue' import { useRouter, useRoute, type LocationQueryRaw } from 'vue-router' +import SelectSpatialCoverage from '@/components/forms/SelectSpatialCoverage.vue' import type { SpatialCoverage } from '@/model/spatial' import { NoOptionSelected } from '@/model/theme' import SpatialAPI from '@/services/api/SpatialAPI' import { useUserStore } from '@/store/UserStore' import { useThemeOptions } from '@/utils/theme' -import SelectSpatialCoverage from './forms/SelectSpatialCoverage.vue' - const spatialAPI = new SpatialAPI() const props = defineProps({ diff --git a/src/custom/ecospheres/components/datasets/DatasetAddToBouquetModal.vue b/src/components/datasets/DatasetAddToBouquetModal.vue similarity index 97% rename from src/custom/ecospheres/components/datasets/DatasetAddToBouquetModal.vue rename to src/components/datasets/DatasetAddToBouquetModal.vue index 278b7f0a7..5fe5980c6 100644 --- a/src/custom/ecospheres/components/datasets/DatasetAddToBouquetModal.vue +++ b/src/components/datasets/DatasetAddToBouquetModal.vue @@ -5,11 +5,10 @@ import { toast } from 'vue3-toastify' import { useLoading } from 'vue-loading-overlay' import Tooltip from '@/components/TooltipWrapper.vue' +import DatasetPropertiesTextFields from '@/components/forms/dataset/DatasetPropertiesTextFields.vue' import { Availability, type DatasetProperties, type Topic } from '@/model/topic' import { useTopicStore } from '@/store/TopicStore' -import DatasetPropertiesTextFields from '../forms/dataset/DatasetPropertiesTextFields.vue' - const props = defineProps({ show: { type: Boolean, diff --git a/src/custom/ecospheres/components/forms/SelectSpatialCoverage.vue b/src/components/forms/SelectSpatialCoverage.vue similarity index 100% rename from src/custom/ecospheres/components/forms/SelectSpatialCoverage.vue rename to src/components/forms/SelectSpatialCoverage.vue diff --git a/src/custom/ecospheres/components/forms/bouquet/BouquetForm.vue b/src/components/forms/bouquet/BouquetForm.vue similarity index 98% rename from src/custom/ecospheres/components/forms/bouquet/BouquetForm.vue rename to src/components/forms/bouquet/BouquetForm.vue index 9dbe120ed..1e159efb1 100644 --- a/src/custom/ecospheres/components/forms/bouquet/BouquetForm.vue +++ b/src/components/forms/bouquet/BouquetForm.vue @@ -1,10 +1,10 @@ - From 6ac1a36fad48297216c971666382fe359e99b312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bult=C3=A9?= Date: Mon, 12 Aug 2024 17:32:43 +0200 Subject: [PATCH 2/2] delete unused BouquetDatasetListExport --- .../components/BouquetDatasetListExport.vue | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 src/custom/ecospheres/components/BouquetDatasetListExport.vue diff --git a/src/custom/ecospheres/components/BouquetDatasetListExport.vue b/src/custom/ecospheres/components/BouquetDatasetListExport.vue deleted file mode 100644 index f0566906a..000000000 --- a/src/custom/ecospheres/components/BouquetDatasetListExport.vue +++ /dev/null @@ -1,40 +0,0 @@ - - -