Repository navigation
WasteSearchTable columns
WasteSearchTable/constants.tsx exports the column definitions array and helpers that drive the Waste Search results table.
- Source:
frontend/src/components/waste/WasteSearch/WasteSearchTable/constants.tsx - Tests:
frontend/src/components/waste/WasteSearch/WasteSearchTable/constants.unit.test.tsx
TableHeaderType<ReportingUnitSearchResultDto>[] — Column configuration array passed directly to the TableResource component.
| Column key | Header label | Sortable | Default visible | Render component / notes |
|---|---|---|---|---|
cutBlockId |
Block ID | Yes | Yes | EmptyValueTag |
licenseNumber |
Licence No. | Yes | No | EmptyValueTag |
cuttingPermit |
Cutting Permit | Yes | No | EmptyValueTag |
timberMark |
Timber Mark | Yes | No | EmptyValueTag |
ruNumber |
RU No. | Yes | Yes |
TooltipRedirectLinkTag — feature-flag conditional (see below) |
client.code |
Client No. | Yes | Yes |
TooltipRoleBasedRedirectLinkTag — IDIR role-gated link to client details |
client.description |
Client name | No | Yes | Plain text |
sampling |
Sampling option | Yes | Yes | CodeDescriptionTag |
sampling.code |
Sampling code | Yes | No | Plain text |
sampling.description |
Sampling name | Yes | No | Plain text |
multiMark |
Multi-mark (Y/N) | No | No | YesNoTag |
secondaryEntry |
Secondary entry (Y/N) | No | No | YesNoTag |
district |
District | Yes | Yes | CodeDescriptionTag |
district.code |
District code | Yes | No | Plain text |
district.description |
District name | Yes | No | Plain text |
status |
Status | Yes | Yes |
ColorTag (color driven by statusColorMap, showTooltip={false} — no tooltip on cells) |
status.code |
Status code | Yes | No | Plain text |
status.description |
Status name | Yes | No | Plain text |
lastUpdated |
Last updated on | Yes | Yes |
DateTag with format="DD" — id: 'lastUpdated'
|
lastUpdated |
Timestamp | Yes | No |
DateTag with format="t" — id: 'lastUpdatedTimestamp'; two columns share this key, distinguished by id
|
Record<string, CarbonColors> — Maps reporting-unit status codes to Carbon Design System tag colours.
| Colour | Status codes |
|---|---|
red |
ERR, FREJ, OREJ, REJ
|
teal |
HLD, HWR, RBL
|
green |
APP, BIP, BIS, BPR, COM, REV, RTB, WRA
|
blue |
SUB |
outline |
DFT, ISUB
|
gray |
DAC |
cyan |
EXP |
Status codes not present in this map render without a colour override.
The ruNumber column rendering depends on the reporting-unit-details-enabled feature flag:
| Flag state | Render output |
|---|---|
true |
TooltipRedirectLinkTag with url=/reporting-units/{value}, sameTab, clearSearch — routes to the React RU details page |
false / unset |
TooltipRedirectLinkTag with url={VITE_LEGACY_BASE_URL}/waste101ReportUnitDetailsAction.do?... — routes to the legacy system in a new tab |
-
statusColorMapis a private constant; extend it only when the backend introduces a new status code. - The
statuscolumn rendersColorTagwithshowTooltip={false}. Tooltips are intentionally suppressed here even thoughColorTagsupports them by default — the description is already visible in thestatus.descriptionsub-column. - The
ruNumberlegacy URL is constructed fromenv.VITE_LEGACY_BASE_URL— if the legacy URL pattern changes, update this file. - Test coverage must cover both branches of the
reporting-unit-details-enabledflag on theruNumberrenderer. - The two
lastUpdatedrows (id: 'lastUpdated'andid: 'lastUpdatedTimestamp') share the same data key. Both are present so thatDateTagcan render date-only and full-timestamp views independently. Theidfield disambiguates them for column toggling.
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