From fee4f9add8fbc4afc6cdeac5fb77cd6fa59e8c31 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 5 Oct 2022 17:42:12 +0200 Subject: [PATCH] Fix address selector Signed-off-by: Thomas Citharel --- js/package.json | 6 +- js/src/App.vue | 6 +- js/src/apollo/utils.ts | 2 +- js/src/assets/oruga-tailwindcss.css | 2 +- .../Event/FullAddressAutoComplete.vue | 49 +- js/src/components/Home/SearchFields.vue | 3 +- js/src/components/Local/CloseContent.vue | 8 +- js/src/components/Local/CloseEvents.vue | 48 +- js/src/components/Local/CloseGroups.vue | 30 +- js/src/components/NavBar.vue | 12 +- js/src/composition/apollo/config.ts | 36 +- js/src/graphql/group.ts | 16 - js/src/graphql/home.ts | 50 - js/src/views/Admin/SettingsView.vue | 5 +- js/src/views/HomeView.vue | 21 +- js/src/views/Settings/PreferencesView.vue | 30 +- js/src/views/User/LoginView.vue | 3 +- js/yarn.lock | 1297 +++++++++-------- lib/graphql/resolvers/config.ex | 2 +- 19 files changed, 890 insertions(+), 736 deletions(-) diff --git a/js/package.json b/js/package.json index 2ab633f1..506af534 100644 --- a/js/package.json +++ b/js/package.json @@ -53,7 +53,7 @@ "@vue/apollo-composable": "^4.0.0-alpha.17", "@vue/compiler-sfc": "^3.2.37", "@vueuse/core": "^9.1.0", - "@vueuse/head": "^0.7.9", + "@vueuse/head": "^0.9.6", "@vueuse/router": "^9.0.2", "apollo-absinthe-upload-link": "^1.5.0", "autoprefixer": "^10", @@ -93,7 +93,7 @@ "vuedraggable": "^4.1.0" }, "devDependencies": { - "@histoire/plugin-vue": "^0.10.0", + "@histoire/plugin-vue": "^0.11.0", "@playwright/test": "^1.25.1", "@rushstack/eslint-patch": "^1.1.4", "@tailwindcss/forms": "^0.5.2", @@ -122,7 +122,7 @@ "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-vue": "^9.3.0", "flush-promises": "^1.0.2", - "histoire": "^0.10.4", + "histoire": "^0.11.0", "jsdom": "^20.0.0", "mock-apollo-client": "^1.1.0", "prettier": "^2.2.1", diff --git a/js/src/App.vue b/js/src/App.vue index b27d71ea..024eddd4 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -69,7 +69,11 @@ import { IConfig } from "@/types/config.model"; import { useRouter } from "vue-router"; import RouteName from "@/router/name"; -const { result: configResult } = useQuery<{ config: IConfig }>(CONFIG); +const { result: configResult } = useQuery<{ config: IConfig }>( + CONFIG, + undefined, + { fetchPolicy: "cache-only" } +); const config = computed(() => configResult.value?.config); diff --git a/js/src/apollo/utils.ts b/js/src/apollo/utils.ts index 4c994d91..b889fb88 100644 --- a/js/src/apollo/utils.ts +++ b/js/src/apollo/utils.ts @@ -74,7 +74,7 @@ export const typePolicies: TypePolicies = { merge: true, }, Address: { - keyFields: ["id"], + keyFields: ["id", "originId"], }, RootQueryType: { fields: { diff --git a/js/src/assets/oruga-tailwindcss.css b/js/src/assets/oruga-tailwindcss.css index 63dffe69..e18222bd 100644 --- a/js/src/assets/oruga-tailwindcss.css +++ b/js/src/assets/oruga-tailwindcss.css @@ -114,7 +114,7 @@ body { } .autocomplete-item { - @apply py-1.5 px-4; + @apply py-1.5 px-4 text-start; } /* Dropdown */ diff --git a/js/src/components/Event/FullAddressAutoComplete.vue b/js/src/components/Event/FullAddressAutoComplete.vue index 640e3ce6..f7f42ef2 100644 --- a/js/src/components/Event/FullAddressAutoComplete.vue +++ b/js/src/components/Event/FullAddressAutoComplete.vue @@ -44,10 +44,11 @@ class="!mt-0" >