fix: แก้กลับ

This commit is contained in:
setthawutttty 2025-07-30 17:46:23 +07:00
parent b751615f81
commit 417a6e5618
3 changed files with 2 additions and 5 deletions

View file

@ -19,7 +19,7 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
const work = ref<boolean>(false); const work = ref<boolean>(false);
const tabMain = ref<string>(""); const tabMain = ref<string>("");
const dataProfile = ref<DataProfile>({ const dataProfile = ref<DataProfile>({
profileId: "", profileId: null,
prefix: "", prefix: "",
rank: "", rank: "",
firstName: "", firstName: "",

View file

@ -478,7 +478,7 @@ async function fetchProfileEvaluator(id: string) {
/** ดึงข้อมูลโปรไฟล์ */ /** ดึงข้อมูลโปรไฟล์ */
async function getProfile() { async function getProfile() {
if (store.dataProfile.profileId) { if (!store.dataProfile.profileId) {
await http await http
.get(config.API.profilePosition()) .get(config.API.profilePosition())
.then(async (res) => { .then(async (res) => {

View file

@ -16,7 +16,6 @@ import {
} from "@/plugins/auth"; } from "@/plugins/auth";
import { useDataStore } from "@/stores/data"; import { useDataStore } from "@/stores/data";
import { useKpiDataStore } from "@/modules/08_KPI/store";
// landing page config url // landing page config url
const configParam = { const configParam = {
@ -28,7 +27,6 @@ const router = useRouter();
const $q = useQuasar(); const $q = useQuasar();
const dataStore = useDataStore(); const dataStore = useDataStore();
const dataStoreKpi = useKpiDataStore();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { const {
@ -67,7 +65,6 @@ async function checkUser() {
.then(async (res) => { .then(async (res) => {
const data = await res.data.result; const data = await res.data.result;
await dataStore.getData(data); await dataStore.getData(data);
dataStoreKpi.dataProfile = data;
await dataStore.getProFileType(); await dataStore.getProFileType();
if (data.avatarName) { if (data.avatarName) {
await getImg(data.profileId, data.avatarName); await getImg(data.profileId, data.avatarName);