From b05fb94547c49f96e239c7a8219ad01304addd62 Mon Sep 17 00:00:00 2001 From: Eloi Zalczer Date: Fri, 21 Jun 2024 15:58:03 +0200 Subject: [PATCH] Implemented search filters for random restaurant --- src/App.vue | 2 + src/components/RandomConfigurationPanel.vue | 98 +++++++++++++++++---- src/components/RestaurantsTable.vue | 2 +- src/main.ts | 4 +- src/models/restaurant.ts | 4 +- src/models/search.ts | 14 +++ src/stores/counter.ts | 12 --- src/stores/preferences.ts | 37 ++++++++ src/stores/restaurants.ts | 13 ++- src/utils/filters.ts | 70 ++++++++++++++- src/views/RandomView.vue | 29 +++++- src/views/SignUpView.vue | 32 ++----- 12 files changed, 244 insertions(+), 73 deletions(-) create mode 100644 src/models/search.ts delete mode 100644 src/stores/counter.ts create mode 100644 src/stores/preferences.ts diff --git a/src/App.vue b/src/App.vue index 589bdf9..eab5c52 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,8 +3,10 @@ import { RouterView } from "vue-router"; import "./style.css"; import NavigationBar from "./components/NavigationBar.vue"; import { useRestaurantsStore } from "./stores/restaurants"; +import { usePreferencesStore } from "./stores/preferences"; useRestaurantsStore().init(); +usePreferencesStore().init();