Merge branch 'main' into feature/internationalization-support

This commit is contained in:
Mohamad Tarbin
2026-04-05 20:51:29 -04:00
committed by GitHub
24 changed files with 584 additions and 374 deletions

View File

@@ -34,8 +34,9 @@ export const getDueDateChipText = (nextDueDate, chore, timeFormat = 'h:mm A') =>
sameElse: `MMM D ${timeFormat}`,
}
// if seconds and minutes set to 59, treat as no time (date only)
if (dueDate.seconds() === 59 && dueDate.minutes() === 59) {
// if time is 23:59:59, treat as end-of-day (date only, no specific time)
if (dueDate.hours() === 23 && dueDate.minutes() === 59 && dueDate.seconds() === 59) {
if (diff < 0) {
// For overdue dates, show calendar format for recent dates
const absDiff = Math.abs(diff)

View File

@@ -16,6 +16,8 @@ export const ChoreHistoryStatus = Object.freeze({
SKIPPED: 2,
PENDING_APPROVAL: 3,
REJECTED: 4,
MISSED: 5,
RESCHEDULED: 6,
})
export const ChoreStatus = Object.freeze({
INACTIVE: 0,
@@ -324,7 +326,7 @@ export const notInCompletionWindow = chore => {
chore.completionWindow &&
chore.completionWindow > -1 &&
chore.nextDueDate &&
moment() < moment(chore.nextDueDate).add(-chore.completionWindow, 'seconds')
moment() < moment(chore.nextDueDate).add(-chore.completionWindow, 'hours')
)
}
export const ChoreFilters = userId => ({
@@ -332,6 +334,9 @@ export const ChoreFilters = userId => ({
assigned_to_me: chore => {
return chore.assignedTo && chore.assignedTo === userId
},
available_for_me: chore => {
return chore.assignedTo === null || chore.assignedTo === userId
},
assigned_to_others: chore => {
return chore.assignedTo && chore.assignedTo !== userId
},