- Added user_invites table to manage invitation tokens. - Created invite router with procedures for sending, verifying, and accepting invites. - Implemented email sending functionality for invites. - Updated user controller to handle password setting during invite acceptance. - Introduced mustChangePassword flag in user schema and related logic. - Added middleware to enforce password change requirement. - Created forms for accepting invites and changing passwords. - Updated database migrations to reflect new user invite structure and fields.
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { Button, Heading, Row, Section, Text } from "@react-email/components";
|
|
import Base from "./base";
|
|
export type Invito_NewMail = {
|
|
mailType: "invito";
|
|
props: InvitoProps;
|
|
};
|
|
|
|
type InvitoProps = {
|
|
nome: string;
|
|
inviteUrl: string;
|
|
};
|
|
|
|
const Invito = ({ nome, inviteUrl }: InvitoProps) => {
|
|
return (
|
|
<Base preview="Procedi ora su Infoalloggi.it">
|
|
<>
|
|
<Heading className="text-center text-3xl leading-8">
|
|
Procedi ora su Infoalloggi.it
|
|
</Heading>
|
|
<Section className="px-5 text-left text-base md:px-12">
|
|
<Row>
|
|
<Text>
|
|
Ciao {nome},<br />
|
|
Accedi ora al servizio di ricerca Infoalloggi, dove potrai andare
|
|
a contattare direttamente i proprietari degli immobili
|
|
disponibili.
|
|
</Text>
|
|
</Row>
|
|
|
|
<Section className="mb-5">
|
|
<Button
|
|
className="mx-auto box-border inline-flex h-10 items-center justify-center whitespace-nowrap rounded-md bg-sky-500 px-4 py-2 text-center align-middle font-semibold text-white"
|
|
href={inviteUrl}
|
|
>
|
|
Clicca qui per procedere
|
|
</Button>
|
|
</Section>
|
|
<Section></Section>
|
|
</Section>
|
|
</>
|
|
</Base>
|
|
);
|
|
};
|
|
|
|
export default Invito;
|