From 46de2412dfd401401a6e18d1189530d2c683a8c3 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Tue, 29 Apr 2025 11:22:10 +0700 Subject: [PATCH 01/11] refactor: handle role --- src/pages/04_product-service/MainPage.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index d70b6b6a..88d6746c 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -2506,6 +2506,7 @@ watch( /> Date: Tue, 29 Apr 2025 13:07:55 +0700 Subject: [PATCH 02/11] feat: auto go into first entry if only one --- src/pages/00_manual/MainPage.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/pages/00_manual/MainPage.vue b/src/pages/00_manual/MainPage.vue index a0b85ef8..33a19ebe 100644 --- a/src/pages/00_manual/MainPage.vue +++ b/src/pages/00_manual/MainPage.vue @@ -10,10 +10,11 @@ import { onMounted, watch } from 'vue'; import { useManualStore } from 'src/stores/manual'; import { useNavigator } from 'src/stores/navigator'; import { Icon } from '@iconify/vue/dist/iconify.js'; -import { useRoute } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; // NOTE: Variable const route = useRoute(); +const router = useRouter(); const manualStore = useManualStore(); const navigatorStore = useNavigator(); const { dataManual, dataTroubleshooting } = storeToRefs(manualStore); @@ -33,6 +34,16 @@ watch( if (route.name === 'Troubleshooting') { const res = await manualStore.getTroubleshooting(); dataTroubleshooting.value = res ? res : []; + if ( + res.length && + res.length === 1 && + res[0].page && + res[0].page.length === 1 + ) { + router.replace( + `/troubleshooting/${res[0].category}/${res[0].page[0].name}`, + ); + } } }, { immediate: true }, From c4c4b76973aa1dd6fb32486c7531732e09f7f522 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Wed, 30 Apr 2025 10:23:40 +0700 Subject: [PATCH 03/11] refactor: adjust button sizes and padding for improved layout consistency --- src/pages/00_notification/MainPage.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/00_notification/MainPage.vue b/src/pages/00_notification/MainPage.vue index a3506813..a2a37e65 100644 --- a/src/pages/00_notification/MainPage.vue +++ b/src/pages/00_notification/MainPage.vue @@ -94,21 +94,21 @@ onMounted(async () => {