diff --git a/src/modules/04_registry/components/profileType.ts b/src/modules/04_registry/components/profileType.ts index a3e94f836..4126189c2 100644 --- a/src/modules/04_registry/components/profileType.ts +++ b/src/modules/04_registry/components/profileType.ts @@ -93,6 +93,15 @@ interface DataOption { zipCode?: string; } +interface DataOptioninfo { + id: string; + name: string; +} +interface docList { + pathName: string; + fileName: string; +} + interface zipCodeOption { id: string; name: string; @@ -207,4 +216,6 @@ export type { Goverment, DataOption, zipCodeOption, + DataOptioninfo, + docList }; diff --git a/src/modules/05_placement/components/AppointMent/Detail.vue b/src/modules/05_placement/components/AppointMent/Detail.vue index 90e93056e..ca9dc62b9 100644 --- a/src/modules/05_placement/components/AppointMent/Detail.vue +++ b/src/modules/05_placement/components/AppointMent/Detail.vue @@ -5,6 +5,7 @@ import { useRoute, useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import CurrencyInput from "@/components/CurruncyInput.vue"; import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive"; +import type { appointmentData,ResponseData } from "@/modules/05_placement/interface/response/AppointMent"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -14,7 +15,12 @@ const route = useRoute(); const router = useRouter(); const mixin = useCounterMixin(); -const appointment = ref([]); +const appointment = ref({ +citizenId:"", +prefixId:"", +firstname:"", +lastname:"" +}); const myform = ref(); const edit = ref(false); const profileId = ref(""); @@ -52,7 +58,7 @@ const fecthappointmentByid = async () => { showLoader(); await http .get(config.API.appointmentByid(paramsId.toString())) - .then((res: any) => { + .then((res: ResponseData) => { const data = res.data.result; appointment.value = data; profileId.value = data.profileId; diff --git a/src/modules/05_placement/components/AppointMent/Dialogbody.vue b/src/modules/05_placement/components/AppointMent/Dialogbody.vue index 8be6c90e6..8ffaa5f6e 100644 --- a/src/modules/05_placement/components/AppointMent/Dialogbody.vue +++ b/src/modules/05_placement/components/AppointMent/Dialogbody.vue @@ -3,6 +3,7 @@ import { ref, computed,watchEffect } from "vue"; import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import type { QTableProps } from "quasar"; +import type { UserData } from "@/modules/05_placement/interface/response/AppointMent"; import http from "@/plugins/http"; @@ -12,7 +13,7 @@ const { showLoader, success, messageError, dialogConfirm,hideLoader } = mixin; const $q = useQuasar(); import DialogHeader from "@/modules/05_placement/components/AppointMent/DialogHeader.vue"; -const selected = ref([]); +const selected = ref([]); const checkSelected = computed(() => { if (selected.value.length === 0 || props.type === "") { return true; @@ -98,7 +99,7 @@ const updateInput = (value: any) => { emit("update:filterKeyword2", value); }; -const updateInputType = (value: any) => { +const updateInputType = (value: string) => { emit("update:type", value); }; //รีเซ็ตค่าในช่องค้นหา @@ -115,7 +116,7 @@ const clickAddlist = () => { const createdAppoint = async () => { let pId: string[] = []; let Type = props.type as string - selected.value.forEach((e: any) => { + selected.value.forEach((e: UserData) => { pId.push(e.personalId); }); let data = { @@ -124,10 +125,10 @@ const createdAppoint = async () => { showLoader(); await http .put(config.API.apppointmentReport(Type), data) - .then((res: any) => { + .then((res) => { success($q, "บันทึกสำเร็จ"); }) - .catch((e: any) => { + .catch((e) => { messageError($q, e); }) .finally(() => { @@ -145,7 +146,7 @@ watchEffect(() => { });