Skip to content

Commit f48ce4b

Browse files
authored
Merge branch 'main' into OSDEV-1795/fix-database-connection
2 parents c44d128 + 62cfe60 commit f48ce4b

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

doc/release/RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
5858
* [OSDEV-1787](https://opensupplyhub.atlassian.net/browse/OSDEV-1787) - The tooltip messages for the Claim button have been removed for all statuses of moderation events on the `Contribution Record` page and changed according to the design on `Thanks for adding data for this production location` pop-up.
5959
* [OSDEV-1789](https://opensupplyhub.atlassian.net/browse/OSDEV-1789) - Fixed an issue where the scroll position was not resetting to the top when navigating through SLC workflow pages.
6060
* [OSDEV-1795](https://opensupplyhub.atlassian.net/browse/OSDEV-1795) - Resolved database connection issue after PostgreSQL 16.3 upgrade by upgrading pg8000 module version.
61+
* [OSDEV-1803](https://opensupplyhub.atlassian.net/browse/OSDEV-1803) - Updated text from `Facility Type` to `Location Type` and `Facility Name` to `Location Name` on the SLC `Thank You for Your Submission` page.
6162

6263
### Release instructions:
6364
* Ensure that the following commands are included in the `post_deployment` command:

src/react/src/__tests__/components/ProductionLocationDialog.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('ProductionLocationDialog', () => {
7979

8080
expect(screen.getByText(/Thanks for adding data for this production location!/i)).toBeInTheDocument();
8181

82-
expect(screen.getByText(/Facility name/i)).toBeInTheDocument();
82+
expect(screen.getAllByText(/Location name/i)).toHaveLength(2);
8383
expect(screen.getByText(/Production Location Name/i)).toBeInTheDocument();
8484

8585
expect(screen.getByText(/Address/i)).toBeInTheDocument();
@@ -89,6 +89,7 @@ describe('ProductionLocationDialog', () => {
8989
expect(screen.getByText(/US2021250D1DTN7/i)).toBeInTheDocument();
9090

9191
expect(screen.getByText(/Pending/i)).toBeInTheDocument();
92+
expect(screen.getByText(/Location Type/i)).toBeInTheDocument();
9293

9394
expect(screen.getByText(/Number of workers/i)).toBeInTheDocument();
9495
expect(screen.getByText(/35 - 60/i)).toBeInTheDocument();

src/react/src/components/Contribute/ProductionLocationDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ const ProductionLocationDialog = ({
208208
className={classes.leftContainerColumn}
209209
>
210210
<Typography className={classes.label}>
211-
Facility name
211+
Location name
212212
</Typography>
213213
<Typography className={classes.primaryText}>
214214
{productionLocationName ||

src/react/src/components/Contribute/ProductionLocationDialogFields.jsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ const ProductionLocationDialogFields = ({
99
startFrom,
1010
classes,
1111
}) => {
12+
// TODO: Remove transformLabel usage in scope of https://opensupplyhub.atlassian.net/browse/OSDEV-1657
13+
const transformLabel = key => {
14+
switch (key) {
15+
case 'facility_type':
16+
return 'location_type';
17+
default:
18+
return key;
19+
}
20+
};
1221
const formatLabel = key =>
1322
key.replace(/_/g, ' ').replace(/\b\w/g, char => char.toUpperCase());
1423

@@ -63,14 +72,15 @@ const ProductionLocationDialogFields = ({
6372
return (
6473
<>
6574
{map(filteredEntries, ([key, value]) => {
75+
const title = transformLabel(key);
6676
const renderedValue = renderValue(value);
6777
if (!renderedValue) {
6878
return null;
6979
}
7080
return (
71-
<div key={key}>
81+
<div key={title}>
7282
<Typography className={classes.label}>
73-
{formatLabel(key)}
83+
{formatLabel(title)}
7484
</Typography>
7585
<Typography className={classes.primaryText}>
7686
{renderedValue}

0 commit comments

Comments
 (0)