B1: React Query deeper adoption (P1–P3) #86

Closed
null wants to merge 340 commits from branch/b1-react-query into main
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 626459322f - Show all commits

View File

@ -813,7 +813,7 @@ export default function TrackerPage() {
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75" /> <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75" />
<span className="relative inline-flex h-1.5 w-1.5 rounded-full bg-emerald-500" /> <span className="relative inline-flex h-1.5 w-1.5 rounded-full bg-emerald-500" />
</span> </span>
Live Sync Live
</span> </span>
</div> </div>
<p className="text-[1.75rem] font-bold tracking-tight font-mono leading-none text-foreground"> <p className="text-[1.75rem] font-bold tracking-tight font-mono leading-none text-foreground">

View File

@ -254,9 +254,13 @@ function validateBillData(data, existingBill = null) {
} }
normalized.name = nameVal || null; normalized.name = nameVal || null;
// due_day is required // due_day is required; fall back to existing value on partial updates
if (data.due_day === undefined || data.due_day === null) { if (data.due_day === undefined || data.due_day === null) {
errors.push({ field: 'due_day', message: 'due_day is required' }); if (existingBill?.due_day != null) {
normalized.due_day = existingBill.due_day;
} else {
errors.push({ field: 'due_day', message: 'due_day is required' });
}
} else { } else {
const dueResult = parseDueDay(data.due_day); const dueResult = parseDueDay(data.due_day);
if (dueResult.error) { if (dueResult.error) {