All files / lib/libs/email/content/userRoles/emailTemplates AdminPendingNotice.tsx

100% Statements 4/4
50% Branches 1/2
100% Functions 1/1
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28              8x   2x 2x 2x                                
import { userRoleMap } from "shared-utils";
 
import { BasicFooter } from "../../email-components";
import { BaseEmailTemplate } from "../../email-templates";
import { UserRoleEmailType } from "../index";
import { statesMap } from "../roleHelper";
 
export const AdminPendingNoticeEmail = ({ variables }: { variables: UserRoleEmailType }) => {
  const stateAccess =
    variables.territory === "N/A" ? "" : ` for ${statesMap[variables.territory]} `;
  const roleFormated = userRoleMap[variables.role];
  return (
    <BaseEmailTemplate
      previewText={`There is a new OneMAC ${roleFormated} access request ${stateAccess}`}
      heading=""
      applicationEndpointUrl={variables.applicationEndpointUrl}
      footerContent={<BasicFooter />}
    >
      <p>Hello,</p>
      <p>
        There is a new OneMAC {roleFormated} access request {stateAccess}from {variables.fullName}{" "}
        waiting for your review. Please log into your User Management Dashboard to see the pending
        request.
      </p>
    </BaseEmailTemplate>
  );
};