Allowed task reporting with zero completed tasks and hid the Report button if the reported date is not null.
This commit is contained in:
parent
f6ab824529
commit
f26b708564
@ -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"),
|
||||
});
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user