Repository navigation
LegacyDataTag
LegacyDataTag renders a purple Carbon Design System tag that indicates a record originated in the legacy system. Clicking it opens the corresponding legacy URL in a new tab.
Use LegacyDataTag when displaying records that have not yet been migrated to the new system. It provides a consistent visual signal and deep-links back to the source record in the legacy application, helping users identify provenance without ambiguity.
- Source:
frontend/src/components/core/Tags/LegacyDataTag/index.tsx - Tests:
frontend/src/components/core/Tags/LegacyDataTag/index.unit.test.tsx
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url |
string |
Yes | — | Relative path appended to VITE_LEGACY_BASE_URL to form the full link URL. |
label |
string |
No | 'Legacy data' |
Override text for the tag label. |
- Concatenates
env.VITE_LEGACY_BASE_URLwithurlto produce the final href. - Always opens in a new tab (
target="_blank") withrel="noopener noreferrer". - Wraps the tag in a Carbon
Tooltipwith a fixed description:"This data originates from a legacy system. Click to view the source record." - Tooltip aligns to the bottom.
- Tag uses Carbon
type="purple"and renders aBoxicon.
import LegacyDataTag from '@/components/core/Tags/LegacyDataTag';
<LegacyDataTag url="/waste101ReportUnitDetailsAction.do?dataBean.p_reporting_unit_id=12345" /><LegacyDataTag
url="/legacyClientRecord.do?id=9876"
label="Legacy client"
/>-
urlmust be a path-only or query-only string relative toVITE_LEGACY_BASE_URL; the component performs no validation or encoding. - The legacy base URL is resolved from
env.VITE_LEGACY_BASE_URLat render time; the component does not support per-instance base URL overrides. - The tooltip label is hardcoded and cannot be customized via props.
- Uses
rel="noopener noreferrer"to prevent tab-napping for all new-tab links.
-
codes/frontend/Components.md— catalog entry for core tags section. -
codes/frontend/core/Tags/TagWrapper.md—TagWrapperis used alongsideLegacyDataTaginReportingUnitDetailsPageto position this tag next to the page title. -
pages/ReportingUnitDetails— primary consumer of this component.
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