Repository navigation
fix(compliance-report): one table per eForm under a report headline; render checkbox and date answers (#1276) - #1277
Merged
Conversation
…render checkbox and date answers (#1276) The Rapport view grouped by report headline (#1188) and, as #1188's own design choice, rendered ONE table per headline with the union of every eForm's columns: two eForms under one "Rapportoverskrift" merged into a table with both schemas side by side (duplicate "Kommentar" / "Udført dato" columns, blank cells for the other eForm). Checkbox answers printed the canonical token "checked" / "unchecked", and eForm Date answers raw ISO next to the formatted fixed date column. - EformColumns: each headline group now carries Templates[] — one table per eForm (CheckListId, CheckListName, SchemaUnavailable, its own fresh Columns and Cases), ordered by eForm name. Headline grouping, tags caption and group order are unchanged. - View: the caption + headline once per section, then one table per eForm under its name (h{headline}-c{checkListId} keys). CheckBox: a check icon for checked, empty for unchecked, the en dash when unanswered. Date answers as dd.MM.yyyy. - Export mirrors it: Word/PDF headings once per headline, the eForm name above each table (kept with its table), ✔ / empty for checkboxes, Danish dates; CSV keeps its single flat table, "x" / blank, ISO dates. - Removes the now-unused "Columns unavailable for template" i18n key. Closes #1276 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Add UI_TIMEOUT to the new Playwright expectations before approval.
Pull request overview
Updates compliance reports to render one table per eForm under each report headline, with formatted checkbox and date answers across the UI and exports.
Changes:
- Refactors report grouping into headline → eForm tables.
- Adds typed checkbox/date rendering for screen, Word/PDF, and CSV outputs.
- Updates models, localization, styling, and automated test coverage.
File summaries
| File | Summary |
|---|---|
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationComplianceReportService/IBackendConfigurationComplianceReportService.cs |
Updates service contract documentation. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationComplianceReportService/ComplianceReportEformProjector.cs |
Projects canonical checkbox and date values. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationComplianceReportService/BackendConfigurationComplianceReportService.cs |
Groups cases into per-eForm tables. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationComplianceExportService/ComplianceExportWordWriter.cs |
Renders typed Word/PDF cells and headings. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationComplianceExportService/ComplianceExportDocumentBuilder.cs |
Builds per-eForm export tables. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationComplianceExportService/ComplianceExportCsvWriter.cs |
Renders typed CSV values. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/ComplianceReport/ComplianceReportTemplateTableModel.cs |
Adds the per-eForm table model. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/ComplianceReport/ComplianceReportHeadlineGroupModel.cs |
Models headline groups containing template tables. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/ComplianceReport/ComplianceReportColumnModel.cs |
Carries column field-type metadata. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/ComplianceReport/ComplianceReportCaseModel.cs |
Carries per-case template and answer data. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/ComplianceReport/ComplianceExportDocument.cs |
Adds typed export cell support. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Controllers/ComplianceReportController.cs |
Documents the updated report endpoint shape. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/ComplianceExportWriterTests.cs |
Tests export output. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/ComplianceExportImageEmbeddingTests.cs |
Covers export image embedding behavior. |
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/ComplianceExportDocumentBuilderTests.cs |
Tests export document construction. |
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/compliance-report/helpers/compliance-report-sections.ts |
Maps headline/template sections and formats answers. |
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/compliance-report/helpers/compliance-report-sections.spec.ts |
Tests section mapping and answer formatting. |
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/compliance-report/components/compliance-report-view/compliance-report-view.component.ts |
Builds per-table grids and typed rendering. |
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/compliance-report/components/compliance-report-view/compliance-report-view.component.spec.ts |
Tests table rendering and budgets. |
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/compliance-report/components/compliance-report-view/compliance-report-view.component.scss |
Styles table headings and typed cells. |
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/compliance-report/components/compliance-report-view/compliance-report-view.component.html |
Renders headline and eForm table structure. |
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/compliance-report/compliance-report.module.ts |
Updates module integration. |
eform-client/src/app/plugins/modules/backend-configuration-pn/models/compliance-report/compliance-report.model.ts |
Updates frontend report models. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ukUA.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/svSE.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/slSL.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/skSK.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/roRO.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptPT.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ptBR.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/plPL.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/noNO.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/nlNL.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/lvLV.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/ltLT.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/itIT.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/isIS.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/huHU.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/hrHR.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/frFR.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/fiFI.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/etET.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/esES.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/enUS.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/elGR.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/deDE.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/da.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/csCZ.ts |
Removes the obsolete report translation key. |
eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/bgBG.ts |
Removes the obsolete report translation key. |
eform-client/playwright/e2e/plugins/backend-configuration-pn/s/compliance-report-view.spec.ts |
Adds browser coverage for layout and typed values; new assertions should use UI_TIMEOUT. |
eform-client/playwright/e2e/plugins/backend-configuration-pn/s/compliance-page-shell.spec.ts |
Updates the mocked report response shape. |
Review details
Suppressed comments (1)
eform-client/playwright/e2e/plugins/backend-configuration-pn/s/compliance-report-view.spec.ts:287
- These new assertions omit an explicit timeout, so a missing or malformed mocked response/render can inherit the full test timeout and make this serial shard hang for minutes. Add the shared
UI_TIMEOUTto each expectation in this block (and the other newly added expectations in this test) so failures identify the UI condition promptly.
await expect(section.locator('.compliance-report__tag')).toHaveText(/^\s*Miljøtilsyn\s*$/);
await expect(section.locator('.compliance-report__heading')).toHaveCount(1);
await expect(section.locator('.compliance-report__heading')).toHaveText(
/^\s*Headline 1\s*$/,
);
- Files reviewed: 52/52 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…erive (#1276) Core.Advanced_TemplateFieldReadAll catches every exception itself, logs it and returns null (SDK Core.cs:4650-4654). The projector folded that null into an empty field list (`?? []`), so its catch — the only place that set TemplateSchema.SchemaUnavailable — was unreachable: a template whose schema could not be read (e.g. a child checklist with no translation in the user's language) rendered as a table with no answer columns and no notice. A null return is now treated exactly like a throw: warning logged (with the exception when Core rethrows), empty columns, SchemaUnavailable = true. Found by the new EformColumns_UnderivableSchema_IsFlaggedOnThatTemplatesTableOnly test, which failed in CI on the first push of this PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #1276
Problem (customer bug list, Rapport view)
Kommentar/Udført datocolumns, blank cells for the other eForm). Reproduced on a customer tenant: 12 of 15 headline groups mixed 2–3 eForms.checked/unchecked; eForm Date answers printed raw ISO (2025-12-01) next to the formatted01.12.2025.Root cause
Columns[].FieldTypereaches the client, but no renderer branched on the field type.Fix
compliance-report/eform-columns):ComplianceReportHeadlineGroupModelkeepsheadlineTagId/headlineName/tagsCaptionand replacescheckListIds/schemaUnavailableCheckListIds/columns/caseswithtemplates[]=ComplianceReportTemplateTableModel { checkListId, checkListName, schemaUnavailable, columns, cases }, one per eForm, ordered by name. Group order, fallback group and caption unchanged.dd.MM.yyyy.x/ blank, ISO dates; rows now come grouped eForm by eForm under a headline instead of interleaved by date.Columns unavailable for template #{{id}}i18n key (26 locales).Tests
SchemaUnavailableon one template's table only, typed CheckBox/Date export cells, trimming, Word heading/keepNext order, CSV snapshot. TheEformColumns_CheckBox_*tests (canonical token) are unchanged.s/compliance-report-view.spec.ts): stubbedeform-columnsresponse (CI cannot produce device-channel answers) — one headline over two eForm tables, the tick instead of text, formatted dates.Verified locally:
dotnet build(0 errors),tscapp + spec (no compliance errors),ng build --configuration development. Tests run in CI.🤖 Generated with Claude Code