Skip to content

Commit

Permalink
add placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenzhu1 committed Dec 27, 2022
1 parent d547626 commit fd02b21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions frontend/src/APIClients/CamperAPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ const deleteMultipleCampersById = async (ids: string[]): Promise<boolean> => {
}
};

const sendWaiverEmail = async (
waiverContent: HTMLElement,
/* TODO: take pdf logic and move to /campers/register call
const sendConfirmationEmails = async (
waiverContent: string,
): Promise<boolean> => {
try {
const waiverPdf = new JsPDF("portrait", "pt", "a4");
Expand All @@ -115,6 +116,7 @@ const sendWaiverEmail = async (
return false;
}
}
*/

const getCampersByChargeIdAndSessionId = async (
chargeId: string,
Expand All @@ -138,7 +140,6 @@ export default {
updateCamperRegistrationStatus,
deleteWaitlistedCamperById,
updateCampersById,
sendWaiverEmail,
getCampersByChargeIdAndSessionId,
deleteMultipleCampersById,
};
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ const WaiverPage = ({
waiverDispatch,
campName,
}: WaiverPageProps): React.ReactElement => {
/* TODO: store waiver content (html) string to be used in future steps
const sendEmail = async () => {
const waiver = document.getElementById("waiver")?.outerHTML;
await CamperAPIClient.sendConfirmationEmail(waiver);
}
*/
return (
<Box>
<VStack align="stretch">
Expand Down Expand Up @@ -229,9 +235,6 @@ const WaiverPage = ({
/>
</FormControl>
</Wrap>
<button onClick={sendEmail} type="button">
Send Email PDF
</button>
</Box>
);
};
Expand Down

0 comments on commit fd02b21

Please sign in to comment.