From ce604a63330b6a7b30b5a6694b8fb15570bed014 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Sat, 24 May 2025 20:46:38 +0330 Subject: [PATCH 1/7] added slug as combobox values --- frontend/components/global/ComboBox.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/components/global/ComboBox.vue b/frontend/components/global/ComboBox.vue index 42a3718..14b7b9c 100644 --- a/frontend/components/global/ComboBox.vue +++ b/frontend/components/global/ComboBox.vue @@ -4,10 +4,12 @@ type OptionChildren = { id: number | string; name: string; + slug: string; }; type Option = { name: string; + slug: string; children: OptionChildren[]; }; @@ -39,7 +41,7 @@ watch( () => value.value, (newValue) => { if (!!newValue) { - emit("update:modelValue", newValue.id); + emit("update:modelValue", newValue.slug); } } ); From 55ab01892e667f2542153f97234a6b01d5f97637 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Sat, 24 May 2025 20:47:14 +0330 Subject: [PATCH 2/7] added title clickable --- frontend/components/global/ComboBox.vue | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/frontend/components/global/ComboBox.vue b/frontend/components/global/ComboBox.vue index 14b7b9c..19622a0 100644 --- a/frontend/components/global/ComboBox.vue +++ b/frontend/components/global/ComboBox.vue @@ -96,22 +96,29 @@ watch( /> - - {{ group.name }} - - + +
+ + {{ group.name }} + + +
+
Date: Sat, 24 May 2025 20:55:27 +0330 Subject: [PATCH 3/7] allCategories now has slugs --- frontend/components/products/FilterProducts.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/components/products/FilterProducts.vue b/frontend/components/products/FilterProducts.vue index ae280d7..92c41ae 100644 --- a/frontend/components/products/FilterProducts.vue +++ b/frontend/components/products/FilterProducts.vue @@ -63,10 +63,12 @@ const allCategories = computed(() => { return categories.value!.map((category) => { return { name: category.name, + slug: category.slug, children: category.subcategorys.map((sub) => { return { id: sub.id, name: sub.name, + slug: sub.slug, }; }), }; From 1bca0c772cf1a0cf68eed9f8b698d30581e33a84 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Sat, 24 May 2025 20:55:58 +0330 Subject: [PATCH 4/7] removed scroll to top on onmounted --- frontend/pages/index.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index dbf78bf..07435d7 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -18,12 +18,6 @@ if (response.isError) { statusMessage: `Landing error : ${response.error.message}`, }); } - -// lifecycle - -onMounted(() => { - window.scrollTo(0, 0); -});