-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1057 from Enterprise-CMCS/main
Release to val
- Loading branch information
Showing
11 changed files
with
128 additions
and
107 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
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 |
---|---|---|
@@ -1,26 +1,48 @@ | ||
import { EmailAddresses, Events } from "shared-types"; | ||
import { Authority, EmailAddresses, Events } from "shared-types"; | ||
import { CommonEmailVariables } from "shared-types"; | ||
import { UserTypeOnlyTemplate } from "../.."; | ||
import { AuthoritiesWithUserTypesTemplate } from "../.."; | ||
import { render } from "@react-email/render"; | ||
import { TempExtCMSEmail, TempExtStateEmail } from "./emailTemplates"; | ||
|
||
export const tempExtention: UserTypeOnlyTemplate = { | ||
cms: async ( | ||
variables: Events["TemporaryExtension"] & CommonEmailVariables & { emails: EmailAddresses }, | ||
) => { | ||
return { | ||
to: variables.emails.osgEmail, | ||
subject: `${variables.authority} Waiver Extension ${variables.id} Submitted`, | ||
body: await render(<TempExtCMSEmail variables={variables} />), | ||
}; | ||
export const tempExtension: AuthoritiesWithUserTypesTemplate = { | ||
[Authority["1915b"]]: { | ||
cms: async ( | ||
variables: Events["TemporaryExtension"] & CommonEmailVariables & { emails: EmailAddresses }, | ||
) => { | ||
return { | ||
to: variables.emails.osgEmail, | ||
subject: `${variables.authority} Waiver Extension ${variables.id} Submitted`, | ||
body: await render(<TempExtCMSEmail variables={variables} />), | ||
}; | ||
}, | ||
state: async ( | ||
variables: Events["TemporaryExtension"] & CommonEmailVariables & { emails: EmailAddresses }, | ||
) => { | ||
return { | ||
to: [`${variables.submitterName} <${variables.submitterEmail}>`], | ||
subject: `Your Request for the ${variables.authority} Waiver Extension ${variables.id} has been submitted to CMS`, | ||
body: await render(<TempExtStateEmail variables={variables} />), | ||
}; | ||
}, | ||
}, | ||
state: async ( | ||
variables: Events["TemporaryExtension"] & CommonEmailVariables & { emails: EmailAddresses }, | ||
) => { | ||
return { | ||
to: [`${variables.submitterName} <${variables.submitterEmail}>`], | ||
subject: `Your Request for the ${variables.authority} Waiver Extension ${variables.id} has been submitted to CMS`, | ||
body: await render(<TempExtStateEmail variables={variables} />), | ||
}; | ||
[Authority["1915c"]]: { | ||
cms: async ( | ||
variables: Events["TemporaryExtension"] & CommonEmailVariables & { emails: EmailAddresses }, | ||
) => { | ||
return { | ||
to: variables.emails.osgEmail, | ||
subject: `${variables.authority} Waiver Extension ${variables.id} Submitted`, | ||
body: await render(<TempExtCMSEmail variables={variables} />), | ||
}; | ||
}, | ||
state: async ( | ||
variables: Events["TemporaryExtension"] & CommonEmailVariables & { emails: EmailAddresses }, | ||
) => { | ||
return { | ||
to: [`${variables.submitterName} <${variables.submitterEmail}>`], | ||
subject: `Your Request for the ${variables.authority} Waiver Extension ${variables.id} has been submitted to CMS`, | ||
body: await render(<TempExtStateEmail variables={variables} />), | ||
}; | ||
}, | ||
}, | ||
}; |
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
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
Oops, something went wrong.