Refactor code structure for improved readability and maintainability
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m27s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m27s
This commit is contained in:
@@ -301,7 +301,10 @@ function handleChoreConfirmation(event: Event) {
|
||||
function isChoreCompletedToday(item: ChildTask): boolean {
|
||||
if (item.pending_status !== 'approved' || !item.approved_at) return false
|
||||
const today = new Date().toISOString().slice(0, 10)
|
||||
return item.approved_at.slice(0, 10) === today
|
||||
if (item.approved_at.slice(0, 10) !== today) return false
|
||||
// If the task has a schedule and today is not a scheduled day, don't show as completed
|
||||
if (item.schedule && !isScheduledToday(item.schedule, new Date())) return false
|
||||
return true
|
||||
}
|
||||
|
||||
function isChorePending(item: ChildTask): boolean {
|
||||
|
||||
Reference in New Issue
Block a user