fix: prevent marking future jobs as completed
This commit is contained in:
@@ -227,6 +227,8 @@ export function PlanDashboard({ plan, dict, settingsDict, lang }: PlanDashboardP
|
|||||||
<span>{dict.jobDone}</span>
|
<span>{dict.jobDone}</span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
// Only show button if day is today or in the past
|
||||||
|
day <= new Date() || isSameDay(day, new Date()) ? (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -236,6 +238,7 @@ export function PlanDashboard({ plan, dict, settingsDict, lang }: PlanDashboardP
|
|||||||
<Check className="w-4 h-4" />
|
<Check className="w-4 h-4" />
|
||||||
{dict.markDone}
|
{dict.markDone}
|
||||||
</Button>
|
</Button>
|
||||||
|
) : null
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user