-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIMS-1951 Remove pimshelp Email (#2597)
- Loading branch information
1 parent
8fcbce4
commit 49362dc
Showing
9 changed files
with
66 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ Recommended values used with this API that match with the current API and Docker | |
|SSO_INTEGRATION_ID|1234|See Keycloak integration. Used for CSS API.| | ||
|SSO_ENVIRONMENT|dev|Target environment of Keycloak integration. Used for CSS API.| | ||
|GEOCODER_KEY|abc123|API key for BC Geocoder use.| | ||
|ERROR_REPORT_TO|<[email protected]>|Destination email for frontend error reporting.| | ||
|CONTACT_EMAIL|<[email protected]>|Destination email for frontend error reporting and help.| | ||
|CHES_USERNAME|abc123|Username for CHES service.| | ||
|CHES_PASSWORD|def456|Password for CHES service.| | ||
|CHES_AUTH_URL|https://...|URL where authorization tokens for CHES are obtained.| | ||
|
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 |
---|---|---|
|
@@ -36,7 +36,7 @@ export const submitErrorReport = async (req: Request, res: Response) => { | |
}); | ||
const config = getConfig(); | ||
const email: IEmail = { | ||
to: [config.errorReport.toEmail], | ||
to: [config.contact.toEmail], | ||
cc: [req.user.email], | ||
from: '[email protected]', // Made up for this purpose. | ||
bodyType: EmailBody.Html, | ||
|
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,32 +1,48 @@ | ||
import React from 'react'; | ||
import { LookupContext } from '@/contexts/lookupContext'; | ||
import React, { useContext } from 'react'; | ||
|
||
export const accessPendingBlurb = ( | ||
<> | ||
We have received your request. We will notify you via email when your request has been reviewed. | ||
If you haven't heard from us within five business days, please feel free to reach out to us | ||
at <a href="mailto: [email protected]">[email protected]</a>. | ||
</> | ||
); | ||
export const accessPendingBlurb = () => { | ||
const lookup = useContext(LookupContext); | ||
|
||
export const accountInactiveBlurb = ( | ||
<> | ||
This account is currently inactive and cannot access PIMS. If you believe this is an error or | ||
require the account to be reactivated, please feel free to reach out to us at{' '} | ||
<a href="mailto: [email protected]">[email protected]</a>. | ||
</> | ||
); | ||
return ( | ||
<> | ||
We have received your request. We will notify you via email when your request has been | ||
reviewed. If you haven't heard from us within five business days, please feel free to | ||
reach out to us at{' '} | ||
<a href={`mailto: ${lookup.data.Config.contactEmail}`}>{lookup.data.Config.contactEmail}</a>. | ||
</> | ||
); | ||
}; | ||
|
||
export const accountInactiveBlurb = () => { | ||
const lookup = useContext(LookupContext); | ||
|
||
return ( | ||
<> | ||
This account is currently inactive and cannot access PIMS. If you believe this is an error or | ||
require the account to be reactivated, please feel free to reach out to us at{' '} | ||
<a href={`mailto: ${lookup.data.Config.contactEmail}`}>{lookup.data.Config.contactEmail}</a>. | ||
</> | ||
); | ||
}; | ||
|
||
export const signupTermsAndConditionsClaim = ( | ||
<> | ||
By signing up, you agree to the <a href="#">Terms and Conditions</a> and confirm that you have | ||
read the <a href="#">Privacy Policy</a>. | ||
By signing up, you agree to the{' '} | ||
<a href="https://www2.gov.bc.ca/gov/content/home/disclaimer">Terms and Conditions</a> and | ||
confirm that you have read the{' '} | ||
<a href="https://www2.gov.bc.ca/gov/content/home/privacy">Privacy Policy</a>. | ||
</> | ||
); | ||
|
||
export const awaitingRoleBlurb = ( | ||
<> | ||
This account is currently active but has not been assigned a role. If you believe this is an | ||
error or require assistance, please feel free to reach out to us at{' '} | ||
<a href="mailto: [email protected]">[email protected]</a>. | ||
</> | ||
); | ||
export const awaitingRoleBlurb = () => { | ||
const lookup = useContext(LookupContext); | ||
|
||
return ( | ||
<> | ||
This account is currently active but has not been assigned a role. If you believe this is an | ||
error or require assistance, please feel free to reach out to us at{' '} | ||
<a href={`mailto: ${lookup.data.Config.contactEmail}`}>{lookup.data.Config.contactEmail}</a>. | ||
</> | ||
); | ||
}; |
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ import { Navigate } from 'react-router-dom'; | |
import TextFormField from '@/components/form/TextFormField'; | ||
import { useGroupedAgenciesApi } from '@/hooks/api/useGroupedAgenciesApi'; | ||
import { SnackBarContext } from '@/contexts/snackbarContext'; | ||
import { LookupContext } from '@/contexts/lookupContext'; | ||
|
||
interface StatusPageTemplateProps { | ||
blurb: JSX.Element; | ||
|
@@ -114,14 +115,15 @@ export const AccessRequest = () => { | |
const api = usePimsApi(); | ||
const auth = useContext(AuthContext); | ||
const snackbar = useContext(SnackBarContext); | ||
const lookup = useContext(LookupContext); | ||
|
||
const onSubmit = (data: AccessRequestType) => { | ||
api.users.submitAccessRequest(data).then((response) => { | ||
if (response.status === 201) { | ||
auth.pimsUser.refreshData(); | ||
} else { | ||
snackbar.setMessageState({ | ||
text: 'Could not create account. Contact [email protected] for assistance.', | ||
text: `Could not create account. Contact ${lookup.data.Config.contactEmail} for assistance.`, | ||
open: true, | ||
style: snackbar.styles.warning, | ||
}); | ||
|
@@ -144,7 +146,7 @@ export const AccessRequest = () => { | |
<Typography mb={'2rem'} variant="h2"> | ||
Awaiting Role | ||
</Typography> | ||
<StatusPageTemplate blurb={awaitingRoleBlurb} /> | ||
<StatusPageTemplate blurb={awaitingRoleBlurb()} /> | ||
</> | ||
); | ||
} | ||
|
@@ -155,7 +157,7 @@ export const AccessRequest = () => { | |
<Typography mb={'2rem'} variant="h2"> | ||
Access Pending | ||
</Typography> | ||
<StatusPageTemplate blurb={accessPendingBlurb} /> | ||
<StatusPageTemplate blurb={accessPendingBlurb()} /> | ||
</> | ||
); | ||
case 'Disabled': | ||
|
@@ -165,7 +167,7 @@ export const AccessRequest = () => { | |
<Typography mb={'2rem'} variant="h2"> | ||
Account Inactive | ||
</Typography> | ||
<StatusPageTemplate blurb={accountInactiveBlurb} /> | ||
<StatusPageTemplate blurb={accountInactiveBlurb()} /> | ||
</> | ||
); | ||
default: | ||
|