Need to change the description while submit the assessement in advance risk

siddhantgaure
Tera Contributor

Hi everyone I'm working in risk workspace while submitting the advance risk assessment I'm getting the description as below i want to change that but I'm not able to find that UI action. below sharing the screenshot of what  assessment on submit option i need to change the highlighted text where I should find it new test.png

1 ACCEPTED SOLUTION

Murthy Ch
Giga Sage

Hi @siddhantgaure 

The current page (risk-assessment-main) which is in screenshot is part of 'ARA Workspace'. So, whenever you click on Submit the event which is attached to the button will call the data broker and validate the risk assessment and then it will update the page values. Once, that is done it will call the (risk-assessment-modal) page in this client script (Validate and open submit modal). So, after opening the modal we have another client script into that which is (update labels) where this is actually configured.

/**
 * @param {params} params
 * @param {api} params.api
 * @param {any} params.event
 * @param {any} params.imports
 * @param {ApiHelpers} params.helpers
 */
async function evaluateProperty({api, helpers}) {
  let commentsHeading = '';
  let successMessage = '';
  let headerMessage = await helpers.translate("Add comments");

  if (api.context.props.modalType == "approve") {
      commentsHeading = await helpers.translate("Would you like to share additional thoughts on the assessment?");
      successMessage = await helpers.translate("The assessment is approved successfully.");
      headerMessage = await helpers.translate("Assessment approved.");
  } else if (api.context.props.modalType == "request_approval") {
      commentsHeading = await helpers.translate("Assessment will be sent for review and approval if the criteria is met or would get directly published if no approvals are needed.");
      headerMessage = await helpers.translate("Submit assessment");
  } else if (api.context.props.modalType == "request_reassessment") {
      commentsHeading = await helpers.translate("Do you want to provide the assessor with a reason for rejecting a assessment?");
      successMessage = await helpers.translate("The assessment is rejected and reassigned to assessor successfully.");
      headerMessage = await helpers.translate("Assessment rejected");
  } else if ((api.context.props.modalType == "mark_complete")) {
      commentsHeading = await helpers.translate("Would you like to share additional thoughts before marking it as complete?");
      successMessage = await helpers.translate("The assessment is marked complete successfully.");
      headerMessage = await helpers.translate("Assessment completion successful");
  }

  api.setState('commentsHeading', commentsHeading);
  api.setState('successMessage',successMessage);
  api.setState('headerMesssg',headerMessage);
}

 

As you are the requesting to the approval, you need to change the commentsHeading in that specific 'if' block. Attached the screenshots for your reference.

 

MurthyCh_0-1755638321956.png

MurthyCh_1-1755638389595.png

Let me know if you need more help on this. Happy to guide you

Thanks,
Murthy

View solution in original post

4 REPLIES 4

Murthy Ch
Giga Sage

Hi @siddhantgaure 

The current page (risk-assessment-main) which is in screenshot is part of 'ARA Workspace'. So, whenever you click on Submit the event which is attached to the button will call the data broker and validate the risk assessment and then it will update the page values. Once, that is done it will call the (risk-assessment-modal) page in this client script (Validate and open submit modal). So, after opening the modal we have another client script into that which is (update labels) where this is actually configured.

/**
 * @param {params} params
 * @param {api} params.api
 * @param {any} params.event
 * @param {any} params.imports
 * @param {ApiHelpers} params.helpers
 */
async function evaluateProperty({api, helpers}) {
  let commentsHeading = '';
  let successMessage = '';
  let headerMessage = await helpers.translate("Add comments");

  if (api.context.props.modalType == "approve") {
      commentsHeading = await helpers.translate("Would you like to share additional thoughts on the assessment?");
      successMessage = await helpers.translate("The assessment is approved successfully.");
      headerMessage = await helpers.translate("Assessment approved.");
  } else if (api.context.props.modalType == "request_approval") {
      commentsHeading = await helpers.translate("Assessment will be sent for review and approval if the criteria is met or would get directly published if no approvals are needed.");
      headerMessage = await helpers.translate("Submit assessment");
  } else if (api.context.props.modalType == "request_reassessment") {
      commentsHeading = await helpers.translate("Do you want to provide the assessor with a reason for rejecting a assessment?");
      successMessage = await helpers.translate("The assessment is rejected and reassigned to assessor successfully.");
      headerMessage = await helpers.translate("Assessment rejected");
  } else if ((api.context.props.modalType == "mark_complete")) {
      commentsHeading = await helpers.translate("Would you like to share additional thoughts before marking it as complete?");
      successMessage = await helpers.translate("The assessment is marked complete successfully.");
      headerMessage = await helpers.translate("Assessment completion successful");
  }

  api.setState('commentsHeading', commentsHeading);
  api.setState('successMessage',successMessage);
  api.setState('headerMesssg',headerMessage);
}

 

As you are the requesting to the approval, you need to change the commentsHeading in that specific 'if' block. Attached the screenshots for your reference.

 

MurthyCh_0-1755638321956.png

MurthyCh_1-1755638389595.png

Let me know if you need more help on this. Happy to guide you

Thanks,
Murthy

siddhantgaure
Tera Contributor

hi @Murthy Ch   thank you for your help. this is working. but for our environment the ARA workspace is not visible to use what changes i should do to make that visible in my workspace list.

@siddhantgaure 

ARA workspace is part of advanced risk application and I believe you have that plugin in your instance.

So, go to UI Builder under Now Experience Framework and go to Experiences then search for 'ARA Workspace' like below screenshot: In that you can see Pages and variants

MurthyCh_0-1755787516024.png

 

Thanks,
Murthy

Murthy Ch
Giga Sage

@siddhantgaure 
I just realized we have a 'Risk Workspace' experience as well and it has almost same page and variants. Please update the code in that experience. Let me know if you need help.

 

Thanks,
Murthy