B1: React Query deeper adoption (P1–P3) #86
|
|
@ -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="relative inline-flex h-1.5 w-1.5 rounded-full bg-emerald-500" />
|
||||
</span>
|
||||
Live Sync
|
||||
Live
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-[1.75rem] font-bold tracking-tight font-mono leading-none text-foreground">
|
||||
|
|
|
|||
|
|
@ -254,9 +254,13 @@ function validateBillData(data, existingBill = 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) {
|
||||
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 {
|
||||
const dueResult = parseDueDay(data.due_day);
|
||||
if (dueResult.error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue