Add email notification for service interruption requests
This commit is contained in:
parent
6953be6936
commit
a72bc074e4
1 changed files with 15 additions and 0 deletions
|
|
@ -1035,6 +1035,21 @@ export const interruzioneServizio = async (servizioId: ServizioServizioId) => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await NewMail({
|
||||||
|
mailType: "generic",
|
||||||
|
to: "web@infoalloggi.it",
|
||||||
|
subject: `Utente ${utente.username} ha richieto l'interruzione del servizio di ricerca affitto`,
|
||||||
|
props: {
|
||||||
|
noreply: true,
|
||||||
|
title: `Utente ${utente.username} ha richieto l'interruzione del servizio di ricerca affitto`,
|
||||||
|
testo: `L'utente ha richiesto l'interruzione del servizio di ricerca affitto per la tipologia ${servizio.tipologia}. Puoi procedere con le prossime azioni.`,
|
||||||
|
link: {
|
||||||
|
href: `${env.NEXT_PUBLIC_BASE_URL}/area-riservata/admin/user-view/ricerca/${servizio.user_id}#${servizioId}`,
|
||||||
|
label: "Vai al servizio",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue