fix bug send profileId to registry
This commit is contained in:
parent
f829dc2098
commit
a646ad3d6d
19 changed files with 205 additions and 1052 deletions
|
|
@ -25,7 +25,7 @@
|
|||
icon-right="mdi-open-in-new"
|
||||
class="q-px-sm"
|
||||
label="ดูข้อมูลทะเบียนประวัติ"
|
||||
@click="router.push(`/registry/${personId}`)"
|
||||
@click="router.push(`/registry/${responseData.profileId}`)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
@ -380,7 +380,7 @@ const route = useRoute();
|
|||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const personId = route.params.id;
|
||||
const dataId = route.params.id;
|
||||
const {
|
||||
date2Thai,
|
||||
dialogMessage,
|
||||
|
|
@ -405,6 +405,7 @@ const date = ref<Date | null>(null);
|
|||
const reason = ref<string>("");
|
||||
|
||||
const responseData = ref<ResponseDataDetail>({
|
||||
profileId: "",
|
||||
avataPath: "",
|
||||
createdAt: new Date(),
|
||||
date: new Date(),
|
||||
|
|
@ -462,7 +463,7 @@ onMounted(async () => {
|
|||
const getData = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.transferId(personId.toString()))
|
||||
.get(config.API.transferId(dataId.toString()))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
|
|
@ -476,6 +477,7 @@ const getData = async () => {
|
|||
});
|
||||
}
|
||||
rows.value = list;
|
||||
responseData.value.profileId = data.profileId;
|
||||
responseData.value.createdAt = data.createdAt;
|
||||
responseData.value.date =
|
||||
data.date !== null ? new Date(data.date) : new Date();
|
||||
|
|
@ -523,7 +525,7 @@ const confirmMessage = async () => {
|
|||
const sendConfirm = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.transferConfirmId(personId.toString()))
|
||||
.get(config.API.transferConfirmId(dataId.toString()))
|
||||
.then((res: any) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(data);
|
||||
|
|
@ -566,7 +568,7 @@ const saveData = async () => {
|
|||
};
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.transferId(personId.toString()), body)
|
||||
.put(config.API.transferId(dataId.toString()), body)
|
||||
.then((res: any) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue