Skip to content

fix: Implement functionality for admin to edit tooltips#2633

Merged
entrotech merged 6 commits into
developfrom
admin_edit_tooltips
Sep 12, 2025
Merged

fix: Implement functionality for admin to edit tooltips#2633
entrotech merged 6 commits into
developfrom
admin_edit_tooltips

Conversation

@HyMike

@HyMike HyMike commented Sep 7, 2025

Copy link
Copy Markdown
Member

What changes did you make?

The server side:

-Added a stored procedure CalculationRule_UpdateDescription that updates only the description column of the CalculationRule table

-Added an endpoint for a PUT request to url /api/calculations/updatedescription/:id by creating the router, contoller method and service method to execute the stored procedure.

The client side:
-Created a new method in the calculation.service module called updateDescription. that calls the above api.

-Added code for admin tooltip UI functionality to AccordionToolTip, RuleLabel, RuleStrategy and RuleInput.

-Added a hook file, useToolTipEditor.

Why did you make the changes (we will use this info to test)?

-Admin users need the ability to edit the tooltip text in the calculator pages (1-4). So that they can update the information related to Strategies and Input fields that define a project (e.g., APN number).

  • All the users on website have the ability to view tooltips on fields:

The "i" icon shows a Tooltip exists on a field
Clicking on the icon opens the Tooltip with related information
However Admin users need ability to modify the tooltips. We need to create mockups for the different actions admin user can take on tooltips:

-View existing tooltips
-Add a new tooltip if it does not exist
-Edit the tooltip

Please review issue 1903 for more details on UI:

Implement the designs created in 1903

Issue-Specific User Account

Admin Account

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied Screenshot 2025-09-07 at 2 51 15 PM
Visuals after changes are applied
  • Adding Icon when tooltip (description) is empty.
Screenshot 2025-09-07 at 2 58 34 PM
  • Editing modal is enable when the adding icon is press.
Screenshot 2025-09-07 at 2 58 55 PM
  • Editing button for tooltip is present in the tooltip box and allows for editing of current tooltip.
Screenshot 2025-09-07 at 2 56 53 PM
  • Editing Modal with Added additional icons (bold, underline, strikethrough, bulleted list, numbered list)
Screenshot 2025-09-07 at 2 56 48 PM

@HyMike HyMike added role: front-end Front End Developer role: back-end Node/Express Development Task labels Sep 7, 2025

@entrotech entrotech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few more things that need to be done to finish this issue. The accordion tooltips were not working at all on Page 2 of the Wizard, due to a bug not really related to your changes, but some of the changes you made also needed to be made to different components used on page 2. I had to do some experimentation to fix Page 2 tooltips, and will merge another PR after this one to fix those.

Also, the plus icon next to the label and the pencil icon on the tootip are still displayed if the user is not an admin, which allows the tooltip edit dialog to appear. Fortunately, if you try to make changes to the tooltip and save them the web api security prevents the change from actually being made. I'll create a follow-up issue to fix this.

@entrotech
entrotech merged commit 584865b into develop Sep 12, 2025
4 checks passed
@entrotech
entrotech deleted the admin_edit_tooltips branch September 12, 2025 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

role: back-end Node/Express Development Task role: front-end Front End Developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement functionality for admin to edit tooltips

2 participants