From 6ed831a13cbf863d677bec6fcdc3d86caf6f06b3 Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Thu, 27 Feb 2025 10:55:26 +0100 Subject: [PATCH 01/11] removed tooltips for all statuses of moderation event for claim button --- .../Dashboard/DashboardContributionRecord.jsx | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/react/src/components/Dashboard/DashboardContributionRecord.jsx b/src/react/src/components/Dashboard/DashboardContributionRecord.jsx index f592bfee0..a328e7a23 100644 --- a/src/react/src/components/Dashboard/DashboardContributionRecord.jsx +++ b/src/react/src/components/Dashboard/DashboardContributionRecord.jsx @@ -180,24 +180,6 @@ const DashboardContributionRecord = ({ const isDisabled = moderationEventStatus === MODERATION_STATUSES_ENUM.REJECTED || moderationEventStatus === MODERATION_STATUSES_ENUM.APPROVED; - let claimButtonTooltipText = ''; - - switch (moderationEventStatus) { - case MODERATION_STATUSES_ENUM.PENDING: - claimButtonTooltipText = - 'A production location must be created before it can receive a claim request.'; - break; - case MODERATION_STATUSES_ENUM.APPROVED: - claimButtonTooltipText = - "Production location hasn't received a claim yet."; - break; - case MODERATION_STATUSES_ENUM.REJECTED: - claimButtonTooltipText = - 'Moderation event has been rejected, no claim request available.'; - break; - default: - break; - } return ( <> @@ -433,11 +415,7 @@ const DashboardContributionRecord = ({ {claimButtonTitle} ) : ( - + claimButtonDisabled(classes) )} From d1fb760948a97f7e8b8aa228cebbda83e06861cb Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Thu, 27 Feb 2025 11:21:40 +0100 Subject: [PATCH 02/11] changed tooltip message acording to the design on Thanks for adding data pop-up --- .../src/components/Contribute/ProductionLocationDialog.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/react/src/components/Contribute/ProductionLocationDialog.jsx b/src/react/src/components/Contribute/ProductionLocationDialog.jsx index 33db7ae94..6b19e07e4 100644 --- a/src/react/src/components/Contribute/ProductionLocationDialog.jsx +++ b/src/react/src/components/Contribute/ProductionLocationDialog.jsx @@ -75,10 +75,8 @@ const getTooltipText = claimStatus => { if (claimStatus === PRODUCTION_LOCATION_CLAIM_STATUSES_ENUM.CLAIMED) { return 'Production location has been claimed already.'; } - if (claimStatus === PRODUCTION_LOCATION_CLAIM_STATUSES_ENUM.PENDING) { - return "You'll be able to claim the location after the moderation is done"; - } - return 'Claim is not available.'; + + return "You'll be able to claim the location after the moderation is done."; }; const ProductionLocationDialog = ({ From 140170b77eb0b81b3d48d82fbfee1053e1e15ae3 Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Thu, 27 Feb 2025 11:26:56 +0100 Subject: [PATCH 03/11] added task description --- doc/release/RELEASE-NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index 957406e59..3d4f4e727 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -28,6 +28,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html * [OSDEV-1747](https://opensupplyhub.atlassian.net/browse/OSDEV-1747) - All SLC pages have been made accessible only to authorized users. * [OSDEV-1777](https://opensupplyhub.atlassian.net/browse/OSDEV-1777) - A consistent URL style was established across all pages of the SLC workflow. After the changes, the URL begins from `/contribute/single-location/`. * [OSDEV-1678](https://opensupplyhub.atlassian.net/browse/OSDEV-1678) - Added asterisks next to each required form field (Name, Address, and Country) on the "Production Location Information" page. Highlighted an empty field and displayed an error message if it loses focus. +* [OSDEV-1787](https://opensupplyhub.atlassian.net/browse/OSDEV-1787) - The tooltip messages 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. ### What's new * *Describe what's new here. The changes that can impact user experience should be listed in this section.* From e008f8b8f29a0a1816c2fa54e109a0ce3bdb3cf9 Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Thu, 27 Feb 2025 12:52:10 +0100 Subject: [PATCH 04/11] added test no tooltip --- doc/release/RELEASE-NOTES.md | 2 +- .../components/DashboardContributionRecord.test.js | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index 3d4f4e727..96e35a11e 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -28,7 +28,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html * [OSDEV-1747](https://opensupplyhub.atlassian.net/browse/OSDEV-1747) - All SLC pages have been made accessible only to authorized users. * [OSDEV-1777](https://opensupplyhub.atlassian.net/browse/OSDEV-1777) - A consistent URL style was established across all pages of the SLC workflow. After the changes, the URL begins from `/contribute/single-location/`. * [OSDEV-1678](https://opensupplyhub.atlassian.net/browse/OSDEV-1678) - Added asterisks next to each required form field (Name, Address, and Country) on the "Production Location Information" page. Highlighted an empty field and displayed an error message if it loses focus. -* [OSDEV-1787](https://opensupplyhub.atlassian.net/browse/OSDEV-1787) - The tooltip messages 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. +* [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. ### What's new * *Describe what's new here. The changes that can impact user experience should be listed in this section.* diff --git a/src/react/src/__tests__/components/DashboardContributionRecord.test.js b/src/react/src/__tests__/components/DashboardContributionRecord.test.js index df3ec4c88..75f3b100a 100644 --- a/src/react/src/__tests__/components/DashboardContributionRecord.test.js +++ b/src/react/src/__tests__/components/DashboardContributionRecord.test.js @@ -1,6 +1,6 @@ import React from 'react'; import { BrowserRouter as Router, useHistory } from 'react-router-dom'; -import { waitFor } from '@testing-library/react'; +import { waitFor, fireEvent } from '@testing-library/react'; import DashboardContributionRecord from '../../components/Dashboard/DashboardContributionRecord'; import renderWithProviders from '../../util/testUtils/renderWithProviders'; import { @@ -277,11 +277,21 @@ describe('DashboardContributionRecord component', () => { }, ], }; - + const { reduxStore } = renderComponent(); reduxStore.dispatch(completeFetchPotentialMatches(matches)); const res = reduxStore.getState().dashboardContributionRecord.potentialMatches.matches expect(res.length).toBe(3); }); + + test('no tooltip on hover Go to Claim Button', () => { + const { getByRole} = renderComponent(preloadedState); + const button = getByRole('button', { name: 'Go to Claim'}); + + fireEvent.mouseOver(button); + const tooltip = document.querySelector('[aria-describedby^="mui-tooltip-"]'); + + expect(tooltip).not.toBeInTheDocument(); + }); }); From 5f338f1ed126d357e5a0775795b59c30cc852dd4 Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Thu, 27 Feb 2025 15:40:45 +0100 Subject: [PATCH 05/11] removed indent --- .../src/__tests__/components/DashboardContributionRecord.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/react/src/__tests__/components/DashboardContributionRecord.test.js b/src/react/src/__tests__/components/DashboardContributionRecord.test.js index 75f3b100a..7b5a7a435 100644 --- a/src/react/src/__tests__/components/DashboardContributionRecord.test.js +++ b/src/react/src/__tests__/components/DashboardContributionRecord.test.js @@ -277,7 +277,6 @@ describe('DashboardContributionRecord component', () => { }, ], }; - const { reduxStore } = renderComponent(); reduxStore.dispatch(completeFetchPotentialMatches(matches)); From 0b89340d3c0794b592f66bbd6488a34b415f347d Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Fri, 28 Feb 2025 13:14:51 +0100 Subject: [PATCH 06/11] remobed test --- .../components/DashboardContributionRecord.test.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/react/src/__tests__/components/DashboardContributionRecord.test.js b/src/react/src/__tests__/components/DashboardContributionRecord.test.js index 7b5a7a435..2b4f168cd 100644 --- a/src/react/src/__tests__/components/DashboardContributionRecord.test.js +++ b/src/react/src/__tests__/components/DashboardContributionRecord.test.js @@ -283,14 +283,4 @@ describe('DashboardContributionRecord component', () => { const res = reduxStore.getState().dashboardContributionRecord.potentialMatches.matches expect(res.length).toBe(3); }); - - test('no tooltip on hover Go to Claim Button', () => { - const { getByRole} = renderComponent(preloadedState); - const button = getByRole('button', { name: 'Go to Claim'}); - - fireEvent.mouseOver(button); - const tooltip = document.querySelector('[aria-describedby^="mui-tooltip-"]'); - - expect(tooltip).not.toBeInTheDocument(); - }); }); From 13721f6ef4a045a5d646d228c7269df32962396c Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Fri, 28 Feb 2025 13:24:17 +0100 Subject: [PATCH 07/11] removed unused import --- .../__tests__/components/DashboardContributionRecord.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/react/src/__tests__/components/DashboardContributionRecord.test.js b/src/react/src/__tests__/components/DashboardContributionRecord.test.js index 2b4f168cd..274d69ae8 100644 --- a/src/react/src/__tests__/components/DashboardContributionRecord.test.js +++ b/src/react/src/__tests__/components/DashboardContributionRecord.test.js @@ -1,6 +1,6 @@ import React from 'react'; import { BrowserRouter as Router, useHistory } from 'react-router-dom'; -import { waitFor, fireEvent } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; import DashboardContributionRecord from '../../components/Dashboard/DashboardContributionRecord'; import renderWithProviders from '../../util/testUtils/renderWithProviders'; import { From 336fc026ffac2fa39a615566a0bf906e3e0f42fc Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Wed, 5 Mar 2025 08:42:35 +0100 Subject: [PATCH 08/11] returned tooltip for pending status, edited release notes --- doc/release/RELEASE-NOTES.md | 33 ++++++++++++++++++- .../Contribute/ProductionLocationDialog.jsx | 3 ++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index 893b96614..f22e29604 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). The format is based on the `RELEASE-NOTES-TEMPLATE.md` file. +## Release 1.32.0 + +## Introduction +* Product name: Open Supply Hub +* Release date: March 22, 2025 + +### Database changes +* *Describe high-level database changes.* + +#### Migrations: +* *Describe migrations here.* + +#### Schema changes +* *Describe schema changes here.* + +### Code/API changes +* *Describe code/API changes here.* + +### Architecture/Environment changes +* *Describe architecture/environment changes here.* + +### Bugfix +* [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. + + +### What's new +* *Describe what's new here. The changes that can impact user experience should be listed in this section.* + +### Release instructions: +* *Provide release instructions here.* + + ## Release 1.31.0 ## Introduction @@ -29,7 +61,6 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html * [OSDEV-1777](https://opensupplyhub.atlassian.net/browse/OSDEV-1777) - A consistent URL style was established across all pages of the SLC workflow. After the changes, the URL begins from `/contribute/single-location/`. * [OSDEV-1678](https://opensupplyhub.atlassian.net/browse/OSDEV-1678) - Added asterisks next to each required form field (Name, Address, and Country) on the "Production Location Information" page. Highlighted an empty field and displayed an error message if it loses focus. * [OSDEV-1778](https://opensupplyhub.atlassian.net/browse/OSDEV-1778) - Fixed the validation for number of workers field in POST, PATCH production locations API. The min field must be less than or equal to the max field. -* [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. ### What's new * [OSDEV-1764](https://opensupplyhub.atlassian.net/browse/OSDEV-1764) - Added a new claiming email for the Moderation queue/SLC workflow, which is sent once a data moderator creates a new location based on the moderation event the customer submitted through the SLC workflow. diff --git a/src/react/src/components/Contribute/ProductionLocationDialog.jsx b/src/react/src/components/Contribute/ProductionLocationDialog.jsx index 6b19e07e4..45fa49f72 100644 --- a/src/react/src/components/Contribute/ProductionLocationDialog.jsx +++ b/src/react/src/components/Contribute/ProductionLocationDialog.jsx @@ -75,6 +75,9 @@ const getTooltipText = claimStatus => { if (claimStatus === PRODUCTION_LOCATION_CLAIM_STATUSES_ENUM.CLAIMED) { return 'Production location has been claimed already.'; } + if (claimStatus === PRODUCTION_LOCATION_CLAIM_STATUSES_ENUM.PENDING) { + return 'There is a pending calm for this production location.'; + } return "You'll be able to claim the location after the moderation is done."; }; From b1e82f1b30d096436068df1665538c711f07fafe Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Wed, 5 Mar 2025 10:56:26 +0100 Subject: [PATCH 09/11] fixed typo --- .../src/components/Contribute/ProductionLocationDialog.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/react/src/components/Contribute/ProductionLocationDialog.jsx b/src/react/src/components/Contribute/ProductionLocationDialog.jsx index 45fa49f72..dc762c71f 100644 --- a/src/react/src/components/Contribute/ProductionLocationDialog.jsx +++ b/src/react/src/components/Contribute/ProductionLocationDialog.jsx @@ -76,7 +76,7 @@ const getTooltipText = claimStatus => { return 'Production location has been claimed already.'; } if (claimStatus === PRODUCTION_LOCATION_CLAIM_STATUSES_ENUM.PENDING) { - return 'There is a pending calm for this production location.'; + return 'There is a pending claim for this production location.'; } return "You'll be able to claim the location after the moderation is done."; From 7aa60093cb1f9e1ff8534d7d643fbe8773f51eb7 Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Wed, 5 Mar 2025 11:01:46 +0100 Subject: [PATCH 10/11] removed unnessecary changes in release notes --- doc/release/RELEASE-NOTES.md | 16 ---------------- .../DashboardContributionRecord.test.js | 1 + 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index 07430ca57..1955d0f19 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -10,22 +10,6 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html * Product name: Open Supply Hub * Release date: March 22, 2025 -<<<<<<< HEAD -### Database changes -* *Describe high-level database changes.* - -#### Migrations: -* *Describe migrations here.* - -#### Schema changes -* *Describe schema changes here.* - -### Code/API changes -* *Describe code/API changes here.* - -### Architecture/Environment changes -* *Describe architecture/environment changes here.* - ### Bugfix * [OSDEV-1806](https://opensupplyhub.atlassian.net/browse/OSDEV-1806) - Refactored the Parent Company field validation. The field is now validated as a regular character field. * [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. diff --git a/src/react/src/__tests__/components/DashboardContributionRecord.test.js b/src/react/src/__tests__/components/DashboardContributionRecord.test.js index 274d69ae8..a10569ab0 100644 --- a/src/react/src/__tests__/components/DashboardContributionRecord.test.js +++ b/src/react/src/__tests__/components/DashboardContributionRecord.test.js @@ -277,6 +277,7 @@ describe('DashboardContributionRecord component', () => { }, ], }; + const { reduxStore } = renderComponent(); reduxStore.dispatch(completeFetchPotentialMatches(matches)); From 1bb825445602259d76766637c903cbdc4a522640 Mon Sep 17 00:00:00 2001 From: Inessa Druzhkova Date: Wed, 5 Mar 2025 11:47:58 +0100 Subject: [PATCH 11/11] removed indent --- doc/release/RELEASE-NOTES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index 1955d0f19..c18866c08 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -5,7 +5,6 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html ## Release 1.32.0 - ## Introduction * Product name: Open Supply Hub * Release date: March 22, 2025