- {effectiveActual != null ? (
- setExpectedDraft(e.target.value)}
+ onBlur={handleSaveExpected}
+ onKeyDown={e => {
+ if (e.key === 'Enter') e.currentTarget.blur();
+ if (e.key === 'Escape') { setEditingExpected(false); }
+ }}
+ className="w-24 rounded border border-border bg-transparent px-1 py-0.5 text-right text-sm font-mono text-foreground outline-none focus:ring-[2px] focus:ring-ring/50"
+ />
+ ) : effectiveActual != null ? (
+
+
) : (
- {fmt(row.expected_amount)}
+
{row.amount_suggestion?.suggestion != null &&
Math.abs(row.amount_suggestion.suggestion - row.expected_amount) / row.expected_amount > 0.05 && (