From 417a6e5618fa0ffcca4c8a5f835cc17f12bf5a8c Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 30 Jul 2025 17:46:23 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=81?= =?UTF-8?q?=E0=B8=A5=E0=B8=B1=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/08_KPI/store.ts | 2 +- src/modules/08_KPI/views/form.vue | 2 +- src/views/MainLayout.vue | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/08_KPI/store.ts b/src/modules/08_KPI/store.ts index 06fc5a7..f9fc0a0 100644 --- a/src/modules/08_KPI/store.ts +++ b/src/modules/08_KPI/store.ts @@ -19,7 +19,7 @@ export const useKpiDataStore = defineStore("KPIDate", () => { const work = ref(false); const tabMain = ref(""); const dataProfile = ref({ - profileId: "", + profileId: null, prefix: "", rank: "", firstName: "", diff --git a/src/modules/08_KPI/views/form.vue b/src/modules/08_KPI/views/form.vue index b29ab9c..cb8cd2a 100644 --- a/src/modules/08_KPI/views/form.vue +++ b/src/modules/08_KPI/views/form.vue @@ -478,7 +478,7 @@ async function fetchProfileEvaluator(id: string) { /** ดึงข้อมูลโปรไฟล์ */ async function getProfile() { - if (store.dataProfile.profileId) { + if (!store.dataProfile.profileId) { await http .get(config.API.profilePosition()) .then(async (res) => { diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index a5aa38f..534beb3 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -16,7 +16,6 @@ import { } from "@/plugins/auth"; import { useDataStore } from "@/stores/data"; -import { useKpiDataStore } from "@/modules/08_KPI/store"; // landing page config url const configParam = { @@ -28,7 +27,6 @@ const router = useRouter(); const $q = useQuasar(); const dataStore = useDataStore(); -const dataStoreKpi = useKpiDataStore(); const mixin = useCounterMixin(); const { @@ -67,7 +65,6 @@ async function checkUser() { .then(async (res) => { const data = await res.data.result; await dataStore.getData(data); - dataStoreKpi.dataProfile = data; await dataStore.getProFileType(); if (data.avatarName) { await getImg(data.profileId, data.avatarName);