Allowed task reporting with zero completed tasks and hid the Report button if the reported date is not null. #95

Merged
vikas.nale merged 1 commits from Ashutosh_Enhancement_#214_Report_Task_At_Zero into Issue_May_2W 2025-05-10 13:38:06 +00:00
2 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ export const ReportTask = ({ report, closeModal, refetch }) => {
.max(maxPending, {
message: `Completed task cannot exceed total pending tasks: ${maxPending}`,
})
.positive("Completed Work must be a positive number")
.optional(),
comment: z.string().min(1, "Comment cannot be empty"),
});

View File

@ -318,7 +318,7 @@ const DailyTask = () => {
<button
type="button"
className={`btn btn-xs btn-primary ${
task.completedTask > 0 ? "d-none" : ""
task.reportedDate != null ? "d-none" : ""
}`}
onClick={() => {
selectTask(task);