Merge pull request 'Attendance in Employee Profile Should Display Project-Wise' (#531) from Kartik_Enhancement_918 into Purchase_Invoice_Management
Reviewed-on: #531 Merged
This commit is contained in:
commit
d6a8040977
@ -103,6 +103,9 @@ const EmpAttendance = () => {
|
||||
<th className="border-top-1" colSpan={2}>
|
||||
Name
|
||||
</th>
|
||||
<th className="border-top-1" colSpan={2}>
|
||||
ProjectName
|
||||
</th>
|
||||
<th className="border-top-1">Date</th>
|
||||
<th>
|
||||
<i className="bx bxs-down-arrow-alt text-success"></i>{" "}
|
||||
@ -118,7 +121,7 @@ const EmpAttendance = () => {
|
||||
<tbody>
|
||||
{currentItems?.map((attendance, index) => (
|
||||
<tr key={index}>
|
||||
<td colSpan={2}>
|
||||
<td colSpan={3}>
|
||||
<div className="d-flex justify-content-start align-items-center">
|
||||
<Avatar
|
||||
firstName={attendance.firstName}
|
||||
@ -133,6 +136,7 @@ const EmpAttendance = () => {
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>{attendance.projectName}</td>
|
||||
<td>
|
||||
{" "}
|
||||
{moment(attendance.checkInTime).format("DD-MMM-YYYY")}
|
||||
|
||||
@ -17,7 +17,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(),
|
||||
})
|
||||
@ -107,6 +107,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,
|
||||
@ -220,8 +221,10 @@ const EditActivityModal = ({
|
||||
<input
|
||||
{...register("plannedWork", { valueAsNumber: true })}
|
||||
type="number"
|
||||
step="0.01" // <-- allows 2 decimal places
|
||||
className="form-control form-control-sm"
|
||||
/>
|
||||
|
||||
{errors.plannedWork && (
|
||||
<p className="danger-text">{errors.plannedWork.message}</p>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user