From 9ba3a3678b127d3d3beb6d706801baacea665859 Mon Sep 17 00:00:00 2001 From: Mlcarvalho1 Date: Wed, 27 May 2026 16:05:28 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20total=20dos=20valores=20a=20importar=20?= =?UTF-8?q?no=20rodap=C3=A9=20da=20pr=C3=A9via?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Soma apenas as linhas novas (não duplicatas), exibida alinhada à direita. Co-Authored-By: Claude Sonnet 4.6 --- apps/web/src/views/ImportView.vue | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/apps/web/src/views/ImportView.vue b/apps/web/src/views/ImportView.vue index 8adc5fb..fb311b9 100644 --- a/apps/web/src/views/ImportView.vue +++ b/apps/web/src/views/ImportView.vue @@ -62,6 +62,9 @@ async function doPreview() { const newCount = computed(() => store.rows.filter((r) => !r.is_duplicate).length) const dupCount = computed(() => store.rows.filter((r) => r.is_duplicate).length) +const newTotal = computed(() => + store.rows.filter((r) => !r.is_duplicate).reduce((s, r) => s + r.amount, 0) +) function fmt(amount: number) { return amount.toLocaleString('pt-BR', { style: 'currency', currency: 'BRL' }) @@ -225,6 +228,10 @@ function fmt(amount: number) { +
+ TOTAL A IMPORTAR + {{ fmt(newTotal) }} +
@@ -348,6 +355,28 @@ function fmt(amount: number) { .fc-import-status--new { background: rgba(57,255,122,.15); color: var(--fc-green); } .fc-import-status--dup { background: rgba(255,216,77,.15); color: var(--fc-gold); } +.fc-import-total { + display: flex; + justify-content: flex-end; + align-items: center; + gap: var(--fc-space-3); + padding: var(--fc-space-3) var(--fc-space-2) 0; + border-top: 1px solid var(--fc-panel-edge); + margin-top: var(--fc-space-2); +} + +.fc-import-total__label { + font-size: 10px; + color: var(--fc-text-dim); + letter-spacing: .08em; +} + +.fc-import-total__value { + font-size: 15px; + color: var(--fc-accent-2); + font-weight: 600; +} + .fc-import-cat-select { font-size: 10px; padding: 2px 4px;