Skip to content

Commit

Permalink
typo on kept-alive option (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
farrukhishaq authored Sep 23, 2024
1 parent c4b4ca9 commit b106265
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 186 deletions.
16 changes: 14 additions & 2 deletions client/components/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,25 @@ const NtsCheckBoxWithModal = (props) => {
const handleCancelModal = () => {
setShowModal(false);
};
const customTextMap = {
'set-free': 'Set free',
'kept-alive': 'Kept alive',
'used-in-other-projects': 'Used in other projects'
};

// Function to prepare modal content
const prepareModalContent = () => {
const selectedOption = selectedValue ? selectedValue.toString().charAt(0).toUpperCase() + selectedValue.toString().slice(1) : '';
// 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.`;

return {
h3Bold: `Are you sure you want to deselect this fate?`,
paragraphLine1: `The '${selectedOption}' at the establishment for non-regulated purposes or possible reuse option will be removed from all protocols.`,
paragraphLine1: dynamicLine1,
paragraphLine2: 'Also, any additional information you entered about this fate will be removed from your application.'
};
};
Expand Down
Loading

0 comments on commit b106265

Please sign in to comment.