Skip to content

Commit

Permalink
Assb/1414 (#948)
Browse files Browse the repository at this point in the history
* typo on kept-alive option

* rulling out kept alive option when line two in modal is rendered.

* package updated, AC fixed as per comments on JIRA.

* simplified the check from checkbox value.

* removed extra check.
  • Loading branch information
farrukhishaq authored Sep 23, 2024
1 parent b106265 commit 980898f
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 302 deletions.
15 changes: 7 additions & 8 deletions client/components/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,22 @@ const NtsCheckBoxWithModal = (props) => {
};
const customTextMap = {
'set-free': 'Set free',
'kept-alive': 'Kept alive',
'used-in-other-projects': 'Used in other projects'
'kept-alive': 'Kept alive for non-regulated purposes or possible reuse',
'used-in-other-projects': 'Continued use on other projects',
'killed': 'Killed',
'rehomed': 'Rehomed'
};

// Function to prepare modal content
const prepareModalContent = () => {
// Get the formatted selected value or capitalize it if no custom text is found
const selectedOption = selectedValue
? (customTextMap[selectedValue.toString().toLowerCase()] ||
selectedValue.toString().charAt(0).toUpperCase() + selectedValue.toString().slice(1)) : '';
const dynamicLine1 = selectedValue === 'kept-alive'
? 'The Kept alive at the establishment for non-regulated purposes or possible reuse'
: `The '${selectedOption}' at the establishment for non-regulated purposes or possible reuse option will be removed from all protocols.`;
? customTextMap[selectedValue.toString().toLowerCase()]
: '';

return {
h3Bold: `Are you sure you want to deselect this fate?`,
paragraphLine1: dynamicLine1,
paragraphLine1: `The '${selectedOption}' option will be removed from all protocols.`,
paragraphLine2: 'Also, any additional information you entered about this fate will be removed from your application.'
};
};
Expand Down
Loading

0 comments on commit 980898f

Please sign in to comment.