Repository navigation
BlockDetailsSummary
type: Component title: BlockDetailsSummary description: Read-only Reporting unit summary card for the block details page (issue #1369). tags: [frontend, react, reporting-unit, district-average, read-only, summary] timestamp: 2026-10-01T00:00:00Z
BlockDetailsSummary renders the read-only Reporting unit summary card for the block details page. It displays six summary fields as Readonly Input definition lists inside a bordered Carbon Tile.
Use BlockDetailsSummary when the block details page needs the reporting unit's identification and classification fields at a glance. The card is modelled on ReportingUnitDetailsTombstone but is a new component — the tombstone remains untouched and keeps its role-gated client link. BlockDetailsSummary renders display-only values with no inputs, edit controls, or links.
- Source:
frontend/src/components/waste/ReportingUnits/BlockDetailsSummary/index.tsx - Styles:
frontend/src/components/waste/ReportingUnits/BlockDetailsSummary/index.scss - Tests: covered by the ReportingUnitBlockDetails page tests
| Name | Type | Required | Description |
|---|---|---|---|
data |
ReportingUnitDto |
yes | The reporting unit whose read-only fields are shown in the summary card. |
| Field | Label | Rendered as |
|---|---|---|
data.client.description |
Client name | Plain text. |
data.client.code |
Client ID | Plain text. |
data.district.code + data.district.description
|
District |
{code} - {description}. |
data.grade.description |
Grades | Empty Value Tag dash placeholder for null or empty values. |
data.sampling.code + data.sampling.description
|
Sampling Option |
{code} - {description}. |
data.createdAt |
Created on |
Date Tag with format="MMMM dd, yyyy"; renders nothing when createdAt is absent (decision D3 — DateTag handles empty values). |
- Renders inside a Carbon
<Tile>with aGridof six responsiveColumns (max,xlg,lg,md,smbreakpoints per field). - All values are read-only; the component renders no inputs, edit controls, or links.
- The
Created onfield is conditional ondata.createdAt, which is optional onreportingUnitSchemaand fills once the backend exposes a creation date.
- No client link — unlike the tombstone, the card intentionally renders the client as plain text.
- Column breakpoints are hardcoded in the component; layout adjustments require source changes.
- Backend issue #1250 tracks the follow-up for exposing the reporting-unit creation date.
- ReportingUnitBlockDetails — sole consumer of this component.
-
useReportingUnitDetailsQuery — supplies the
ReportingUnitDtorendered here. -
frontend/src/services/reportingUnit.types.ts—createdAtadded as optional onreportingUnitSchema.
This wiki documents NR Waste Plus for users and developers. Verify security and deployment guidance against the current application configuration before applying it elsewhere.
- Report an issue or ask a question in the GitHub repository.
- Follow the Contributing Guidelines to propose an update.
- Read the Code of Conduct.
Collection indexes support human browsing and machine retrieval. Keep both current when adding or moving wiki pages.
NR Waste Plus Wiki | GitHub Repository