Repository navigation
fix: align analytics card spacing - #9
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 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:24pxoffset to the KPI/card section on Visão geral. - Added the same
margin-top:24pxoffset 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.