- Implemented FormNewMail for creating new email entries in the queue. - Enhanced AdminPotenziali page layout for better responsiveness. - Added Coda component to manage user email queues, including adding, removing, and clearing emails. - Updated API routes for managing email queue operations, including adding, removing, and clearing user email queues. - Introduced new mail templates and integrated them into the mailer service. - Improved error handling in the email queue controller and service. - Added Zod validation for event IDs in the utility types.
43 lines
1 KiB
TypeScript
43 lines
1 KiB
TypeScript
import { Heading, Row, Section, Text } from "@react-email/components";
|
|
import z from "zod";
|
|
import Base from "./base";
|
|
|
|
export const ContattoAdminMailTag = "contattoAdminEmail";
|
|
|
|
export const ContattoAdminEmailPropsSchema = z.object({
|
|
nome: z.string(),
|
|
cognome: z.string(),
|
|
email: z.email(),
|
|
telefono: z.string(),
|
|
messaggio: z.string(),
|
|
});
|
|
|
|
const ContattoAdminEmail = ({
|
|
nome,
|
|
cognome,
|
|
email,
|
|
telefono,
|
|
messaggio,
|
|
}: z.infer<typeof ContattoAdminEmailPropsSchema>) => {
|
|
return (
|
|
<Base preview="Contatto Email">
|
|
<>
|
|
<Heading className="text-center text-3xl leading-8">
|
|
Richiesta di contatto
|
|
</Heading>
|
|
|
|
<Section className="px-5 text-left text-base md:px-12">
|
|
<Row>
|
|
<Text>Data: {new Date().toLocaleString("it-IT")}</Text>
|
|
<Text>Nome: {nome}</Text>
|
|
<Text>Cognome: {cognome}</Text>
|
|
<Text>Email: {email}</Text>
|
|
<Text>Telefono: {telefono}</Text>
|
|
<Text>Messaggio: {messaggio}</Text>
|
|
</Row>
|
|
</Section>
|
|
</>
|
|
</Base>
|
|
);
|
|
};
|
|
export default ContattoAdminEmail;
|