Skip to content

Commit

Permalink
Add rejection email and slack dropdown option due to US sanction (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhx828 authored Oct 16, 2023
1 parent d77e8e2 commit 23a8512
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ public enum MailType {
.templateName("rejectionEmail")
.description("User Rejection")
.titleKey("email.reject.title")
.stringTemplateName("rejectionEmailString.txt)"))
.stringTemplateName("rejectionEmailString.txt"))
, REJECTION_US_SANCTION(new MailTypeBuilder()
.templateName("rejectionUsSanctionEmail")
.description("User Rejection - US Sanction")
.titleKey("email.reject.title")
.stringTemplateName("rejectionUsSanctionEmail.txt"))
, REJECT_ALUMNI_ADDRESS(new MailTypeBuilder()
.templateName("alumniEmailAddress")
.description("Reject - Registered under alumni email address")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public enum ActionId {
, CONFIRM_SEND_LICENSE_OPTIONS_EMAIL("confirm-send-license-options-email")
, SEND_REJECTION_EMAIL("send-rejection-email")
, CONFIRM_SEND_REJECTION_EMAIL("confirm-send-rejection-email")
, SEND_REJECTION_US_SANCTION_EMAIL("send-rejection-us-sanction-email")
, CONFIRM_SEND_REJECTION_US_SANCTION_EMAIL("confirm-send-rejection-us-sanction-email")
, SEND_REJECT_ALUMNI_ADDRESS_EMAIL("send-reject-alumni-address-email")
, CONFIRM_SEND_REJECT_ALUMNI_ADDRESS_EMAIL("confirm-send-reject-alumni-address-email")
, COLLAPSE("collapse")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum BlockId {
, REGISTRATION_INFO_CLARIFICATION_NOTE("registration-info-clarification-note")
, LICENSE_OPTIONS_NOTE("license-options-clarification-note")
, REJECTION_NOTE("rejection-note")
, REJECTION_US_SANCTION_NOTE("rejection-us-sanction-note")
, REJECT_ALUMNI_ADDRESS_NOTE("reject-alumni-address-note")
, APPROVED_NOTE("approved-note")
, TRIAL_ACCOUNT_NOTE("trial-account-note")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,17 @@ public enum DropdownEmailOption {
.modalSubject(ModalEmailSubject.DEFAULT)
.collapsedNote("Sent rejection email")
.expandedNote("The user has been rejected and notified."))
, REJECT_US_SANCTION(new DropdownEmailOptionBuilder()
.blockId(BlockId.REJECTION_US_SANCTION_NOTE)
.actionId(ActionId.SEND_REJECTION_US_SANCTION_EMAIL)
.confirmActionId(ActionId.CONFIRM_SEND_REJECTION_US_SANCTION_EMAIL)
.mailType(MailType.REJECTION_US_SANCTION)
.category(DropdownEmailCategory.DENY)
.dropdownKey("Send US Sanction Rejection Email")
.modalTitle("US Sanction Rejection")
.modalSubject(ModalEmailSubject.DEFAULT)
.collapsedNote("Sent rejection email")
.expandedNote("The user has been rejected and notified."))
, REJECT_ALUMNI_ADDRESS(new DropdownEmailOptionBuilder()
.blockId(BlockId.REJECT_ALUMNI_ADDRESS_NOTE)
.actionId(ActionId.SEND_REJECT_ALUMNI_ADDRESS_EMAIL)
Expand Down Expand Up @@ -292,6 +303,11 @@ public DropdownEmailOptionBuilder isNotModalEmail() {
return this;
}

/**
*
* @param modalTitle Title showing in the slack modal. It cannot be longer than 25 characters.
* @return
*/
public DropdownEmailOptionBuilder modalTitle(String modalTitle) {
this.modalTitle = Optional.ofNullable(modalTitle);
return this;
Expand Down
22 changes: 22 additions & 0 deletions src/main/resources/templates/mail/rejectionUsSanctionEmail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="#{email.reject.title(${license})}"></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="shortcut icon" th:href="@{|${baseUrl}/favicon.ico|}" />
</head>
<body>
<p th:text="'Dear ' + ${user.firstName} + ' ' + ${user.lastName} + ','"></p>

<p th:text="'Thank you for your interest in the ' + ${license} + ' license for OncoKB.'"></p>

<p>Due to U.S. regulatory requirements, we are restricted from granting the license to certain foreign jurisdictions, including yours. Accordingly, we are unable to grant your license request, but thank you for your interest in OncoKB.</p>

<p>If you feel you have received this message in error, please contact us.</p>

<p>
<div th:text="#{email.closing}">Sincerely,</div>
<div th:text="#{email.signature}">The OncoKB Team</div>
</p>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Due to U.S. regulatory requirements, we are restricted from granting the license to certain foreign jurisdictions, including yours. Accordingly, we are unable to grant your license request, but thank you for your interest in OncoKB.

If you feel you have received this message in error, please contact us.

0 comments on commit 23a8512

Please sign in to comment.