fix fetchprofilePosition
This commit is contained in:
parent
ae059a1d5f
commit
efcfda8b0e
7 changed files with 49 additions and 475 deletions
|
|
@ -6,7 +6,7 @@ import config from "@/app.config";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry";
|
||||
import { useCounterMixin } from "./mixin";
|
||||
import type { ProfileData } from "@/interface/Main";
|
||||
import type { ProfileData, DataProfile } from "@/interface/Main";
|
||||
|
||||
export const useDataStore = defineStore("dataMain", () => {
|
||||
const dataProfile = ref<any>();
|
||||
|
|
@ -17,6 +17,7 @@ export const useDataStore = defineStore("dataMain", () => {
|
|||
mixin;
|
||||
// ref() คือการประกาศ state เหมือน vuex
|
||||
const profileId = ref<string>("");
|
||||
const dataprofilePosition = ref<DataProfile | undefined>(undefined);
|
||||
const formData = reactive<ProfileData>({
|
||||
profileId: "",
|
||||
rank: "",
|
||||
|
|
@ -102,6 +103,7 @@ export const useDataStore = defineStore("dataMain", () => {
|
|||
|
||||
async function getData(dataPerson: any) {
|
||||
const data = await dataPerson;
|
||||
dataprofilePosition.value = data;
|
||||
profileId.value = data.profileId;
|
||||
isProbation.value = data.isProbation;
|
||||
formData.profileId = data.profileId;
|
||||
|
|
@ -169,6 +171,7 @@ export const useDataStore = defineStore("dataMain", () => {
|
|||
getProFileType,
|
||||
dataProfile,
|
||||
profileId,
|
||||
dataprofilePosition,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue