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