2023-10-09 10:55:56 +07:00
|
|
|
import { defineStore } from "pinia";
|
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
|
|
import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
|
|
|
|
|
|
|
|
|
export const usePersonalDataStore = defineStore("personal-detail", () => {
|
2024-09-03 11:28:01 +07:00
|
|
|
const dataMain = ref<any>([]);
|
|
|
|
|
const loading = ref<boolean>(false);
|
|
|
|
|
function fecthDataInformation(data: Information) {
|
|
|
|
|
dataMain.value = data;
|
|
|
|
|
if (dataMain.value) {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
} else {
|
|
|
|
|
loading.value = false;
|
2023-10-09 10:55:56 +07:00
|
|
|
}
|
2024-09-03 11:28:01 +07:00
|
|
|
}
|
2023-10-09 10:55:56 +07:00
|
|
|
|
2024-09-03 11:28:01 +07:00
|
|
|
return {
|
|
|
|
|
fecthDataInformation,
|
|
|
|
|
dataMain,
|
|
|
|
|
loading,
|
|
|
|
|
};
|
|
|
|
|
});
|