fixing convert time
This commit is contained in:
parent
393f65b7ca
commit
bd8563445e
1 changed files with 9 additions and 5 deletions
|
|
@ -20,7 +20,6 @@ const {
|
|||
hideLoader,
|
||||
messageError,
|
||||
convertDateToAPI,
|
||||
convertDatetimeToAPI,
|
||||
} = useCounterMixin()
|
||||
|
||||
/**
|
||||
|
|
@ -88,6 +87,13 @@ function onCkickSave() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ลงเวลาพิเศษบังคับให้แก้ทั้งเข้าและออก
|
||||
if (props.action === 'special') {
|
||||
checkboxIn.value = true
|
||||
checkboxOut.value = true
|
||||
}
|
||||
|
||||
if (checkboxIn.value === false && checkboxOut.value === false) {
|
||||
checkstatusBox.value = true
|
||||
}
|
||||
|
|
@ -98,7 +104,7 @@ function onCkickSave() {
|
|||
) {
|
||||
dialogConfirm($q, async () => {
|
||||
const data: FormTimeStemp = {
|
||||
checkDate: convertDatetimeToAPI(date.value as Date),
|
||||
checkDate: convertDateToAPI(date.value as Date),
|
||||
checkInEdit: checkboxIn.value,
|
||||
checkOutEdit: checkboxOut.value,
|
||||
description: reason.value,
|
||||
|
|
@ -155,9 +161,7 @@ onMounted(() => {
|
|||
if (dataByIdVal.value == null) {
|
||||
statusAction.value = true
|
||||
} else {
|
||||
date.value = convertDatetimeToAPI(
|
||||
new Date(dataByIdVal.value.checkInDateTime)
|
||||
)
|
||||
date.value = convertDateToAPI(new Date(dataByIdVal.value.checkInDateTime))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue