ปรับ แสดงรายละเอียดสถานที่ลเวลาเข้า และออก
This commit is contained in:
parent
b4998e73b6
commit
d4fafe3c3f
2 changed files with 31 additions and 0 deletions
|
|
@ -58,6 +58,10 @@ const formData = reactive<FormDetail>({
|
||||||
checkOutStatus: "",
|
checkOutStatus: "",
|
||||||
fullName: "",
|
fullName: "",
|
||||||
checkOutDescription: "",
|
checkOutDescription: "",
|
||||||
|
isLocationCheckIn: false,
|
||||||
|
checkInLocationName: "",
|
||||||
|
isLocationCheckOut: false,
|
||||||
|
checkOutLocationName: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -98,6 +102,11 @@ async function fetchDetailByid(id: string, type: string) {
|
||||||
formData.checkOutStatus = data.checkOutStatus
|
formData.checkOutStatus = data.checkOutStatus
|
||||||
? convertSatatus(data.checkOutStatus)
|
? convertSatatus(data.checkOutStatus)
|
||||||
: "-";
|
: "-";
|
||||||
|
|
||||||
|
formData.isLocationCheckIn = data.isLocationCheckIn;
|
||||||
|
formData.checkInLocationName = data.checkInLocationName;
|
||||||
|
formData.isLocationCheckOut = data.isLocationCheckOut;
|
||||||
|
formData.checkOutLocationName = data.checkOutLocationName;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -198,6 +207,15 @@ watch(
|
||||||
<div class="col text-grey-8">เวลาเข้างาน</div>
|
<div class="col text-grey-8">เวลาเข้างาน</div>
|
||||||
<div class="col">{{ formData.checkInTime }}</div>
|
<div class="col">{{ formData.checkInTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col text-grey-8">สถานที่ทำงาน</div>
|
||||||
|
<div class="col" v-if="formData.isLocationCheckIn">
|
||||||
|
ในสถานที่
|
||||||
|
</div>
|
||||||
|
<div class="col" v-else>
|
||||||
|
นอกสถานที่ ({{ formData.checkInLocationName }})
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-8">พิกัด</div>
|
<div class="col text-grey-8">พิกัด</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
@ -244,6 +262,15 @@ watch(
|
||||||
<div class="col text-grey-8">เวลาออกงาน</div>
|
<div class="col text-grey-8">เวลาออกงาน</div>
|
||||||
<div class="col">{{ formData.checkOutTime }}</div>
|
<div class="col">{{ formData.checkOutTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col text-grey-8">สถานที่ทำงาน</div>
|
||||||
|
<div class="col" v-if="formData.isLocationCheckOut">
|
||||||
|
ในสถานที่
|
||||||
|
</div>
|
||||||
|
<div class="col" v-else>
|
||||||
|
นอกสถานที่ ({{ formData.checkOutLocationName }})
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-8">พิกัด</div>
|
<div class="col text-grey-8">พิกัด</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
|
||||||
|
|
@ -77,5 +77,9 @@ interface FormDetail {
|
||||||
checkOutLon: number | null; //พิกัด Lon ออกงาน
|
checkOutLon: number | null; //พิกัด Lon ออกงาน
|
||||||
checkOutImg: string; //รูปถ่ายออกงาน
|
checkOutImg: string; //รูปถ่ายออกงาน
|
||||||
checkOutDescription: string; //หมายเหตุออกงาน
|
checkOutDescription: string; //หมายเหตุออกงาน
|
||||||
|
isLocationCheckIn: boolean;
|
||||||
|
isLocationCheckOut: boolean;
|
||||||
|
checkInLocationName: string;
|
||||||
|
checkOutLocationName: string;
|
||||||
}
|
}
|
||||||
export type { TableRows, DataResLog, DataResTime, TableRowsTime, FormDetail };
|
export type { TableRows, DataResLog, DataResTime, TableRowsTime, FormDetail };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue