Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 28f5c43349 | |||
| a2b464af7b |
@@ -2,7 +2,7 @@
|
||||
# file: config/version.py
|
||||
import os
|
||||
|
||||
BASE_VERSION = "1.0.11" # update manually when releasing features
|
||||
BASE_VERSION = "1.0.12" # update manually when releasing features
|
||||
|
||||
def get_full_version() -> str:
|
||||
"""
|
||||
|
||||
@@ -224,9 +224,13 @@ const triggerTask = async (task: ChildTask) => {
|
||||
|
||||
function isChoreCompletedToday(item: ChildTask): boolean {
|
||||
if (item.pending_status !== 'approved' || !item.approved_at) return false
|
||||
const approvedDate = item.approved_at.substring(0, 10)
|
||||
const today = new Date().toISOString().slice(0, 10)
|
||||
return approvedDate === today
|
||||
const approvedDate = new Date(item.approved_at)
|
||||
const today = new Date()
|
||||
return (
|
||||
approvedDate.getFullYear() === today.getFullYear() &&
|
||||
approvedDate.getMonth() === today.getMonth() &&
|
||||
approvedDate.getDate() === today.getDate()
|
||||
)
|
||||
}
|
||||
|
||||
async function doConfirmChore() {
|
||||
|
||||
@@ -300,8 +300,13 @@ 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)
|
||||
if (item.approved_at.slice(0, 10) !== today) return false
|
||||
const approvedDate = new Date(item.approved_at)
|
||||
const today = new Date()
|
||||
const sameDay =
|
||||
approvedDate.getFullYear() === today.getFullYear() &&
|
||||
approvedDate.getMonth() === today.getMonth() &&
|
||||
approvedDate.getDate() === today.getDate()
|
||||
if (!sameDay) 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
|
||||
|
||||
Reference in New Issue
Block a user