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>
|
||||
</div>
|
||||
) : (
|
||||
// Only show button if day is today or in the past
|
||||
day <= new Date() || isSameDay(day, new Date()) ? (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
@@ -236,6 +238,7 @@ export function PlanDashboard({ plan, dict, settingsDict, lang }: PlanDashboardP
|
||||
<Check className="w-4 h-4" />
|
||||
{dict.markDone}
|
||||
</Button>
|
||||
) : null
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user