fix fetch
This commit is contained in:
parent
1888ce2f8b
commit
6824988322
9 changed files with 111 additions and 61 deletions
|
|
@ -16,6 +16,7 @@ export const useDataStore = defineStore("dataMain", () => {
|
|||
const { messageError, showLoader, hideLoader, findPosMasterNo, findOrgName } =
|
||||
mixin;
|
||||
// ref() คือการประกาศ state เหมือน vuex
|
||||
const profileId = ref<string>("");
|
||||
const formData = reactive<ProfileData>({
|
||||
profileId: "",
|
||||
rank: "",
|
||||
|
|
@ -101,6 +102,7 @@ export const useDataStore = defineStore("dataMain", () => {
|
|||
|
||||
async function getData(dataPerson: any) {
|
||||
const data = await dataPerson;
|
||||
profileId.value = data.profileId;
|
||||
isProbation.value = data.isProbation;
|
||||
formData.profileId = data.profileId;
|
||||
formData.rank = data.rank;
|
||||
|
|
@ -166,6 +168,7 @@ export const useDataStore = defineStore("dataMain", () => {
|
|||
officerLink,
|
||||
getProFileType,
|
||||
dataProfile,
|
||||
profileId,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue