-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BE:FSADT-745): updating mail template (#491)
* no message * no message * FSADT1794 * feat:(BE:FSADT1-745): changing mail template contents * chore: removing unused files * chore: updating templates * chore: updating templates --------- Co-authored-by: Maria Martinez <[email protected]> Co-authored-by: Maria Martinez <[email protected]>
- Loading branch information
1 parent
d84e41f
commit 3a47345
Showing
19 changed files
with
302 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,14 @@ public Flux<ClientListSubmissionDto> listSubmissions( | |
implementation = String.class, | ||
example = "[email protected]" | ||
) | ||
), | ||
@Header( | ||
name = ApplicationConstant.USERNAME_HEADER, | ||
description = "The name of the submitter who is making the submission", | ||
schema = @Schema( | ||
implementation = String.class, | ||
example = "Joe Doe" | ||
) | ||
) | ||
} | ||
) | ||
|
@@ -132,13 +140,14 @@ public Mono<Void> submit( | |
@RequestBody ClientSubmissionDto request, | ||
@RequestHeader(ApplicationConstant.USERID_HEADER) String userId, | ||
@RequestHeader(ApplicationConstant.USERMAIL_HEADER) String userEmail, | ||
@RequestHeader(ApplicationConstant.USERNAME_HEADER) String userName, | ||
ServerHttpResponse serverResponse) { | ||
return Mono.just(request) | ||
.switchIfEmpty( | ||
Mono.error(new InvalidRequestObjectException("no request body was provided")) | ||
) | ||
.doOnNext(this::validate) | ||
.flatMap(submissionDto -> clientService.submit(submissionDto,userId,userEmail)) | ||
.flatMap(submissionDto -> clientService.submit(submissionDto, userId, userEmail, userName)) | ||
.doOnNext(submissionId -> | ||
serverResponse | ||
.getHeaders() | ||
|
25 changes: 10 additions & 15 deletions
25
backend/src/main/java/ca/bc/gov/app/dto/client/ClientBusinessInformationDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
package ca.bc.gov.app.dto.client; | ||
|
||
import java.util.Map; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
public record ClientBusinessInformationDto( | ||
String incorporationNumber, | ||
String businessName, | ||
String businessType, | ||
String clientType, | ||
String goodStanding, | ||
String legalType | ||
) { | ||
public record ClientBusinessInformationDto(String incorporationNumber, String businessName, | ||
String businessType, String clientType, String goodStanding, String legalType) { | ||
public Map<String, Object> description() { | ||
return Map.of( | ||
"incorporation", incorporationNumber, | ||
"name", businessName, | ||
"businessType", businessType, | ||
"clientType", clientType, | ||
"legalType", legalType, | ||
"goodStanding", goodStanding | ||
); | ||
"incorporation", StringUtils.isBlank(incorporationNumber) ? "" : incorporationNumber, | ||
"name", StringUtils.isBlank(businessName) ? "" : businessName, | ||
"businessType", StringUtils.isBlank(businessType) ? "" : businessType, | ||
"clientType", StringUtils.isBlank(clientType) ? "" : clientType, | ||
"legalType", StringUtils.isBlank(legalType) ? "" : legalType, | ||
"goodStanding", StringUtils.isBlank(goodStanding) ? "" : goodStanding | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ public ChesCommonServicesService( | |
* @throws InvalidAccessTokenException if the authorization token is invalid or expired | ||
* @throws InvalidRoleException if does not have the required role to perform the requested action | ||
*/ | ||
public Mono<String> sendEmail(ChesRequest requestContent) { | ||
public Mono<String> sendEmail(ChesRequest requestContent, String subject) { | ||
|
||
if (requestContent == null) { | ||
return Mono.error(new InvalidRequestObjectException("no request body was provided")); | ||
|
@@ -91,7 +91,7 @@ public Mono<String> sendEmail(ChesRequest requestContent) { | |
ChesMailEncoding.UTF_8, | ||
"[email protected]", | ||
ChesMailPriority.NORMAL, | ||
"Forest Client Application Confirmation", | ||
subject, | ||
null, | ||
request.emailTo() | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,7 @@ ca: | |
- x-sub-id | ||
- x-user-id | ||
- x-user-email | ||
- x-user-name | ||
methods: | ||
- OPTIONS | ||
- GET | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<head> | ||
<meta charset="utf-8"> | ||
<!-- utf-8 works for most cases --> | ||
<meta name="viewport" content="width=device-width"> | ||
<!-- Forcing initial-scale shouldn't be necessary --> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<!-- Use the latest (edge) version of IE rendering engine --> | ||
<meta name="x-apple-disable-message-reformatting"> | ||
<!-- Disable auto-scale in iOS 10 Mail entirely --> | ||
<title></title> | ||
<!-- The title tag shows in email notifications, like Android 4.4. --> | ||
|
||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" | ||
rel="stylesheet"> | ||
|
||
<!-- CSS Reset : BEGIN --> | ||
<style> | ||
|
||
/* What it does: Remove spaces around the email design added by some email clients. */ | ||
/* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */ | ||
html, body { | ||
margin: 0 auto !important; | ||
padding: 0 !important; | ||
height: 100% !important; | ||
width: 100% !important; | ||
} | ||
|
||
/* What it does: Stops email clients resizing small text. */ | ||
* { | ||
-ms-text-size-adjust: 100%; | ||
-webkit-text-size-adjust: 100%; | ||
} | ||
|
||
/* What it does: Centers email on Android 4.4 */ | ||
div[style*="margin: 16px 0"] { | ||
margin: 0 !important; | ||
} | ||
|
||
/* What it does: Stops Outlook from adding extra spacing to tables. */ | ||
table, td { | ||
mso-table-lspace: 0pt !important; | ||
mso-table-rspace: 0pt !important; | ||
} | ||
|
||
/* What it does: Fixes webkit padding issue. */ | ||
table { | ||
border-spacing: 0 !important; | ||
border-collapse: collapse !important; | ||
table-layout: fixed !important; | ||
margin: 0 auto !important; | ||
} | ||
|
||
/* What it does: Uses a better rendering method when resizing images in IE. */ | ||
img { | ||
-ms-interpolation-mode: bicubic; | ||
} | ||
|
||
/* What it does: A work-around for email clients meddling in triggered links. */ | ||
*[x-apple-data-detectors], /* iOS */ .unstyle-auto-detected-links *, | ||
.aBn { | ||
border-bottom: 0 !important; | ||
cursor: default !important; | ||
color: inherit !important; | ||
text-decoration: none !important; | ||
font-size: inherit !important; | ||
font-family: inherit !important; | ||
font-weight: inherit !important; | ||
line-height: inherit !important; | ||
} | ||
|
||
/* What it does: Prevents Gmail from displaying a download button on large, non-linked images. */ | ||
.a6S { | ||
display: none !important; | ||
opacity: 0.01 !important; | ||
} | ||
|
||
/* What it does: Prevents Gmail from changing the text color in conversation threads. */ | ||
.im { | ||
color: inherit !important; | ||
} | ||
|
||
/* If the above doesn't work, add a .g-img class to any image in question. */ | ||
img.g-img+div { | ||
display: none !important; | ||
} | ||
|
||
/* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */ | ||
/* Create one of these media queries for each additional viewport size you'd like to fix */ | ||
|
||
/* iPhone 4, 4S, 5, 5S, 5C, and 5SE */ | ||
@media only screen and (min-device-width: 320px) and (max-device-width: | ||
374px) { | ||
u ~ div .email-container { | ||
min-width: 320px !important; | ||
} | ||
} | ||
/* iPhone 6, 6S, 7, 8, and X */ | ||
@media only screen and (min-device-width: 375px) and (max-device-width: | ||
413px) { | ||
u ~ div .email-container { | ||
min-width: 375px !important; | ||
} | ||
} | ||
/* iPhone 6+, 7+, and 8+ */ | ||
@media only screen and (min-device-width: 414px) { | ||
u ~ div .email-container { | ||
min-width: 414px !important; | ||
} | ||
} | ||
</style> | ||
|
||
<!-- CSS Reset : END --> | ||
|
||
<!-- Progressive Enhancements : BEGIN --> | ||
<style> | ||
body { | ||
font-family: 'BCSans', 'Noto Sans', Verdana, Arial, sans-serif; | ||
font-weight: 400; | ||
font-size: 16px; | ||
line-height: 1.8; | ||
} | ||
|
||
a { | ||
color: #0073E6; | ||
} | ||
|
||
p { | ||
margin: 0px; | ||
} | ||
</style> | ||
</head> |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.