Skip to content

Commit

Permalink
Merge branch 'main' into OSDEV-1744-displayed-empty-user-id
Browse files Browse the repository at this point in the history
# Conflicts:
#	doc/release/RELEASE-NOTES.md
  • Loading branch information
roman-stolar committed Feb 17, 2025
2 parents ecb654f + a422e7b commit 7683e1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/release/RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
* [OSDEV-1653](https://opensupplyhub.atlassian.net/browse/OSDEV-1653) - Added asterisks next to each required form field (Name, Address, and Country) on the "Search by Name and Address" tab. Highlighted an empty field and displayed an error message if it loses focus. Added proper styles for the error messages.
* [OSDEV-1699](https://opensupplyhub.atlassian.net/browse/OSDEV-1699) - The scroll position has been fixed from the bottom to the top after navigating from the bottom of the `Search results` page (press the `Select` button) to `Product Location Information`.
* [OSDEV-1589](https://opensupplyhub.atlassian.net/browse/OSDEV-1589) - Fixed layout issue on new `contribute` page.
* [OSDEV-1739](https://opensupplyhub.atlassian.net/browse/OSDEV-1739) - Applied state cleanup on modal unmount to prevent the same dialog from appearing when clicking on a different production location.
* [OSDEV-1744](https://opensupplyhub.atlassian.net/browse/OSDEV-1744) - Fixed the issue where the text `by user ID:` appeared even when `user_id` was `null` in Contribution Record page.

### What's new
Expand Down
11 changes: 9 additions & 2 deletions src/react/src/components/Contribute/ProductionLocationInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,21 @@ const ProductionLocationInfo = ({
moderationID,
]);

useEffect(
() => () => {
handleCleanupContributionRecord();
handleResetPendingModerationEvent();
handleResetSingleProductionLocation();
},
[],
);

useEffect(() => {
if (!isEmpty(singleProductionLocationError)) {
toast(singleProductionLocationError[0]);
}
}, [singleProductionLocationError]);

useEffect(() => () => handleResetSingleProductionLocation(), []);

return (
<>
<div className={classes.mainContainerStyles}>
Expand Down

0 comments on commit 7683e1c

Please sign in to comment.