Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/release/RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

### What's new
* [OSDEV-2112](https://opensupplyhub.atlassian.net/browse/OSDEV-2112) - Moved "Recruitment Agency" (previously classified as a location type) under the "Office / HQ" location type as a processing type. Also introduced a new processing type, "Union Headquarters/Office", under the "Office / HQ" location type. This update affects both search and newly contributed data: from now on, "Union Headquarters/Office" and "Recruitment Agency" will appear under the "Office / HQ" location type when displayed in search dropdowns or shown on location profiles for **newly** added locations.
* [OSDEV-2244](https://opensupplyhub.atlassian.net/browse/OSDEV-2244) - Implemented frontend formatting for the ISIC 4 extended field to display Section, Division, Group, and Class as separate labeled entries, building the full ISIC 4 hierarchy on production location profile pages.

### Release instructions
* Ensure that the following commands are included in the `post_deployment` command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,26 @@ describe('FacilityDetailsGeneralFields component', () => {
verified_count: 0,
}
],
isic_4: [
{
id: 83090,
is_verified: false,
value: {
section: 'C',
division: '14',
group: '141',
class: '1410',
},
created_at: '2025-05-01T10:49:15.174025Z',
updated_at: '2025-05-01T10:58:25.043413Z',
contributor_name: 'Test Org',
contributor_id: 1139,
value_count: 1,
is_from_claim: false,
field_name: 'isic_4',
verified_count: 0,
},
],
},
created_from: {
created_at: '2025-04-18T11:21:15.877648Z',
Expand Down Expand Up @@ -376,4 +396,14 @@ describe('FacilityDetailsGeneralFields component', () => {
expect(getByText('Climate Trace')).toBeInTheDocument();
expect(getByText('Scope 2 emissions: 456')).toBeInTheDocument();
});

test('renders ISIC 4 field with formatted section, division, group, and class', () => {
const { getByText } = renderComponent();

expect(getByText('ISIC 4')).toBeInTheDocument();
expect(getByText('Section: C')).toBeInTheDocument();
expect(getByText('Division: 14')).toBeInTheDocument();
expect(getByText('Group: 141')).toBeInTheDocument();
expect(getByText('Class: 1410')).toBeInTheDocument();
});
});
11 changes: 11 additions & 0 deletions src/react/src/util/constants.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,17 @@ export const EXTENDED_FIELD_TYPES = [
fieldName: 'parent_company_os_id',
formatValue: value => value.raw_values,
},
{
label: 'ISIC 4',
fieldName: 'isic_4',
formatValue: ({ section, division, group, class: isicClass }) =>
[
section && `Section: ${section}`,
division && `Division: ${division}`,
group && `Group: ${group}`,
isicClass && `Class: ${isicClass}`,
].filter(Boolean),
},
];

export const ADDITIONAL_IDENTIFIERS = Object.freeze([
Expand Down