Skip to content

fix: align analytics card spacing - #9

Merged
ruialexrib merged 2 commits into
mainfrom
fix/analytics-kpi-spacing
Aug 31, 2026
Merged

ruialexrib merged 2 commits into
mainfrom
fix/analytics-kpi-spacing

Conversation

@ruialexrib

Copy link
Copy Markdown
Owner

Aligns the KPI/card spacing in both Overview and Anomalies with the existing VAT Analysis layout, adding the same vertical separation between the SAF-T source/navigation area and the cards.

Copilot AI lite review requested due to automatic review settings August 31, 2026 08:04
@ruialexrib
ruialexrib merged commit 129f48a into main Aug 31, 2026
2 checks passed
@ruialexrib
ruialexrib deleted the fix/analytics-kpi-spacing branch August 31, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is low-risk and achieves the intended layout alignment; remaining feedback is a non-blocking maintainability improvement (centralizing spacing in CSS).

Pull request overview

Aligns the vertical spacing between the SAF-T source/navigation area and the KPI cards on the Overview and Anomalies analytics pages, matching the existing spacing used in VAT Analysis.

Changes:

  • Added a margin-top:24px offset to the KPI/card section on Visão geral.
  • Added the same margin-top:24px offset to the KPI/card section on Anomalias.
File summaries
File Description
src/TabulariusAI.Web/Views/Dossier/Analytics.cshtml Adds top spacing to the KPI cards to match VAT Analysis layout.
src/TabulariusAI.Web/Views/Dossier/Anomalies.cshtml Adds the same top spacing to the KPI cards for consistent analytics layout.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@{ViewData["Title"]="Visão geral analítica";var s=Model.Source;var max=Model.Monthly.Count==0?1:Math.Max(1,Model.Monthly.Max(x=>Math.Max(x.Debit,x.Credit)));}
<section class="page-header analytics-header"><div><p class="eyebrow">Área analítica</p><h1>Visão geral</h1><p class="lead">Leitura determinística da atividade contabilística da fonte SAF-T (PT) selecionada.</p></div><a class="btn btn-secondary" asp-action="Details" asp-route-id="@s.SelectedImport.DossierId">Voltar ao dossier</a></section><partial name="_SaftSourceSelector" model="s" />
<section class="analytics-kpis"><article><small>Lançamentos</small><strong>@Model.TransactionCount.ToString("N0")</strong><span>transações contabilísticas</span></article><article><small>Movimentos a débito</small><strong>@Model.TotalDebit.ToString("N2") €</strong><span>valor determinístico</span></article><article><small>Movimentos a crédito</small><strong>@Model.TotalCredit.ToString("N2") €</strong><span>valor determinístico</span></article><article class="@(Model.AnomalyCount>0?"analytics-kpi-alert":"")"><small>Anomalias</small><strong>@Model.AnomalyCount</strong><span>@(Model.AnomalyCount>0?"situações a analisar":"sem alertas nas regras atuais")</span></article></section>
<section class="analytics-kpis" style="margin-top:24px"><article><small>Lançamentos</small><strong>@Model.TransactionCount.ToString("N0")</strong><span>transações contabilísticas</span></article><article><small>Movimentos a débito</small><strong>@Model.TotalDebit.ToString("N2") €</strong><span>valor determinístico</span></article><article><small>Movimentos a crédito</small><strong>@Model.TotalCredit.ToString("N2") €</strong><span>valor determinístico</span></article><article class="@(Model.AnomalyCount>0?"analytics-kpi-alert":"")"><small>Anomalias</small><strong>@Model.AnomalyCount</strong><span>@(Model.AnomalyCount>0?"situações a analisar":"sem alertas nas regras atuais")</span></article></section>
@{ViewData["Title"]="Anomalias";var s=Model.Source;var high=Model.Findings.Count(x=>x.Severity=="Alta");var medium=Model.Findings.Count(x=>x.Severity=="Média");var passed=Model.Checks.Count(x=>x.Passed);var failed=Model.Checks.Count-passed;}
<section class="page-header analytics-header"><div><p class="eyebrow">Área analítica</p><h1>Anomalias</h1><p class="lead">Motor de controlos determinísticos sobre a fonte SAF-T (PT), com regras identificadas e evidência rastreável.</p></div><a class="btn btn-secondary" asp-action="Details" asp-route-id="@s.SelectedImport.DossierId">Voltar ao dossier</a></section><partial name="_SaftSourceSelector" model="s"/>
<section class="analytics-kpis"><article><span>Controlos executados</span><strong>@Model.Checks.Count</strong><small>regras determinísticas</small></article><article><span>Passaram</span><strong>@passed</strong><small>sem situações detetadas</small></article><article class="@(failed>0?"analytics-kpi-alert":"")"><span>Não passaram</span><strong>@failed</strong><small>controlos com ocorrências</small></article><article><span>Situações</span><strong>@Model.Findings.Count</strong><small>@high alta · @medium média</small></article></section>
<section class="analytics-kpis" style="margin-top:24px"><article><span>Controlos executados</span><strong>@Model.Checks.Count</strong><small>regras determinísticas</small></article><article><span>Passaram</span><strong>@passed</strong><small>sem situações detetadas</small></article><article class="@(failed>0?"analytics-kpi-alert":"")"><span>Não passaram</span><strong>@failed</strong><small>controlos com ocorrências</small></article><article><span>Situações</span><strong>@Model.Findings.Count</strong><small>@high alta · @medium média</small></article></section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants