diff --git a/src/components/Employee/EmpAttendance.jsx b/src/components/Employee/EmpAttendance.jsx index 7316e091..034125d6 100644 --- a/src/components/Employee/EmpAttendance.jsx +++ b/src/components/Employee/EmpAttendance.jsx @@ -103,6 +103,9 @@ const EmpAttendance = () => { Name + + ProjectName + Date {" "} @@ -118,7 +121,7 @@ const EmpAttendance = () => { {currentItems?.map((attendance, index) => ( - +
{
+ {attendance.projectName} {" "} {moment(attendance.checkInTime).format("DD-MMM-YYYY")} diff --git a/src/components/Project/Infrastructure/EditActivityModal.jsx b/src/components/Project/Infrastructure/EditActivityModal.jsx index 964bf2d2..697c34d9 100644 --- a/src/components/Project/Infrastructure/EditActivityModal.jsx +++ b/src/components/Project/Infrastructure/EditActivityModal.jsx @@ -19,7 +19,7 @@ const taskSchema = z .object({ activityID: z.string().min(1, "Activity is required"), workCategoryId: z.string().min(1, "Work Category is required"), - plannedWork: z.number().min(1, "Planned Work must be greater than 0"), + plannedWork: z.number().min(0.01, "Planned Work must be greater than 0"), completedWork: z.number().min(0, "Completed Work must be ≥ 0"), comment: z.string(), }) @@ -101,6 +101,7 @@ const EditActivityModal = ({ const onSubmitForm = (data) => { const payload = { ...data, + plannedWork: Number(data.plannedWork.toFixed(2)), id: workItem?.workItem?.id ?? workItem?.id, buildingID: building?.id, floorId: floor?.id, @@ -262,25 +263,90 @@ const EditActivityModal = ({ )} -
- - -
- - +
+ + + {errors.workCategoryId && ( +

{errors.workCategoryId.message}

+ )} +
+ +
+ + + + {errors.plannedWork && ( +

{errors.plannedWork.message}

+ )} +
+ +
+ + 0} + className="form-control form-control-sm" + /> + {errors.completedWork && ( +

{errors.completedWork.message}

+ )} +
+ +
+ + +
+ +
+ +