feat: create email template for TTO reservation confirmation

feat: implement order notifications service with TTO reservation confirmation handling

feat: create migration for TTO booking email webhook trigger
This commit is contained in:
Danel Kungla
2025-09-30 16:05:43 +03:00
parent 4003284f3a
commit 72f6f2b716
56 changed files with 3692 additions and 294 deletions

View File

@@ -4,6 +4,11 @@ import { useState } from 'react';
import { redirect } from 'next/navigation';
import type {
Account,
AccountParams,
BmiThresholds,
} from '@/packages/features/accounts/src/types/accounts';
import { Database } from '@/packages/supabase/src/database.types';
import { format } from 'date-fns';
import { enGB, et } from 'date-fns/locale';
@@ -16,11 +21,10 @@ import { Trans } from '@kit/ui/makerkit/trans';
import { Button } from '@kit/ui/shadcn/button';
import { DateRange } from '@kit/ui/shadcn/calendar';
import { TeamAccountBenefitExpensesOverview } from '../_lib/server/load-team-account-benefit-expenses-overview';
import { AccountBenefitStatistics } from '../_lib/server/load-team-account-benefit-statistics';
import TeamAccountBenefitStatistics from './team-account-benefit-statistics';
import TeamAccountHealthDetails from './team-account-health-details';
import type { Account, AccountParams, BmiThresholds } from '@/packages/features/accounts/src/types/accounts';
import { TeamAccountBenefitExpensesOverview } from '../_lib/server/load-team-account-benefit-expenses-overview';
export interface TeamAccountStatisticsProps {
teamAccount: Account;
@@ -53,7 +57,7 @@ export default function TeamAccountStatistics({
return (
<>
<div className="mt-4 flex flex-col gap-4 sm:gap-0 sm:flex-row items-center justify-between">
<div className="mt-4 flex flex-col items-center justify-between gap-4 sm:flex-row sm:gap-0">
<h4 className="font-bold">
<Trans
i18nKey={'teams:home.headerTitle'}
@@ -78,7 +82,10 @@ export default function TeamAccountStatistics({
'animate-in fade-in flex flex-col space-y-4 pb-36 duration-500'
}
>
<TeamAccountBenefitStatistics accountBenefitStatistics={accountBenefitStatistics} expensesOverview={expensesOverview} />
<TeamAccountBenefitStatistics
accountBenefitStatistics={accountBenefitStatistics}
expensesOverview={expensesOverview}
/>
<h5 className="mt-4 mb-2">
<Trans i18nKey="teams:home.healthDetails" />
@@ -125,10 +132,7 @@ export default function TeamAccountStatistics({
className="border-warning/40 hover:bg-warning/20 relative flex h-full cursor-pointer flex-col justify-center px-6 py-4 transition-colors"
onClick={() =>
redirect(
createPath(
pathsConfig.app.accountBilling,
teamAccount.slug!,
),
createPath(pathsConfig.app.accountBilling, teamAccount.slug!),
)
}
>