Skip to content

Commit

Permalink
Update Report.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
3keyroman committed Jul 6, 2024
1 parent 6784979 commit 699f429
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions src/components/Report/Report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ export const Report: React.FC<OverviewProps> = ({
setIsModalOpen(true);
};

const handleSendEmail = () => {
const progressUrl = generateURL(progress, assessmentName, assessorName, useCaseDescription);
const subject = "PKI Maturity Model (PKIMM) Self-Assessment";
const body = `
const handleSendEmail = () => {
const progressUrl = generateURL(
progress,
assessmentName,
assessorName,
useCaseDescription,
);
const subject = "PKI Maturity Model (PKIMM) Self-Assessment";
const body = `
Below you find a link to your PKI Maturity Model (PKIMM) Self-Assessment. This link allows you to continue the assessment at a later stage. You can also export the results to PDF.
If you have any questions about the PKI Maturity Model, please reach out to our community at https://pkic.org/discussions.
Expand All @@ -68,14 +73,14 @@ Kind regards,
The PKI Maturity Model Working Group of the PKI Consortium
`;

const mailtoLink = `mailto:?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
const mailtoLink = `mailto:?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;

window.open(mailtoLink, '_blank', 'noopener,noreferrer');
};
window.open(mailtoLink, "_blank", "noopener,noreferrer");
};

return (
<div className="pkimm-report">
<h1>PKI Maturity Report</h1>
return (
<div className="pkimm-report">
<h1>PKI Maturity Report</h1>

<div className="pkimm-user-inputs">
<div>
Expand Down Expand Up @@ -155,13 +160,13 @@ The PKI Maturity Model Working Group of the PKI Consortium
</tbody>
</table>

<div className="pkimm-actions-container">
<button onClick={handleShare}>Share Progress</button>
<button onClick={handleSendEmail}>Send Email</button>
{/*<button onClick={onExportYAML}>Export to YAML</button>*/}
<button onClick={onExportPDF}>Export to PDF</button>
<button onClick={onReset}>Reset</button>
</div>
<div className="pkimm-actions-container">
<button onClick={handleShare}>Share Progress</button>
<button onClick={handleSendEmail}>Send Email</button>
{/*<button onClick={onExportYAML}>Export to YAML</button>*/}
<button onClick={onExportPDF}>Export to PDF</button>
<button onClick={onReset}>Reset</button>
</div>

<ShareModal
isOpen={isModalOpen}
Expand Down

0 comments on commit 699f429

Please sign in to comment.