@tracked/emails 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/emails/index.d.ts +1 -0
- package/dist/emails/index.d.ts.map +1 -1
- package/dist/emails/index.js +1 -0
- package/dist/emails/index.js.map +1 -1
- package/dist/emails/monthly-report.d.ts +42 -0
- package/dist/emails/monthly-report.d.ts.map +1 -0
- package/dist/emails/monthly-report.js +204 -0
- package/dist/emails/monthly-report.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/emails/index.tsx +1 -0
- package/src/emails/monthly-report.tsx +607 -0
- package/src/index.ts +2 -0
package/dist/emails/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/emails/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/emails/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC"}
|
package/dist/emails/index.js
CHANGED
package/dist/emails/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/emails/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/emails/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
interface MuscleGroup {
|
|
2
|
+
muscleGroupId: string;
|
|
3
|
+
name: string;
|
|
4
|
+
sets: number;
|
|
5
|
+
}
|
|
6
|
+
interface MonthlyMetrics {
|
|
7
|
+
accountId: number;
|
|
8
|
+
email: string;
|
|
9
|
+
reportMonth: string;
|
|
10
|
+
avgStepCount: number | null;
|
|
11
|
+
avgBodyweight: number | null;
|
|
12
|
+
bodyweightChange: number | null;
|
|
13
|
+
avgSessionsPerWeek: number | null;
|
|
14
|
+
totalSetsTracked: number | null;
|
|
15
|
+
totalSessionsTracked: number | null;
|
|
16
|
+
topMuscleGroups: Array<MuscleGroup> | null;
|
|
17
|
+
avgReadinessEnergy: number | null;
|
|
18
|
+
avgReadinessMood: number | null;
|
|
19
|
+
avgReadinessStress: number | null;
|
|
20
|
+
avgReadinessSoreness: number | null;
|
|
21
|
+
avgReadinessSleep: number | null;
|
|
22
|
+
avgSessionSatisfaction: number | null;
|
|
23
|
+
avgSessionProgress: number | null;
|
|
24
|
+
avgSessionMotivation: number | null;
|
|
25
|
+
avgSessionEnjoyment: number | null;
|
|
26
|
+
}
|
|
27
|
+
interface PreviousMetrics {
|
|
28
|
+
avgStepCount: number | null;
|
|
29
|
+
avgBodyweight: number | null;
|
|
30
|
+
bodyweightChange: number | null;
|
|
31
|
+
avgSessionsPerWeek: number | null;
|
|
32
|
+
totalSetsTracked: number | null;
|
|
33
|
+
totalSessionsTracked: number | null;
|
|
34
|
+
}
|
|
35
|
+
interface MonthlyReportEmailProps {
|
|
36
|
+
metrics: MonthlyMetrics;
|
|
37
|
+
previousMetrics?: PreviousMetrics | null;
|
|
38
|
+
websiteUrl?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const MonthlyReportEmail: ({ metrics, previousMetrics, websiteUrl, }: MonthlyReportEmailProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export default MonthlyReportEmail;
|
|
42
|
+
//# sourceMappingURL=monthly-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-report.d.ts","sourceRoot":"","sources":["../../src/emails/monthly-report.tsx"],"names":[],"mappings":"AAgBA,UAAU,WAAW;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,cAAc;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAGpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IAG3C,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,UAAU,eAAe;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,cAAc,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAmBD,eAAO,MAAM,kBAAkB,GAAI,2CAIhC,uBAAuB,4CAmVzB,CAAC;AAuLF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Body, Column, Container, Head, Hr, Html, Img, Link, Preview, Row, Section, Text, } from "@react-email/components";
|
|
3
|
+
const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
|
|
4
|
+
function formatNumber(num) {
|
|
5
|
+
if (num === null)
|
|
6
|
+
return "N/A";
|
|
7
|
+
return num.toLocaleString();
|
|
8
|
+
}
|
|
9
|
+
function formatDecimal(num, decimals = 1) {
|
|
10
|
+
if (num === null)
|
|
11
|
+
return "N/A";
|
|
12
|
+
return num.toFixed(decimals);
|
|
13
|
+
}
|
|
14
|
+
function getMonthName(reportMonth) {
|
|
15
|
+
const date = new Date(reportMonth);
|
|
16
|
+
return date.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
17
|
+
}
|
|
18
|
+
export const MonthlyReportEmail = ({ metrics, previousMetrics = null, websiteUrl = "https://tracked.gg", }) => {
|
|
19
|
+
const monthName = getMonthName(metrics.reportMonth);
|
|
20
|
+
const getChangeIndicator = (current, previous) => {
|
|
21
|
+
if (current === null || previous === null || !previousMetrics)
|
|
22
|
+
return null;
|
|
23
|
+
const diff = current - previous;
|
|
24
|
+
if (diff > 0) {
|
|
25
|
+
return (_jsxs(Text, { style: changeIndicatorPositive, children: ["\u25B2 ", formatDecimal(Math.abs(diff))] }));
|
|
26
|
+
}
|
|
27
|
+
if (diff < 0) {
|
|
28
|
+
return (_jsxs(Text, { style: changeIndicatorNegative, children: ["\u25BC ", formatDecimal(Math.abs(diff))] }));
|
|
29
|
+
}
|
|
30
|
+
return _jsx(Text, { style: changeIndicatorNeutral, children: "\u2014" });
|
|
31
|
+
};
|
|
32
|
+
const hasBodyweightData = metrics.avgBodyweight || metrics.bodyweightChange;
|
|
33
|
+
const hasSessionInsights = metrics.avgReadinessEnergy ||
|
|
34
|
+
metrics.avgReadinessMood ||
|
|
35
|
+
metrics.avgSessionSatisfaction ||
|
|
36
|
+
metrics.avgSessionProgress;
|
|
37
|
+
return (_jsxs(Html, { children: [_jsxs(Head, { children: [_jsx("meta", { name: "color-scheme", content: "light only" }), _jsx("meta", { name: "supported-color-schemes", content: "light only" })] }), _jsxs(Preview, { children: ["Your ", monthName, " Training Report - Your monthly fitness journey at a glance"] }), _jsx(Body, { style: main, children: _jsx(Container, { style: container, children: _jsxs(Section, { style: box, children: [_jsxs(Row, { style: { marginBottom: "8px" }, children: [_jsx(Column, { style: { width: "auto", verticalAlign: "middle" }, children: _jsx(Img, { src: `${baseUrl}`, width: "28", height: "28", alt: "Tracked" }) }), _jsx(Column, { style: {
|
|
38
|
+
width: "auto",
|
|
39
|
+
verticalAlign: "middle",
|
|
40
|
+
paddingLeft: "4px",
|
|
41
|
+
}, children: _jsx(Text, { style: logo, children: "TRACKED" }) })] }), _jsxs(Section, { style: headerSection, children: [_jsxs(Text, { style: headerTitle, children: ["Your ", monthName, " Training Report"] }), _jsx(Text, { style: headerSubtitle, children: "Your monthly fitness journey at a glance" })] }), _jsx(Hr, { style: hr }), _jsxs(Section, { style: sectionContainer, children: [_jsx(Text, { style: sectionHeading, children: "\uD83D\uDCCA Activity Overview" }), _jsxs(Section, { style: metricBox, children: [_jsx(Text, { style: metricLabel, children: "Average Daily Steps" }), _jsxs(Row, { children: [_jsx(Column, { children: _jsx(Text, { style: metricValue, children: formatNumber(metrics.avgStepCount) }) }), getChangeIndicator(metrics.avgStepCount, previousMetrics?.avgStepCount || null)] })] })] }), hasBodyweightData && (_jsxs(_Fragment, { children: [_jsx(Hr, { style: hr }), _jsxs(Section, { style: sectionContainer, children: [_jsx(Text, { style: sectionHeading, children: "\u2696\uFE0F Bodyweight Trends" }), _jsxs(Row, { children: [_jsx(Column, { style: { width: "48%" }, children: _jsxs(Section, { style: metricBox, children: [_jsx(Text, { style: metricLabel, children: "Average Bodyweight" }), _jsxs(Row, { children: [_jsx(Column, { children: _jsxs(Text, { style: metricValueSmall, children: [formatDecimal(metrics.avgBodyweight, 1), " lbs"] }) }), getChangeIndicator(metrics.avgBodyweight, previousMetrics?.avgBodyweight || null)] })] }) }), _jsx(Column, { style: { width: "4%" } }), _jsx(Column, { style: { width: "48%" }, children: _jsxs(Section, { style: metricBox, children: [_jsx(Text, { style: metricLabel, children: "Monthly Change" }), _jsx(Text, { style: metricValueSmall, children: metrics.bodyweightChange !== null
|
|
42
|
+
? (metrics.bodyweightChange >= 0 ? "+" : "") +
|
|
43
|
+
formatDecimal(metrics.bodyweightChange, 1) +
|
|
44
|
+
" lbs"
|
|
45
|
+
: "N/A" })] }) })] })] })] })), _jsx(Hr, { style: hr }), _jsxs(Section, { style: sectionContainer, children: [_jsx(Text, { style: sectionHeading, children: "\uD83D\uDCAA Training Summary" }), _jsxs(Row, { children: [_jsx(Column, { style: { width: "48%" }, children: _jsxs(Section, { style: metricBox, children: [_jsx(Text, { style: metricLabel, children: "Sessions Per Week" }), _jsxs(Row, { children: [_jsx(Column, { children: _jsx(Text, { style: metricValueSmall, children: formatDecimal(metrics.avgSessionsPerWeek, 1) }) }), getChangeIndicator(metrics.avgSessionsPerWeek, previousMetrics?.avgSessionsPerWeek || null)] })] }) }), _jsx(Column, { style: { width: "4%" } }), _jsx(Column, { style: { width: "48%" }, children: _jsxs(Section, { style: metricBox, children: [_jsx(Text, { style: metricLabel, children: "Total Sessions" }), _jsxs(Row, { children: [_jsx(Column, { children: _jsx(Text, { style: metricValueSmall, children: formatNumber(metrics.totalSessionsTracked) }) }), getChangeIndicator(metrics.totalSessionsTracked, previousMetrics?.totalSessionsTracked || null)] })] }) })] }), _jsxs(Section, { style: { ...metricBox, marginTop: "10px" }, children: [_jsx(Text, { style: metricLabel, children: "Total Sets Tracked" }), _jsxs(Row, { children: [_jsx(Column, { children: _jsx(Text, { style: metricValue, children: formatNumber(metrics.totalSetsTracked) }) }), getChangeIndicator(metrics.totalSetsTracked, previousMetrics?.totalSetsTracked || null)] })] })] }), metrics.topMuscleGroups && metrics.topMuscleGroups.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Hr, { style: hr }), _jsxs(Section, { style: sectionContainer, children: [_jsx(Text, { style: sectionHeading, children: "\uD83C\uDFAF Top 5 Prioritized Muscle Groups" }), _jsx(Section, { style: listBox, children: metrics.topMuscleGroups.map((mg, idx) => (_jsxs(Row, { style: {
|
|
46
|
+
...listItem,
|
|
47
|
+
borderBottom: idx < metrics.topMuscleGroups.length - 1
|
|
48
|
+
? "1px solid #e5e7eb"
|
|
49
|
+
: "none",
|
|
50
|
+
}, children: [_jsx(Column, { children: _jsxs(Text, { style: listItemName, children: [idx + 1, ". ", mg.name] }) }), _jsx(Column, { style: { textAlign: "right" }, children: _jsxs(Text, { style: listItemValue, children: [formatNumber(mg.sets), " sets"] }) })] }, mg.muscleGroupId))) })] })] })), hasSessionInsights && (_jsxs(_Fragment, { children: [_jsx(Hr, { style: hr }), _jsxs(Section, { style: sectionContainer, children: [_jsx(Text, { style: sectionHeading, children: "\uD83D\uDCC8 Session Insights" }), _jsxs(Section, { style: listBox, children: [metrics.avgReadinessEnergy && (_jsxs(Row, { style: insightRow, children: [_jsx(Column, { children: _jsx(Text, { style: insightLabel, children: "Avg Readiness Energy" }) }), _jsx(Column, { style: { textAlign: "right" }, children: _jsxs(Text, { style: insightValue, children: [formatDecimal(metrics.avgReadinessEnergy), "/10"] }) })] })), metrics.avgReadinessMood && (_jsxs(Row, { style: insightRow, children: [_jsx(Column, { children: _jsx(Text, { style: insightLabel, children: "Avg Readiness Mood" }) }), _jsx(Column, { style: { textAlign: "right" }, children: _jsxs(Text, { style: insightValue, children: [formatDecimal(metrics.avgReadinessMood), "/10"] }) })] })), metrics.avgSessionSatisfaction && (_jsxs(Row, { style: insightRow, children: [_jsx(Column, { children: _jsx(Text, { style: insightLabel, children: "Avg Session Satisfaction" }) }), _jsx(Column, { style: { textAlign: "right" }, children: _jsxs(Text, { style: insightValue, children: [formatDecimal(metrics.avgSessionSatisfaction), "/10"] }) })] })), metrics.avgSessionProgress && (_jsxs(Row, { style: insightRow, children: [_jsx(Column, { children: _jsx(Text, { style: insightLabel, children: "Avg Session Progress" }) }), _jsx(Column, { style: { textAlign: "right" }, children: _jsxs(Text, { style: insightValue, children: [formatDecimal(metrics.avgSessionProgress), "/10"] }) })] }))] })] })] })), _jsx(Hr, { style: hr }), _jsxs(Section, { style: footerMessageBox, children: [_jsx(Text, { style: footerMessage, children: "Keep up the great work! Every rep, every session, every step counts towards your goals." }), _jsx(Text, { style: footerMessageSmall, children: "You can manage your email preferences in the Tracked app settings." })] }), _jsx(Hr, { style: hr }), _jsxs(Text, { style: footer, children: ["Copyright \u00A9 ", new Date().getFullYear(), " Tracked Training Platform Inc. ", _jsx("br", {}), " 9101 Horne Street, Vancouver, BC"] }), _jsxs(Container, { children: [_jsx(Link, { href: `${websiteUrl}/terms`, style: { ...footer, paddingRight: 10 }, children: "Terms" }), _jsx(Link, { style: { ...footer, paddingRight: 10 }, children: " | " }), _jsx(Link, { href: `${websiteUrl}/privacy`, style: { ...footer, paddingRight: 10 }, children: "Privacy" }), _jsx(Link, { style: { ...footer, paddingRight: 10 }, children: " | " }), _jsx(Link, { href: `${websiteUrl}/support`, style: { ...footer, paddingRight: 10 }, children: "Support" })] }), _jsx(Text, { style: footer, children: "This is a service notification by the Tracked Training Platform." })] }) }) })] }));
|
|
51
|
+
};
|
|
52
|
+
// Styles
|
|
53
|
+
const main = {
|
|
54
|
+
backgroundColor: "#f3f4f6",
|
|
55
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
56
|
+
};
|
|
57
|
+
const container = {
|
|
58
|
+
margin: "0 auto",
|
|
59
|
+
padding: "20px 0 48px",
|
|
60
|
+
maxWidth: "600px",
|
|
61
|
+
};
|
|
62
|
+
const box = {
|
|
63
|
+
backgroundColor: "#ffffff",
|
|
64
|
+
borderRadius: "8px",
|
|
65
|
+
padding: "0 24px 24px 24px",
|
|
66
|
+
};
|
|
67
|
+
const logo = {
|
|
68
|
+
fontSize: "28px",
|
|
69
|
+
fontWeight: "900",
|
|
70
|
+
fontFamily: "Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
71
|
+
color: "#020617",
|
|
72
|
+
margin: "0",
|
|
73
|
+
lineHeight: "32px",
|
|
74
|
+
letterSpacing: "0.5px",
|
|
75
|
+
};
|
|
76
|
+
const headerSection = {
|
|
77
|
+
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
78
|
+
padding: "40px 20px",
|
|
79
|
+
textAlign: "center",
|
|
80
|
+
borderRadius: "8px",
|
|
81
|
+
margin: "20px 0",
|
|
82
|
+
};
|
|
83
|
+
const headerTitle = {
|
|
84
|
+
color: "#ffffff",
|
|
85
|
+
margin: "0",
|
|
86
|
+
fontSize: "28px",
|
|
87
|
+
fontWeight: "700",
|
|
88
|
+
};
|
|
89
|
+
const headerSubtitle = {
|
|
90
|
+
color: "#e9d5ff",
|
|
91
|
+
margin: "10px 0 0 0",
|
|
92
|
+
fontSize: "16px",
|
|
93
|
+
};
|
|
94
|
+
const hr = {
|
|
95
|
+
borderColor: "#e5e7eb",
|
|
96
|
+
margin: "20px 0",
|
|
97
|
+
};
|
|
98
|
+
const sectionContainer = {
|
|
99
|
+
marginBottom: "20px",
|
|
100
|
+
};
|
|
101
|
+
const sectionHeading = {
|
|
102
|
+
color: "#1f2937",
|
|
103
|
+
fontSize: "20px",
|
|
104
|
+
margin: "0 0 20px 0",
|
|
105
|
+
fontWeight: "600",
|
|
106
|
+
};
|
|
107
|
+
const metricBox = {
|
|
108
|
+
backgroundColor: "#f9fafb",
|
|
109
|
+
padding: "15px",
|
|
110
|
+
borderRadius: "8px",
|
|
111
|
+
};
|
|
112
|
+
const metricLabel = {
|
|
113
|
+
color: "#6b7280",
|
|
114
|
+
fontSize: "14px",
|
|
115
|
+
marginBottom: "5px",
|
|
116
|
+
};
|
|
117
|
+
const metricValue = {
|
|
118
|
+
color: "#1f2937",
|
|
119
|
+
fontSize: "24px",
|
|
120
|
+
fontWeight: "700",
|
|
121
|
+
margin: "0",
|
|
122
|
+
};
|
|
123
|
+
const metricValueSmall = {
|
|
124
|
+
color: "#1f2937",
|
|
125
|
+
fontSize: "20px",
|
|
126
|
+
fontWeight: "700",
|
|
127
|
+
margin: "0",
|
|
128
|
+
};
|
|
129
|
+
const changeIndicatorPositive = {
|
|
130
|
+
color: "#10b981",
|
|
131
|
+
fontSize: "14px",
|
|
132
|
+
marginLeft: "8px",
|
|
133
|
+
display: "inline",
|
|
134
|
+
};
|
|
135
|
+
const changeIndicatorNegative = {
|
|
136
|
+
color: "#ef4444",
|
|
137
|
+
fontSize: "14px",
|
|
138
|
+
marginLeft: "8px",
|
|
139
|
+
display: "inline",
|
|
140
|
+
};
|
|
141
|
+
const changeIndicatorNeutral = {
|
|
142
|
+
color: "#6b7280",
|
|
143
|
+
fontSize: "14px",
|
|
144
|
+
marginLeft: "8px",
|
|
145
|
+
display: "inline",
|
|
146
|
+
};
|
|
147
|
+
const listBox = {
|
|
148
|
+
backgroundColor: "#f9fafb",
|
|
149
|
+
borderRadius: "8px",
|
|
150
|
+
overflow: "hidden",
|
|
151
|
+
};
|
|
152
|
+
const listItem = {
|
|
153
|
+
padding: "12px",
|
|
154
|
+
};
|
|
155
|
+
const listItemName = {
|
|
156
|
+
color: "#1f2937",
|
|
157
|
+
fontSize: "16px",
|
|
158
|
+
fontWeight: "600",
|
|
159
|
+
margin: "0",
|
|
160
|
+
};
|
|
161
|
+
const listItemValue = {
|
|
162
|
+
color: "#6b7280",
|
|
163
|
+
fontSize: "16px",
|
|
164
|
+
margin: "0",
|
|
165
|
+
};
|
|
166
|
+
const insightRow = {
|
|
167
|
+
padding: "10px",
|
|
168
|
+
};
|
|
169
|
+
const insightLabel = {
|
|
170
|
+
color: "#6b7280",
|
|
171
|
+
fontSize: "14px",
|
|
172
|
+
margin: "0",
|
|
173
|
+
};
|
|
174
|
+
const insightValue = {
|
|
175
|
+
color: "#1f2937",
|
|
176
|
+
fontSize: "16px",
|
|
177
|
+
fontWeight: "600",
|
|
178
|
+
margin: "0",
|
|
179
|
+
};
|
|
180
|
+
const footerMessageBox = {
|
|
181
|
+
marginTop: "20px",
|
|
182
|
+
padding: "20px",
|
|
183
|
+
backgroundColor: "#f9fafb",
|
|
184
|
+
borderRadius: "8px",
|
|
185
|
+
textAlign: "center",
|
|
186
|
+
};
|
|
187
|
+
const footerMessage = {
|
|
188
|
+
color: "#6b7280",
|
|
189
|
+
fontSize: "14px",
|
|
190
|
+
margin: "0",
|
|
191
|
+
};
|
|
192
|
+
const footerMessageSmall = {
|
|
193
|
+
color: "#6b7280",
|
|
194
|
+
fontSize: "12px",
|
|
195
|
+
margin: "15px 0 0 0",
|
|
196
|
+
};
|
|
197
|
+
const footer = {
|
|
198
|
+
color: "#9ca3af",
|
|
199
|
+
fontSize: "12px",
|
|
200
|
+
lineHeight: "16px",
|
|
201
|
+
textAlign: "center",
|
|
202
|
+
};
|
|
203
|
+
export default MonthlyReportEmail;
|
|
204
|
+
//# sourceMappingURL=monthly-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-report.js","sourceRoot":"","sources":["../../src/emails/monthly-report.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,SAAS,EACT,IAAI,EACJ,EAAE,EACF,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,OAAO,EACP,GAAG,EACH,OAAO,EACP,IAAI,GACL,MAAM,yBAAyB,CAAC;AAiDjC,MAAM,OAAO,GAAG,+CAA+C,CAAC;AAEhE,SAAS,YAAY,CAAC,GAAkB;IACtC,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC/B,OAAO,GAAG,CAAC,cAAc,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,aAAa,CAAC,GAAkB,EAAE,WAAmB,CAAC;IAC7D,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,YAAY,CAAC,WAAmB;IACvC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,OAAO,EACP,eAAe,GAAG,IAAI,EACtB,UAAU,GAAG,oBAAoB,GACT,EAAE,EAAE;IAC5B,MAAM,SAAS,GAAG,YAAY,CAA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S;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,KAAK;IACjB,MAAM,EAAE,GAAG;CACZ,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACvB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,QAAiB;CAC7B,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,GAAG;CACZ,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACzB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,YAAY;CACrB,CAAC;AAEF,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,QAAiB;CAC7B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { DirectMessageEmail } from "./emails/direct-message.js";
|
|
|
6
6
|
import { FeatureDiscoveryEmail } from "./emails/feature-discovery.js";
|
|
7
7
|
import { FirstWorkoutAssignedEmail } from "./emails/first-workout-assigned.js";
|
|
8
8
|
import { FirstWorkoutCompletedEmail } from "./emails/first-workout-completed.js";
|
|
9
|
+
import { MonthlyReportEmail } from "./emails/monthly-report.js";
|
|
9
10
|
import { NewFollowerEmail } from "./emails/new-follower.js";
|
|
10
11
|
import { SubscriptionCanceledEmail } from "./emails/subscription-canceled.js";
|
|
11
12
|
import { SupportEmail } from "./emails/support-email.js";
|
|
@@ -17,6 +18,6 @@ import { WeekOneCheckinEmail } from "./emails/week-one-checkin.js";
|
|
|
17
18
|
import { WelcomeEmail } from "./emails/welcome.js";
|
|
18
19
|
import { isPrivateRelayEmail, isValidEmailFormat, shouldSendEmailTo } from "./utils/email-validation.js";
|
|
19
20
|
import { isAnonymousUsername, getSafeDisplayName } from "./utils/username-validation.js";
|
|
20
|
-
export { BodyweightGoalReachedEmail, ClientAcceptedInvitationEmail, CoachInviteEmail, CoachRemovedClientEmail, DirectMessageEmail, FeatureDiscoveryEmail, FirstWorkoutAssignedEmail, FirstWorkoutCompletedEmail, NewFollowerEmail, SubscriptionCanceledEmail, SupportEmail, TeamInviteEmail, TeamMemberRemovedEmail, TrackedMagicLink, TrackedMagicLinkActivate, WeekOneCheckinEmail, WelcomeEmail, };
|
|
21
|
+
export { BodyweightGoalReachedEmail, ClientAcceptedInvitationEmail, CoachInviteEmail, CoachRemovedClientEmail, DirectMessageEmail, FeatureDiscoveryEmail, FirstWorkoutAssignedEmail, FirstWorkoutCompletedEmail, MonthlyReportEmail, NewFollowerEmail, SubscriptionCanceledEmail, SupportEmail, TeamInviteEmail, TeamMemberRemovedEmail, TrackedMagicLink, TrackedMagicLinkActivate, WeekOneCheckinEmail, WelcomeEmail, };
|
|
21
22
|
export { isPrivateRelayEmail, isValidEmailFormat, shouldSendEmailTo, isAnonymousUsername, getSafeDisplayName, };
|
|
22
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAA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CAAC;AAGF,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { DirectMessageEmail } from "./emails/direct-message.js";
|
|
|
6
6
|
import { FeatureDiscoveryEmail } from "./emails/feature-discovery.js";
|
|
7
7
|
import { FirstWorkoutAssignedEmail } from "./emails/first-workout-assigned.js";
|
|
8
8
|
import { FirstWorkoutCompletedEmail } from "./emails/first-workout-completed.js";
|
|
9
|
+
import { MonthlyReportEmail } from "./emails/monthly-report.js";
|
|
9
10
|
import { NewFollowerEmail } from "./emails/new-follower.js";
|
|
10
11
|
import { SubscriptionCanceledEmail } from "./emails/subscription-canceled.js";
|
|
11
12
|
import { SupportEmail } from "./emails/support-email.js";
|
|
@@ -18,7 +19,7 @@ import { WelcomeEmail } from "./emails/welcome.js";
|
|
|
18
19
|
// Import validation utilities
|
|
19
20
|
import { isPrivateRelayEmail, isValidEmailFormat, shouldSendEmailTo, } from "./utils/email-validation.js";
|
|
20
21
|
import { isAnonymousUsername, getSafeDisplayName, } from "./utils/username-validation.js";
|
|
21
|
-
export { BodyweightGoalReachedEmail, ClientAcceptedInvitationEmail, CoachInviteEmail, CoachRemovedClientEmail, DirectMessageEmail, FeatureDiscoveryEmail, FirstWorkoutAssignedEmail, FirstWorkoutCompletedEmail, NewFollowerEmail, SubscriptionCanceledEmail, SupportEmail, TeamInviteEmail, TeamMemberRemovedEmail, TrackedMagicLink, TrackedMagicLinkActivate, WeekOneCheckinEmail, WelcomeEmail, };
|
|
22
|
+
export { BodyweightGoalReachedEmail, ClientAcceptedInvitationEmail, CoachInviteEmail, CoachRemovedClientEmail, DirectMessageEmail, FeatureDiscoveryEmail, FirstWorkoutAssignedEmail, FirstWorkoutCompletedEmail, MonthlyReportEmail, NewFollowerEmail, SubscriptionCanceledEmail, SupportEmail, TeamInviteEmail, TeamMemberRemovedEmail, TrackedMagicLink, TrackedMagicLinkActivate, WeekOneCheckinEmail, WelcomeEmail, };
|
|
22
23
|
// Export validation utilities
|
|
23
24
|
export { isPrivateRelayEmail, isValidEmailFormat, shouldSendEmailTo, isAnonymousUsername, getSafeDisplayName, };
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,8BAA8B;AAC9B,OAAO,EACL,mB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e,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,8BAA8B;AAC9B,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,EACnB,YAAY,GACb,CAAC;AAEF,8BAA8B;AAC9B,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,CAAC"}
|
package/package.json
CHANGED
package/src/emails/index.tsx
CHANGED
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Body,
|
|
4
|
+
Column,
|
|
5
|
+
Container,
|
|
6
|
+
Head,
|
|
7
|
+
Hr,
|
|
8
|
+
Html,
|
|
9
|
+
Img,
|
|
10
|
+
Link,
|
|
11
|
+
Preview,
|
|
12
|
+
Row,
|
|
13
|
+
Section,
|
|
14
|
+
Text,
|
|
15
|
+
} from "@react-email/components";
|
|
16
|
+
|
|
17
|
+
interface MuscleGroup {
|
|
18
|
+
muscleGroupId: string;
|
|
19
|
+
name: string;
|
|
20
|
+
sets: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface MonthlyMetrics {
|
|
24
|
+
accountId: number;
|
|
25
|
+
email: string;
|
|
26
|
+
reportMonth: string; // YYYY-MM-01
|
|
27
|
+
|
|
28
|
+
// Metrics
|
|
29
|
+
avgStepCount: number | null;
|
|
30
|
+
avgBodyweight: number | null;
|
|
31
|
+
bodyweightChange: number | null;
|
|
32
|
+
avgSessionsPerWeek: number | null;
|
|
33
|
+
totalSetsTracked: number | null;
|
|
34
|
+
totalSessionsTracked: number | null;
|
|
35
|
+
topMuscleGroups: Array<MuscleGroup> | null;
|
|
36
|
+
|
|
37
|
+
// Survey metrics (optional)
|
|
38
|
+
avgReadinessEnergy: number | null;
|
|
39
|
+
avgReadinessMood: number | null;
|
|
40
|
+
avgReadinessStress: number | null;
|
|
41
|
+
avgReadinessSoreness: number | null;
|
|
42
|
+
avgReadinessSleep: number | null;
|
|
43
|
+
avgSessionSatisfaction: number | null;
|
|
44
|
+
avgSessionProgress: number | null;
|
|
45
|
+
avgSessionMotivation: number | null;
|
|
46
|
+
avgSessionEnjoyment: number | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface PreviousMetrics {
|
|
50
|
+
avgStepCount: number | null;
|
|
51
|
+
avgBodyweight: number | null;
|
|
52
|
+
bodyweightChange: number | null;
|
|
53
|
+
avgSessionsPerWeek: number | null;
|
|
54
|
+
totalSetsTracked: number | null;
|
|
55
|
+
totalSessionsTracked: number | null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface MonthlyReportEmailProps {
|
|
59
|
+
metrics: MonthlyMetrics;
|
|
60
|
+
previousMetrics?: PreviousMetrics | null;
|
|
61
|
+
websiteUrl?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
|
|
65
|
+
|
|
66
|
+
function formatNumber(num: number | null): string {
|
|
67
|
+
if (num === null) return "N/A";
|
|
68
|
+
return num.toLocaleString();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function formatDecimal(num: number | null, decimals: number = 1): string {
|
|
72
|
+
if (num === null) return "N/A";
|
|
73
|
+
return num.toFixed(decimals);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function getMonthName(reportMonth: string): string {
|
|
77
|
+
const date = new Date(reportMonth);
|
|
78
|
+
return date.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const MonthlyReportEmail = ({
|
|
82
|
+
metrics,
|
|
83
|
+
previousMetrics = null,
|
|
84
|
+
websiteUrl = "https://tracked.gg",
|
|
85
|
+
}: MonthlyReportEmailProps) => {
|
|
86
|
+
const monthName = getMonthName(metrics.reportMonth);
|
|
87
|
+
|
|
88
|
+
const getChangeIndicator = (
|
|
89
|
+
current: number | null,
|
|
90
|
+
previous: number | null,
|
|
91
|
+
): React.ReactNode => {
|
|
92
|
+
if (current === null || previous === null || !previousMetrics) return null;
|
|
93
|
+
const diff = current - previous;
|
|
94
|
+
if (diff > 0) {
|
|
95
|
+
return (
|
|
96
|
+
<Text style={changeIndicatorPositive}>
|
|
97
|
+
▲ {formatDecimal(Math.abs(diff))}
|
|
98
|
+
</Text>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
if (diff < 0) {
|
|
102
|
+
return (
|
|
103
|
+
<Text style={changeIndicatorNegative}>
|
|
104
|
+
▼ {formatDecimal(Math.abs(diff))}
|
|
105
|
+
</Text>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
return <Text style={changeIndicatorNeutral}>—</Text>;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const hasBodyweightData = metrics.avgBodyweight || metrics.bodyweightChange;
|
|
112
|
+
const hasSessionInsights =
|
|
113
|
+
metrics.avgReadinessEnergy ||
|
|
114
|
+
metrics.avgReadinessMood ||
|
|
115
|
+
metrics.avgSessionSatisfaction ||
|
|
116
|
+
metrics.avgSessionProgress;
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<Html>
|
|
120
|
+
<Head>
|
|
121
|
+
<meta name="color-scheme" content="light only" />
|
|
122
|
+
<meta name="supported-color-schemes" content="light only" />
|
|
123
|
+
</Head>
|
|
124
|
+
<Preview>Your {monthName} Training Report - Your monthly fitness journey at a glance</Preview>
|
|
125
|
+
<Body style={main}>
|
|
126
|
+
<Container style={container}>
|
|
127
|
+
<Section style={box}>
|
|
128
|
+
{/* Header */}
|
|
129
|
+
<Row style={{ marginBottom: "8px" }}>
|
|
130
|
+
<Column style={{ width: "auto", verticalAlign: "middle" }}>
|
|
131
|
+
<Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
|
|
132
|
+
</Column>
|
|
133
|
+
<Column
|
|
134
|
+
style={{
|
|
135
|
+
width: "auto",
|
|
136
|
+
verticalAlign: "middle",
|
|
137
|
+
paddingLeft: "4px",
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
140
|
+
<Text style={logo}>TRACKED</Text>
|
|
141
|
+
</Column>
|
|
142
|
+
</Row>
|
|
143
|
+
|
|
144
|
+
{/* Purple Gradient Section */}
|
|
145
|
+
<Section style={headerSection}>
|
|
146
|
+
<Text style={headerTitle}>Your {monthName} Training Report</Text>
|
|
147
|
+
<Text style={headerSubtitle}>
|
|
148
|
+
Your monthly fitness journey at a glance
|
|
149
|
+
</Text>
|
|
150
|
+
</Section>
|
|
151
|
+
|
|
152
|
+
<Hr style={hr} />
|
|
153
|
+
|
|
154
|
+
{/* Activity Overview */}
|
|
155
|
+
<Section style={sectionContainer}>
|
|
156
|
+
<Text style={sectionHeading}>📊 Activity Overview</Text>
|
|
157
|
+
<Section style={metricBox}>
|
|
158
|
+
<Text style={metricLabel}>Average Daily Steps</Text>
|
|
159
|
+
<Row>
|
|
160
|
+
<Column>
|
|
161
|
+
<Text style={metricValue}>
|
|
162
|
+
{formatNumber(metrics.avgStepCount)}
|
|
163
|
+
</Text>
|
|
164
|
+
</Column>
|
|
165
|
+
{getChangeIndicator(
|
|
166
|
+
metrics.avgStepCount,
|
|
167
|
+
previousMetrics?.avgStepCount || null,
|
|
168
|
+
)}
|
|
169
|
+
</Row>
|
|
170
|
+
</Section>
|
|
171
|
+
</Section>
|
|
172
|
+
|
|
173
|
+
{/* Bodyweight Progress */}
|
|
174
|
+
{hasBodyweightData && (
|
|
175
|
+
<>
|
|
176
|
+
<Hr style={hr} />
|
|
177
|
+
<Section style={sectionContainer}>
|
|
178
|
+
<Text style={sectionHeading}>⚖️ Bodyweight Trends</Text>
|
|
179
|
+
<Row>
|
|
180
|
+
<Column style={{ width: "48%" }}>
|
|
181
|
+
<Section style={metricBox}>
|
|
182
|
+
<Text style={metricLabel}>Average Bodyweight</Text>
|
|
183
|
+
<Row>
|
|
184
|
+
<Column>
|
|
185
|
+
<Text style={metricValueSmall}>
|
|
186
|
+
{formatDecimal(metrics.avgBodyweight, 1)} lbs
|
|
187
|
+
</Text>
|
|
188
|
+
</Column>
|
|
189
|
+
{getChangeIndicator(
|
|
190
|
+
metrics.avgBodyweight,
|
|
191
|
+
previousMetrics?.avgBodyweight || null,
|
|
192
|
+
)}
|
|
193
|
+
</Row>
|
|
194
|
+
</Section>
|
|
195
|
+
</Column>
|
|
196
|
+
<Column style={{ width: "4%" }} />
|
|
197
|
+
<Column style={{ width: "48%" }}>
|
|
198
|
+
<Section style={metricBox}>
|
|
199
|
+
<Text style={metricLabel}>Monthly Change</Text>
|
|
200
|
+
<Text style={metricValueSmall}>
|
|
201
|
+
{metrics.bodyweightChange !== null
|
|
202
|
+
? (metrics.bodyweightChange >= 0 ? "+" : "") +
|
|
203
|
+
formatDecimal(metrics.bodyweightChange, 1) +
|
|
204
|
+
" lbs"
|
|
205
|
+
: "N/A"}
|
|
206
|
+
</Text>
|
|
207
|
+
</Section>
|
|
208
|
+
</Column>
|
|
209
|
+
</Row>
|
|
210
|
+
</Section>
|
|
211
|
+
</>
|
|
212
|
+
)}
|
|
213
|
+
|
|
214
|
+
{/* Training Summary */}
|
|
215
|
+
<Hr style={hr} />
|
|
216
|
+
<Section style={sectionContainer}>
|
|
217
|
+
<Text style={sectionHeading}>💪 Training Summary</Text>
|
|
218
|
+
<Row>
|
|
219
|
+
<Column style={{ width: "48%" }}>
|
|
220
|
+
<Section style={metricBox}>
|
|
221
|
+
<Text style={metricLabel}>Sessions Per Week</Text>
|
|
222
|
+
<Row>
|
|
223
|
+
<Column>
|
|
224
|
+
<Text style={metricValueSmall}>
|
|
225
|
+
{formatDecimal(metrics.avgSessionsPerWeek, 1)}
|
|
226
|
+
</Text>
|
|
227
|
+
</Column>
|
|
228
|
+
{getChangeIndicator(
|
|
229
|
+
metrics.avgSessionsPerWeek,
|
|
230
|
+
previousMetrics?.avgSessionsPerWeek || null,
|
|
231
|
+
)}
|
|
232
|
+
</Row>
|
|
233
|
+
</Section>
|
|
234
|
+
</Column>
|
|
235
|
+
<Column style={{ width: "4%" }} />
|
|
236
|
+
<Column style={{ width: "48%" }}>
|
|
237
|
+
<Section style={metricBox}>
|
|
238
|
+
<Text style={metricLabel}>Total Sessions</Text>
|
|
239
|
+
<Row>
|
|
240
|
+
<Column>
|
|
241
|
+
<Text style={metricValueSmall}>
|
|
242
|
+
{formatNumber(metrics.totalSessionsTracked)}
|
|
243
|
+
</Text>
|
|
244
|
+
</Column>
|
|
245
|
+
{getChangeIndicator(
|
|
246
|
+
metrics.totalSessionsTracked,
|
|
247
|
+
previousMetrics?.totalSessionsTracked || null,
|
|
248
|
+
)}
|
|
249
|
+
</Row>
|
|
250
|
+
</Section>
|
|
251
|
+
</Column>
|
|
252
|
+
</Row>
|
|
253
|
+
<Section style={{ ...metricBox, marginTop: "10px" }}>
|
|
254
|
+
<Text style={metricLabel}>Total Sets Tracked</Text>
|
|
255
|
+
<Row>
|
|
256
|
+
<Column>
|
|
257
|
+
<Text style={metricValue}>
|
|
258
|
+
{formatNumber(metrics.totalSetsTracked)}
|
|
259
|
+
</Text>
|
|
260
|
+
</Column>
|
|
261
|
+
{getChangeIndicator(
|
|
262
|
+
metrics.totalSetsTracked,
|
|
263
|
+
previousMetrics?.totalSetsTracked || null,
|
|
264
|
+
)}
|
|
265
|
+
</Row>
|
|
266
|
+
</Section>
|
|
267
|
+
</Section>
|
|
268
|
+
|
|
269
|
+
{/* Top Muscle Groups */}
|
|
270
|
+
{metrics.topMuscleGroups && metrics.topMuscleGroups.length > 0 && (
|
|
271
|
+
<>
|
|
272
|
+
<Hr style={hr} />
|
|
273
|
+
<Section style={sectionContainer}>
|
|
274
|
+
<Text style={sectionHeading}>
|
|
275
|
+
🎯 Top 5 Prioritized Muscle Groups
|
|
276
|
+
</Text>
|
|
277
|
+
<Section style={listBox}>
|
|
278
|
+
{metrics.topMuscleGroups.map((mg, idx) => (
|
|
279
|
+
<Row
|
|
280
|
+
key={mg.muscleGroupId}
|
|
281
|
+
style={{
|
|
282
|
+
...listItem,
|
|
283
|
+
borderBottom:
|
|
284
|
+
idx < metrics.topMuscleGroups!.length - 1
|
|
285
|
+
? "1px solid #e5e7eb"
|
|
286
|
+
: "none",
|
|
287
|
+
}}
|
|
288
|
+
>
|
|
289
|
+
<Column>
|
|
290
|
+
<Text style={listItemName}>
|
|
291
|
+
{idx + 1}. {mg.name}
|
|
292
|
+
</Text>
|
|
293
|
+
</Column>
|
|
294
|
+
<Column style={{ textAlign: "right" }}>
|
|
295
|
+
<Text style={listItemValue}>
|
|
296
|
+
{formatNumber(mg.sets)} sets
|
|
297
|
+
</Text>
|
|
298
|
+
</Column>
|
|
299
|
+
</Row>
|
|
300
|
+
))}
|
|
301
|
+
</Section>
|
|
302
|
+
</Section>
|
|
303
|
+
</>
|
|
304
|
+
)}
|
|
305
|
+
|
|
306
|
+
{/* Session Insights */}
|
|
307
|
+
{hasSessionInsights && (
|
|
308
|
+
<>
|
|
309
|
+
<Hr style={hr} />
|
|
310
|
+
<Section style={sectionContainer}>
|
|
311
|
+
<Text style={sectionHeading}>📈 Session Insights</Text>
|
|
312
|
+
<Section style={listBox}>
|
|
313
|
+
{metrics.avgReadinessEnergy && (
|
|
314
|
+
<Row style={insightRow}>
|
|
315
|
+
<Column>
|
|
316
|
+
<Text style={insightLabel}>
|
|
317
|
+
Avg Readiness Energy
|
|
318
|
+
</Text>
|
|
319
|
+
</Column>
|
|
320
|
+
<Column style={{ textAlign: "right" }}>
|
|
321
|
+
<Text style={insightValue}>
|
|
322
|
+
{formatDecimal(metrics.avgReadinessEnergy)}/10
|
|
323
|
+
</Text>
|
|
324
|
+
</Column>
|
|
325
|
+
</Row>
|
|
326
|
+
)}
|
|
327
|
+
{metrics.avgReadinessMood && (
|
|
328
|
+
<Row style={insightRow}>
|
|
329
|
+
<Column>
|
|
330
|
+
<Text style={insightLabel}>Avg Readiness Mood</Text>
|
|
331
|
+
</Column>
|
|
332
|
+
<Column style={{ textAlign: "right" }}>
|
|
333
|
+
<Text style={insightValue}>
|
|
334
|
+
{formatDecimal(metrics.avgReadinessMood)}/10
|
|
335
|
+
</Text>
|
|
336
|
+
</Column>
|
|
337
|
+
</Row>
|
|
338
|
+
)}
|
|
339
|
+
{metrics.avgSessionSatisfaction && (
|
|
340
|
+
<Row style={insightRow}>
|
|
341
|
+
<Column>
|
|
342
|
+
<Text style={insightLabel}>
|
|
343
|
+
Avg Session Satisfaction
|
|
344
|
+
</Text>
|
|
345
|
+
</Column>
|
|
346
|
+
<Column style={{ textAlign: "right" }}>
|
|
347
|
+
<Text style={insightValue}>
|
|
348
|
+
{formatDecimal(metrics.avgSessionSatisfaction)}/10
|
|
349
|
+
</Text>
|
|
350
|
+
</Column>
|
|
351
|
+
</Row>
|
|
352
|
+
)}
|
|
353
|
+
{metrics.avgSessionProgress && (
|
|
354
|
+
<Row style={insightRow}>
|
|
355
|
+
<Column>
|
|
356
|
+
<Text style={insightLabel}>
|
|
357
|
+
Avg Session Progress
|
|
358
|
+
</Text>
|
|
359
|
+
</Column>
|
|
360
|
+
<Column style={{ textAlign: "right" }}>
|
|
361
|
+
<Text style={insightValue}>
|
|
362
|
+
{formatDecimal(metrics.avgSessionProgress)}/10
|
|
363
|
+
</Text>
|
|
364
|
+
</Column>
|
|
365
|
+
</Row>
|
|
366
|
+
)}
|
|
367
|
+
</Section>
|
|
368
|
+
</Section>
|
|
369
|
+
</>
|
|
370
|
+
)}
|
|
371
|
+
|
|
372
|
+
{/* Footer Message */}
|
|
373
|
+
<Hr style={hr} />
|
|
374
|
+
<Section style={footerMessageBox}>
|
|
375
|
+
<Text style={footerMessage}>
|
|
376
|
+
Keep up the great work! Every rep, every session, every step
|
|
377
|
+
counts towards your goals.
|
|
378
|
+
</Text>
|
|
379
|
+
<Text style={footerMessageSmall}>
|
|
380
|
+
You can manage your email preferences in the Tracked app
|
|
381
|
+
settings.
|
|
382
|
+
</Text>
|
|
383
|
+
</Section>
|
|
384
|
+
|
|
385
|
+
<Hr style={hr} />
|
|
386
|
+
|
|
387
|
+
{/* Footer Links */}
|
|
388
|
+
<Text style={footer}>
|
|
389
|
+
Copyright © {new Date().getFullYear()} Tracked Training Platform Inc. <br /> 9101 Horne
|
|
390
|
+
Street, Vancouver, BC
|
|
391
|
+
</Text>
|
|
392
|
+
|
|
393
|
+
<Container>
|
|
394
|
+
<Link
|
|
395
|
+
href={`${websiteUrl}/terms`}
|
|
396
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
397
|
+
>
|
|
398
|
+
Terms
|
|
399
|
+
</Link>
|
|
400
|
+
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
401
|
+
<Link
|
|
402
|
+
href={`${websiteUrl}/privacy`}
|
|
403
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
404
|
+
>
|
|
405
|
+
Privacy
|
|
406
|
+
</Link>
|
|
407
|
+
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
408
|
+
<Link
|
|
409
|
+
href={`${websiteUrl}/support`}
|
|
410
|
+
style={{ ...footer, paddingRight: 10 }}
|
|
411
|
+
>
|
|
412
|
+
Support
|
|
413
|
+
</Link>
|
|
414
|
+
</Container>
|
|
415
|
+
|
|
416
|
+
<Text style={footer}>
|
|
417
|
+
This is a service notification by the Tracked Training Platform.
|
|
418
|
+
</Text>
|
|
419
|
+
</Section>
|
|
420
|
+
</Container>
|
|
421
|
+
</Body>
|
|
422
|
+
</Html>
|
|
423
|
+
);
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
// Styles
|
|
427
|
+
const main = {
|
|
428
|
+
backgroundColor: "#f3f4f6",
|
|
429
|
+
fontFamily:
|
|
430
|
+
"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
const container = {
|
|
434
|
+
margin: "0 auto",
|
|
435
|
+
padding: "20px 0 48px",
|
|
436
|
+
maxWidth: "600px",
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
const box = {
|
|
440
|
+
backgroundColor: "#ffffff",
|
|
441
|
+
borderRadius: "8px",
|
|
442
|
+
padding: "0 24px 24px 24px",
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
const logo = {
|
|
446
|
+
fontSize: "28px",
|
|
447
|
+
fontWeight: "900",
|
|
448
|
+
fontFamily:
|
|
449
|
+
"Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
450
|
+
color: "#020617",
|
|
451
|
+
margin: "0",
|
|
452
|
+
lineHeight: "32px",
|
|
453
|
+
letterSpacing: "0.5px",
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
const headerSection = {
|
|
457
|
+
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
458
|
+
padding: "40px 20px",
|
|
459
|
+
textAlign: "center" as const,
|
|
460
|
+
borderRadius: "8px",
|
|
461
|
+
margin: "20px 0",
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
const headerTitle = {
|
|
465
|
+
color: "#ffffff",
|
|
466
|
+
margin: "0",
|
|
467
|
+
fontSize: "28px",
|
|
468
|
+
fontWeight: "700",
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
const headerSubtitle = {
|
|
472
|
+
color: "#e9d5ff",
|
|
473
|
+
margin: "10px 0 0 0",
|
|
474
|
+
fontSize: "16px",
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
const hr = {
|
|
478
|
+
borderColor: "#e5e7eb",
|
|
479
|
+
margin: "20px 0",
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
const sectionContainer = {
|
|
483
|
+
marginBottom: "20px",
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
const sectionHeading = {
|
|
487
|
+
color: "#1f2937",
|
|
488
|
+
fontSize: "20px",
|
|
489
|
+
margin: "0 0 20px 0",
|
|
490
|
+
fontWeight: "600",
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
const metricBox = {
|
|
494
|
+
backgroundColor: "#f9fafb",
|
|
495
|
+
padding: "15px",
|
|
496
|
+
borderRadius: "8px",
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
const metricLabel = {
|
|
500
|
+
color: "#6b7280",
|
|
501
|
+
fontSize: "14px",
|
|
502
|
+
marginBottom: "5px",
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
const metricValue = {
|
|
506
|
+
color: "#1f2937",
|
|
507
|
+
fontSize: "24px",
|
|
508
|
+
fontWeight: "700",
|
|
509
|
+
margin: "0",
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
const metricValueSmall = {
|
|
513
|
+
color: "#1f2937",
|
|
514
|
+
fontSize: "20px",
|
|
515
|
+
fontWeight: "700",
|
|
516
|
+
margin: "0",
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
const changeIndicatorPositive = {
|
|
520
|
+
color: "#10b981",
|
|
521
|
+
fontSize: "14px",
|
|
522
|
+
marginLeft: "8px",
|
|
523
|
+
display: "inline",
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
const changeIndicatorNegative = {
|
|
527
|
+
color: "#ef4444",
|
|
528
|
+
fontSize: "14px",
|
|
529
|
+
marginLeft: "8px",
|
|
530
|
+
display: "inline",
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
const changeIndicatorNeutral = {
|
|
534
|
+
color: "#6b7280",
|
|
535
|
+
fontSize: "14px",
|
|
536
|
+
marginLeft: "8px",
|
|
537
|
+
display: "inline",
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
const listBox = {
|
|
541
|
+
backgroundColor: "#f9fafb",
|
|
542
|
+
borderRadius: "8px",
|
|
543
|
+
overflow: "hidden",
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
const listItem = {
|
|
547
|
+
padding: "12px",
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
const listItemName = {
|
|
551
|
+
color: "#1f2937",
|
|
552
|
+
fontSize: "16px",
|
|
553
|
+
fontWeight: "600",
|
|
554
|
+
margin: "0",
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
const listItemValue = {
|
|
558
|
+
color: "#6b7280",
|
|
559
|
+
fontSize: "16px",
|
|
560
|
+
margin: "0",
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
const insightRow = {
|
|
564
|
+
padding: "10px",
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
const insightLabel = {
|
|
568
|
+
color: "#6b7280",
|
|
569
|
+
fontSize: "14px",
|
|
570
|
+
margin: "0",
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
const insightValue = {
|
|
574
|
+
color: "#1f2937",
|
|
575
|
+
fontSize: "16px",
|
|
576
|
+
fontWeight: "600",
|
|
577
|
+
margin: "0",
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
const footerMessageBox = {
|
|
581
|
+
marginTop: "20px",
|
|
582
|
+
padding: "20px",
|
|
583
|
+
backgroundColor: "#f9fafb",
|
|
584
|
+
borderRadius: "8px",
|
|
585
|
+
textAlign: "center" as const,
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
const footerMessage = {
|
|
589
|
+
color: "#6b7280",
|
|
590
|
+
fontSize: "14px",
|
|
591
|
+
margin: "0",
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
const footerMessageSmall = {
|
|
595
|
+
color: "#6b7280",
|
|
596
|
+
fontSize: "12px",
|
|
597
|
+
margin: "15px 0 0 0",
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
const footer = {
|
|
601
|
+
color: "#9ca3af",
|
|
602
|
+
fontSize: "12px",
|
|
603
|
+
lineHeight: "16px",
|
|
604
|
+
textAlign: "center" as const,
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
export default MonthlyReportEmail;
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { DirectMessageEmail } from "./emails/direct-message.js";
|
|
|
6
6
|
import { FeatureDiscoveryEmail } from "./emails/feature-discovery.js";
|
|
7
7
|
import { FirstWorkoutAssignedEmail } from "./emails/first-workout-assigned.js";
|
|
8
8
|
import { FirstWorkoutCompletedEmail } from "./emails/first-workout-completed.js";
|
|
9
|
+
import { MonthlyReportEmail } from "./emails/monthly-report.js";
|
|
9
10
|
import { NewFollowerEmail } from "./emails/new-follower.js";
|
|
10
11
|
import { SubscriptionCanceledEmail } from "./emails/subscription-canceled.js";
|
|
11
12
|
import { SupportEmail } from "./emails/support-email.js";
|
|
@@ -36,6 +37,7 @@ export {
|
|
|
36
37
|
FeatureDiscoveryEmail,
|
|
37
38
|
FirstWorkoutAssignedEmail,
|
|
38
39
|
FirstWorkoutCompletedEmail,
|
|
40
|
+
MonthlyReportEmail,
|
|
39
41
|
NewFollowerEmail,
|
|
40
42
|
SubscriptionCanceledEmail,
|
|
41
43
|
SupportEmail,
|