Skip to content

Commit

Permalink
fix(mail-sender): add real mail of contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Jun 25, 2024
1 parent fff1899 commit ac80077
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
20 changes: 9 additions & 11 deletions src/api/send-mail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,19 @@ function EmailSender({ contribution, refetch }: EmailSenderProps) {
},
to: [
{
email: "[email protected]",
name: "Mihoub Debache",
email: `${contribution.email}`,
name: `${contribution.name}`,
},
],
subject: `Réponse à votre contribution`,
htmlContent: `
<h1>Réponse à votre contribution</h1>
<p>Bonjour,</p>
<p>En réponse à votre contribution :</p>
<blockquote>${contribution.message}</blockquote>
<p>Voici notre réponse :</p>
<p>${userResponse}</p>
`,
templateId: 262,
params: {
date: new Date().toLocaleDateString(),
userResponse,
message: contribution.message,
selectedProfile: selectedProfile,
},
};

try {
const responseBrevo = await fetch(brevoUrl, {
method: "POST",
Expand Down
34 changes: 19 additions & 15 deletions src/pages/api-operation-page/link-publications/export-to-xlsx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,7 @@ const ExcelExportButton = ({ refetch }) => {
{isMinimized ? "Maximiser" : "Minimiser"}
</Button>
</div>
<div className="fr-grid-row fr-grid-row--center fr-mt-3w">
<ButtonGroup isInlineFrom="xs">
<Button onClick={handleExportClick}>Exporter</Button>
<Button
color="green-emeraude"
variant="primary"
onClick={handleClearClick}
>
Vider le panier
</Button>
<Button onClick={handleCopyToClipboardClick}>
Copier et marquer comme traité
</Button>
</ButtonGroup>
</div>

{!isMinimized && (
<ul style={{ listStyleType: "none", padding: 0 }}>
{Array.isArray(dataList) &&
Expand Down Expand Up @@ -238,6 +224,24 @@ const ExcelExportButton = ({ refetch }) => {
))}
</ul>
)}

<div className="fr-grid-row fr-grid-row--center fr-mt-3w">
<ButtonGroup isInlineFrom="xs">
<Button onClick={handleExportClick}>Exporter</Button>
<Button
color="green-emeraude"
variant="primary"
onClick={handleClearClick}
>
Vider le panier
</Button>
</ButtonGroup>
</div>
<div className="fr-grid-row fr-grid-row--center">
<Button onClick={handleCopyToClipboardClick}>
Copier et marquer comme traité
</Button>
</div>
</div>
</div>
);
Expand Down

0 comments on commit ac80077

Please sign in to comment.