fix bug send profileId to registry
This commit is contained in:
parent
f829dc2098
commit
a646ad3d6d
19 changed files with 205 additions and 1052 deletions
|
|
@ -19,7 +19,7 @@ const route = useRoute();
|
|||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const edit = ref<boolean>(false);
|
||||
const personId = route.params.id as string;
|
||||
const dataId = route.params.id as string;
|
||||
const {
|
||||
date2Thai,
|
||||
dialogMessage,
|
||||
|
|
@ -36,7 +36,7 @@ const name = ref<string>("นายสมคิด ยอดใจ");
|
|||
const level = ref<string>("ชำนาญการพิเศษ");
|
||||
const institution = ref<string>("ฝ่ายบริหารงานทั่วไป");
|
||||
const fullname = ref<string>("");
|
||||
const id = ref<string>("");
|
||||
const profileId = ref<string>("");
|
||||
const prefix = ref<string>("");
|
||||
const prefixId = ref<string>("");
|
||||
const firstname = ref<string>("");
|
||||
|
|
@ -114,9 +114,10 @@ const isActive = ref<string>("");
|
|||
const getData = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.relocationDetail(personId))
|
||||
.get(config.API.relocationDetail(dataId))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
profileId.value = data.profileId;
|
||||
citizenId.value = data.citizenId;
|
||||
fullname.value = `${data.prefix}${data.firstname} ${data.lastname}`;
|
||||
prefixId.value = data.prefixId;
|
||||
|
|
@ -205,7 +206,7 @@ const saveData = async () => {
|
|||
};
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.relocationMainEdit(personId.toString()), body)
|
||||
.put(config.API.relocationMainEdit(dataId), body)
|
||||
.then((res: any) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(data);
|
||||
|
|
@ -221,35 +222,6 @@ const saveData = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
// const confirmMessage = async () => {
|
||||
// dialogMessage(
|
||||
// $q,
|
||||
// "ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
||||
// "ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที",
|
||||
// "mdi-help-circle-outline",
|
||||
// "ยืนยัน",
|
||||
// "primary",
|
||||
// () => sendConfirm(),
|
||||
// undefined
|
||||
// );
|
||||
// };
|
||||
// const sendConfirm = async () => {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.transferConfirmId(personId.toString()))
|
||||
// .then((res: any) => {
|
||||
// // const data = res.data.result;
|
||||
// // console.log(data);
|
||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// await getData();
|
||||
// hideLoader();
|
||||
// });
|
||||
// };
|
||||
onMounted(async () => {
|
||||
await getData();
|
||||
});
|
||||
|
|
@ -279,7 +251,7 @@ onMounted(async () => {
|
|||
icon-right="mdi-open-in-new"
|
||||
class="q-px-sm"
|
||||
label="ดูข้อมูลทะเบียนประวัติ"
|
||||
@click="router.push(`/registry/${personId}`)"
|
||||
@click="router.push(`/registry/${profileId}`)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue