fixing rank registry & change type any to interface
This commit is contained in:
parent
32b83298cd
commit
516a405df4
4 changed files with 68 additions and 11 deletions
|
|
@ -6,6 +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";
|
||||
|
||||
export const useDataStore = defineStore("data", () => {
|
||||
const storeRegistry = useRegistryInFormationStore();
|
||||
|
|
@ -13,7 +14,8 @@ export const useDataStore = defineStore("data", () => {
|
|||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
// ref() คือการประกาศ state เหมือน vuex
|
||||
const formData = reactive<any>({
|
||||
const formData = reactive<ProfileData>({
|
||||
rank: "",
|
||||
prefix: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
|
|
@ -92,6 +94,7 @@ export const useDataStore = defineStore("data", () => {
|
|||
const data = await dataPerson;
|
||||
isProbation.value = data.isProbation;
|
||||
|
||||
formData.rank = data.rank;
|
||||
formData.prefix = data.prefix;
|
||||
formData.firstName = data.firstName;
|
||||
formData.lastName = data.lastName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue