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}>
|
<th className="border-top-1" colSpan={2}>
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
|
<th className="border-top-1" colSpan={2}>
|
||||||
|
ProjectName
|
||||||
|
</th>
|
||||||
<th className="border-top-1">Date</th>
|
<th className="border-top-1">Date</th>
|
||||||
<th>
|
<th>
|
||||||
<i className="bx bxs-down-arrow-alt text-success"></i>{" "}
|
<i className="bx bxs-down-arrow-alt text-success"></i>{" "}
|
||||||
@ -118,7 +121,7 @@ const EmpAttendance = () => {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{currentItems?.map((attendance, index) => (
|
{currentItems?.map((attendance, index) => (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td colSpan={2}>
|
<td colSpan={3}>
|
||||||
<div className="d-flex justify-content-start align-items-center">
|
<div className="d-flex justify-content-start align-items-center">
|
||||||
<Avatar
|
<Avatar
|
||||||
firstName={attendance.firstName}
|
firstName={attendance.firstName}
|
||||||
@ -133,6 +136,7 @@ const EmpAttendance = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{attendance.projectName}</td>
|
||||||
<td>
|
<td>
|
||||||
{" "}
|
{" "}
|
||||||
{moment(attendance.checkInTime).format("DD-MMM-YYYY")}
|
{moment(attendance.checkInTime).format("DD-MMM-YYYY")}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ const taskSchema = z
|
|||||||
.object({
|
.object({
|
||||||
activityID: z.string().min(1, "Activity is required"),
|
activityID: z.string().min(1, "Activity is required"),
|
||||||
workCategoryId: z.string().min(1, "Work Category 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"),
|
completedWork: z.number().min(0, "Completed Work must be ≥ 0"),
|
||||||
comment: z.string(),
|
comment: z.string(),
|
||||||
})
|
})
|
||||||
@ -107,6 +107,7 @@ const EditActivityModal = ({
|
|||||||
const onSubmitForm = (data) => {
|
const onSubmitForm = (data) => {
|
||||||
const payload = {
|
const payload = {
|
||||||
...data,
|
...data,
|
||||||
|
plannedWork: Number(data.plannedWork.toFixed(2)),
|
||||||
id: workItem?.workItem?.id ?? workItem?.id,
|
id: workItem?.workItem?.id ?? workItem?.id,
|
||||||
buildingID: building?.id,
|
buildingID: building?.id,
|
||||||
floorId: floor?.id,
|
floorId: floor?.id,
|
||||||
@ -220,8 +221,10 @@ const EditActivityModal = ({
|
|||||||
<input
|
<input
|
||||||
{...register("plannedWork", { valueAsNumber: true })}
|
{...register("plannedWork", { valueAsNumber: true })}
|
||||||
type="number"
|
type="number"
|
||||||
|
step="0.01" // <-- allows 2 decimal places
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{errors.plannedWork && (
|
{errors.plannedWork && (
|
||||||
<p className="danger-text">{errors.plannedWork.message}</p>
|
<p className="danger-text">{errors.plannedWork.message}</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user