| Name |
+ Role |
Check-In
|
@@ -81,6 +82,7 @@ const AttendanceLog = ({ attendance, handleModalData, projectId }) => {
+ { attendance.jobRoleName} |
{convertShortTime(attendance.checkInTime)} |
{attendance.checkOutTime ? convertShortTime(attendance.checkOutTime) : '--'} |
diff --git a/src/components/Activities/CheckCheckOutForm.jsx b/src/components/Activities/CheckCheckOutForm.jsx
index 1d13bf7b..b947f5cb 100644
--- a/src/components/Activities/CheckCheckOutForm.jsx
+++ b/src/components/Activities/CheckCheckOutForm.jsx
@@ -35,18 +35,18 @@ const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
const onSubmit = ( data ) =>
{
console.log(data)
- let record = {...data, date: new Date().toLocaleDateString(),latitude:coords.latitude,longitude:coords.longitude,employeeId:modeldata.employeeId,action:modeldata.action}
+ let record = {...data, date: new Date().toLocaleDateString(),latitude:coords.latitude,longitude:coords.longitude,employeeId:modeldata.employeeId,action:modeldata.action,id:modeldata?.id || null}
if(modeldata.forWhichTab === 1){
handleSubmitForm(record)
} else
{
- console.log("is Date" ,checkIfCurrentDate(modeldata?.currentDate))
+
if ( modeldata?.currentDate && checkIfCurrentDate(modeldata?.currentDate) )
{
handleSubmitForm(record)
} else
{
- let formData = {...data, date: new Date().toLocaleDateString(),latitude:coords.latitude,longitude:coords.longitude,employeeId:modeldata.employeeId,projectId:projectId,action:modeldata.action}
+ let formData = {...data, date: new Date().toLocaleDateString(),latitude:coords.latitude,longitude:coords.longitude,employeeId:modeldata.employeeId,projectId:projectId,action:modeldata.action,id:modeldata?.id || null}
dispatch(markAttendance(formData))
.unwrap()
.then(() => {
@@ -67,8 +67,6 @@ const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
|