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 5 additions and 4 deletions
Showing only changes of commit 80ef1208ae - Show all commits

View File

@ -11,7 +11,7 @@ export function PaymentProgress({ row, threshold, onOpen, onMarkFullAmount, comp
const amountLabel = (() => {
if (summary.paid === 0) return '—';
if (summary.overpaid > 0) return `${fmt(summary.paidTowardDue)} · overpaid`;
if (summary.overpaid > 0) return `${fmt(summary.paid)} · overpaid`;
if (summary.remaining > 0) return `${fmt(summary.paidTowardDue)} paid`;
return fmt(summary.paidTowardDue);
})();

View File

@ -247,11 +247,12 @@ function validateBillData(data, existingBill = null) {
const validCycleTypes = getValidCycleTypes();
// name is required
if (!data.name) {
// name is required; fall back to existing value on partial updates
const nameVal = data.name !== undefined ? data.name : existingBill?.name;
if (!nameVal) {
errors.push({ field: 'name', message: 'name is required' });
}
normalized.name = data.name || null;
normalized.name = nameVal || null;
// due_day is required
if (data.due_day === undefined || data.due_day === null) {