Show why the balance doesn't match, not just a grey readout
Grey (vs green) on the calc-readouts said something was wrong but never what - the actual explanation (the statement_balance check's own detail text, with the full math and "off by \$X") only existed in the checks list, which starts collapsed by default, with no visible link back to the readouts near the balance fields. Surfaces that same detail text directly under the balance fields/Recheck button when the check outcome is "fail" - no new backend call or logic, just showing what was already being computed and returned, in the place the user is actually looking. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
15e163267e
commit
92979f7de7
|
|
@ -109,6 +109,7 @@ h1{ font-family:var(--fd); font-weight:800; font-size:30px; letter-spacing:-.01e
|
|||
border:1px solid rgba(220,38,38,.3); border-radius:9px; padding:11px 14px; margin-top:12px;
|
||||
}
|
||||
.error-note.visible{ display:block; }
|
||||
.fields-row + .error-note.visible{ margin-bottom:14px; }
|
||||
|
||||
.status-banner{
|
||||
display:inline-flex; align-items:center; gap:9px; padding:7px 15px; border-radius:20px;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,17 @@ const closingCalcText = computed(() => {
|
|||
|
||||
const toggleLabel = computed(() => (uiStore.pdfColHidden ? 'Show Source Doc' : 'Hide Source Doc'))
|
||||
|
||||
// The grey (non-matching) calc-readout on its own doesn't say WHY -
|
||||
// surface the statement_balance check's own detail text (it already
|
||||
// has the full math and the "off by $X" amount, no need to re-derive
|
||||
// that client-side) right under the fields where the mismatch is
|
||||
// actually visible, instead of leaving the user to find the same line
|
||||
// in the (collapsed-by-default) checks list elsewhere on the page.
|
||||
const balanceMismatchText = computed(() => {
|
||||
const check = balanceCheck.value
|
||||
return check?.outcome === 'fail' ? check.detail : ''
|
||||
})
|
||||
|
||||
// ── Balance recheck ──────────────────────────────────────────────────
|
||||
// Entering opening/closing balance AFTER extraction (e.g. the user
|
||||
// forgot to type it before clicking Extract) doesn't update anything on
|
||||
|
|
@ -97,6 +108,7 @@ async function handleRecheck() {
|
|||
{{ rechecking ? 'Checking…' : 'Recheck Balance' }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="balanceMismatchText" class="error-note visible">Balance doesn't match the statement — {{ balanceMismatchText }}</div>
|
||||
<div class="note">This statement format may not print a clean opening/closing balance — enter them here to run the full statement balance check; otherwise it's marked "not available" rather than guessed.</div>
|
||||
<div v-if="result" class="note">Click the pencil on a row to edit it, then Save to commit - edits are saved to this browser as you confirm them, row by row.</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue