feat: add completed chores to the display order in ChildView and update sorting priority
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m50s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m50s
This commit is contained in:
@@ -65,6 +65,7 @@ When viewing the child's chores, kindnesses, penalties, rewards. The items shoul
|
|||||||
1. Scheduled for today chores (with earliest deadline first when it applies)
|
1. Scheduled for today chores (with earliest deadline first when it applies)
|
||||||
2. General Chores
|
2. General Chores
|
||||||
3. Pending chores
|
3. Pending chores
|
||||||
|
4. Completed Chores
|
||||||
|
|
||||||
- Rewards
|
- Rewards
|
||||||
|
|
||||||
|
|||||||
@@ -468,6 +468,7 @@ function choreDueLabel(item: ChildTask): string | null {
|
|||||||
// ── Sorting ───────────────────────────────────────────────────────────────────
|
// ── Sorting ───────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
function childChoreSortPriority(item: ChildTask): number {
|
function childChoreSortPriority(item: ChildTask): number {
|
||||||
|
if (isChoreCompletedToday(item)) return 3
|
||||||
if (item.pending_status === 'pending') return 2
|
if (item.pending_status === 'pending') return 2
|
||||||
if (!item.schedule) return 1 // general chore
|
if (!item.schedule) return 1 // general chore
|
||||||
return 0 // scheduled for today
|
return 0 // scheduled for today
|
||||||
|
|||||||
Reference in New Issue
Block a user