From 735a318f0620c5dec4df6b140f83aa36938b0ce7 Mon Sep 17 00:00:00 2001 From: Pontus Abrahamsson Date: Tue, 14 Nov 2023 08:14:51 +0100 Subject: [PATCH] Email wip --- apps/dashboard/src/jobs/transactions.ts | 71 ++++++++++++++++-------- bun.lockb | Bin 343768 -> 337672 bytes packages/email/emails/transactions.tsx | 14 ++--- packages/email/package.json | 4 +- packages/notification/src/index.ts | 18 +++--- packages/supabase/src/queries/index.ts | 1 - 6 files changed, 66 insertions(+), 42 deletions(-) diff --git a/apps/dashboard/src/jobs/transactions.ts b/apps/dashboard/src/jobs/transactions.ts index 2f2f1876e0..dd0eca42bd 100644 --- a/apps/dashboard/src/jobs/transactions.ts +++ b/apps/dashboard/src/jobs/transactions.ts @@ -1,7 +1,9 @@ import { client } from "@/trigger"; +import { TransactionsEmail } from "@midday/email/emails/transactions"; import { getTransactions } from "@midday/gocardless"; -import { TriggerEvents, trigger, triggerBulk } from "@midday/notification"; +import { TriggerEvents, triggerBulk } from "@midday/notification"; import { Database } from "@midday/supabase/src/types"; +import { renderAsync } from "@react-email/components"; import { eventTrigger } from "@trigger.dev/sdk"; import { Supabase, SupabaseManagement } from "@trigger.dev/supabase"; import { capitalCase } from "change-case"; @@ -139,13 +141,23 @@ client.defineJob({ ) .select(); + const { data: usersData } = await io.supabase.client + .from("users_on_team") + .select("team_id, user:user_id(id, full_name, avatar_url, email, locale)") + .eq("team_id", data?.team_id); + if (transactionsData?.length && transactionsData.length > 0) { + revalidateTag(`transactions_${data?.team_id}`); + revalidateTag(`spending_${data?.team_id}`); + revalidateTag(`metrics_${data?.team_id}`); + // Send notification for each transaction // triggerBulk( // transactionsData.map((transaction) => ({ // name: TriggerEvents.TransactionNewInApp, // payload: { - // html: "TODO", + // description: "You have a new transaction of -1000 from Github", + // currency: "SEK", // }, // users: [ // { @@ -159,27 +171,42 @@ client.defineJob({ // })) // ); - // Send email with react-email-template - // trigger({ - // name: TriggerEvents.TransactionNewEmail, - // payload: { - // subject: "New transactions", - // html: "TODO", - // }, - // users: [ - // { - // subscriberId: "", - // teamId: "123", - // email: "", - // fullName: "Pontus Abrahamsson", - // avatarUrl: "https://", - // }, - // ], - // }); + const emailEvents = await Promise.all( + usersData?.map(async ({ user, team_id }) => { + const html = await renderAsync( + TransactionsEmail({ + fullName: user.full_name, + transactions: transactionsData.map((transaction) => ({ + id: transaction.id, + date: transaction.date, + amount: transaction.amount, + name: transaction.name, + currency: transaction.currency, + })), + locale: user.locale, + }) + ); - revalidateTag(`transactions_${data?.team_id}`); - revalidateTag(`spending_${data?.team_id}`); - revalidateTag(`metrics_${data?.team_id}`); + return { + name: TriggerEvents.TransactionNewEmail, + payload: { + subject: "New transactions", + html, + }, + user: { + subscriberId: user.id, + teamId: team_id, + email: user.email, + fullName: user.full_name, + avatarUrl: user.avatar_url, + }, + }; + }) + ); + + if (emailEvents?.length) { + triggerBulk(emailEvents); + } } if (error) { diff --git a/bun.lockb b/bun.lockb index 29c7bdb053757ed22c43cab84f2994708c24acb4..d35af99f866ee5c69e32ddfc5b032f3223daeefa 100755 GIT binary patch delta 18472 zcmeHvd00*B`}f*wuT8r|Q7KZ9DQRn$+G&!A%p{T_g$N}o^H3Zd=Nv<9Jmw>_2pLW| z=6ODbW1fdX>QH2s_jB*{Y<0fx`MvM=x_-aw_t$q_K0eR=dG6<4_w%f0&3kq8tJTbl zR_Pj->Dj}Y1YJp=e9lu5xbOYPps|@}-{$+Db8z!37+SD=ai_8MRRS%o=S4V*Tm7@g zI$3p}J6jNH3PM^$}#10=Q2(GBNf?gAB z0nS03YWhjloKqe42!cJ7irnMfF*$M`m^`m>`y{vu>>Xf=l)?3M&f~#0&WW9P>QvO0W;YCVdTTHvCa@`@JAj%k-**M{y3n+9iSa%}Pd1pXOzW!S^Oj^G)0<#t2CG`Q`c zQ@c79ha*A;7o**~~sY2Rb6sTwQ;7Hr^>UBY=0X~BsP(lhmYGIEA!3nk} zm{w#Bb^sSY6a;7R6)@HB1XDc&Qv&0`)S+lF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5nD>leu#vfv6+D`4VxibXUS=cBeCbfPD?IGg#N3tJA0Xqp0K&J`Nn(5p=$z8V7|OeT$jKuUo6TRwPV{awh9RmE*w{_ z(UbT+vecT()cz>LJp+e}8yjQ8b--_hbmZ+tTBJR~O_k}|F0a~-+q+QMHgD%{PScQa zn>ai6)Qz*sdw+)eX3si!aa!!AKWD~7n>Yuyw*`z6lOm(qIJF_+ge9LVmOAWAU(TMD zyyV6UJ@SSZbHjwpZ7%FPlyN#NzJ$|qMuD{O*!Xd=iIGmUr1Er5i=G&hmJsih5)~ei zhK=%4QlnDR#yO=WIYp%6QzXucwJzl>u_6g5TX|ZFYlG9@&Mmxo) zq_fp^3(|GtI&MxEM#sm)j zjdN12A1Q2QR%B8FKY;vTrX-EQU`|L)n-CvGBN~^AM}IfF$&>A5?#jO&%D-~uU(cAd zv@xme+O$cDijHNAttEQ0dIeE^Jq`Uuw=Ps%M<$Joi;7^+yK&au>gtqKTK$qL1~ZRF z8l__sIpvaatoD*B|hSUFj66(YzL{m!=qU)8`WqM_t9y2P3c~BWDRG+iDY*ra( z%x>rKfm|%B?~8HeQ0t=fFXt?No6al$FY#O^mG@&Mbj`DV%k}Zl9@9>uyc!j>V-p=D zO<1;rBuq!&TSeOWO6a2_i#+SblC~o4P+t|j&6f>wluXt6$m`g*R%KS>DA5uAFS|d^ A_5c6? diff --git a/packages/email/emails/transactions.tsx b/packages/email/emails/transactions.tsx index bc79373d4f..23193707d6 100644 --- a/packages/email/emails/transactions.tsx +++ b/packages/email/emails/transactions.tsx @@ -2,7 +2,6 @@ import { cn } from "@midday/ui/utils"; import { Body, Button, - Column, Container, Font, Head, @@ -12,7 +11,6 @@ import { Img, Link, Preview, - Row, Section, Tailwind, Text, @@ -29,7 +27,7 @@ type Transaction = { }; interface TransactionsEmailEmailProps { - firstName: string; + fullName: string; transactions: Transaction[]; locale: string; } @@ -76,10 +74,12 @@ const baseAppUrl = : "http://localhost:3001"; export const TransactionsEmail = ({ - firstName = "Viktor", + fullName = "Viktor Hofte", transactions = defaultTransactions, locale = "en", }: TransactionsEmailEmailProps) => { + const firstName = fullName.split(" ").at(0); + const previewText = `Hi ${firstName}, We found 5 transactions thats missing receipts. Feel free to attach them to ease your own or your accountants work for upcoming declerations.`; return ( @@ -150,7 +150,7 @@ export const TransactionsEmail = ({ - {transactions.map((transaction) => ( + {transactions?.map((transaction) => ( @@ -190,11 +190,9 @@ export const TransactionsEmail = ({