@blackcode_sa/metaestetics-api 1.14.32 → 1.14.34
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/admin/index.js +20 -33
- package/dist/admin/index.mjs +20 -33
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
- package/src/admin/mailing/patientInvite/patientInvite.mailing.ts +3 -3
- package/src/admin/mailing/patientInvite/templates/invitation.template.ts +13 -28
- package/src/services/analytics/analytics.service.ts +10 -4
package/dist/admin/index.js
CHANGED
|
@@ -9111,7 +9111,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
9111
9111
|
return metrics;
|
|
9112
9112
|
}
|
|
9113
9113
|
}
|
|
9114
|
-
const
|
|
9114
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
9115
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
9115
9116
|
const canceled = getCanceledAppointments(appointments);
|
|
9116
9117
|
if (groupBy === "clinic") {
|
|
9117
9118
|
return this.groupCancellationsByClinic(canceled, appointments);
|
|
@@ -9340,7 +9341,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
9340
9341
|
return metrics;
|
|
9341
9342
|
}
|
|
9342
9343
|
}
|
|
9343
|
-
const
|
|
9344
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
9345
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
9344
9346
|
const noShow = getNoShowAppointments(appointments);
|
|
9345
9347
|
if (groupBy === "clinic") {
|
|
9346
9348
|
return this.groupNoShowsByClinic(noShow, appointments);
|
|
@@ -13180,7 +13182,7 @@ var patientInvitationTemplate = `
|
|
|
13180
13182
|
padding: 20px;
|
|
13181
13183
|
}
|
|
13182
13184
|
.header {
|
|
13183
|
-
background-color: #
|
|
13185
|
+
background-color: #4A90E2;
|
|
13184
13186
|
padding: 20px;
|
|
13185
13187
|
text-align: center;
|
|
13186
13188
|
color: white;
|
|
@@ -13195,31 +13197,20 @@ var patientInvitationTemplate = `
|
|
|
13195
13197
|
font-size: 12px;
|
|
13196
13198
|
color: #888;
|
|
13197
13199
|
}
|
|
13198
|
-
.button {
|
|
13199
|
-
display: inline-block;
|
|
13200
|
-
background-color: #2C8E99;
|
|
13201
|
-
color: white;
|
|
13202
|
-
text-decoration: none;
|
|
13203
|
-
padding: 12px 24px;
|
|
13204
|
-
border-radius: 4px;
|
|
13205
|
-
margin: 20px 0;
|
|
13206
|
-
font-weight: bold;
|
|
13207
|
-
}
|
|
13208
13200
|
.token {
|
|
13209
|
-
font-size:
|
|
13201
|
+
font-size: 24px;
|
|
13210
13202
|
font-weight: bold;
|
|
13211
|
-
color: #
|
|
13212
|
-
padding:
|
|
13213
|
-
background-color: #
|
|
13214
|
-
border-radius:
|
|
13203
|
+
color: #4A90E2;
|
|
13204
|
+
padding: 10px;
|
|
13205
|
+
background-color: #e9f0f9;
|
|
13206
|
+
border-radius: 4px;
|
|
13215
13207
|
display: inline-block;
|
|
13216
|
-
letter-spacing:
|
|
13217
|
-
margin:
|
|
13218
|
-
font-family: monospace;
|
|
13208
|
+
letter-spacing: 2px;
|
|
13209
|
+
margin: 10px 0;
|
|
13219
13210
|
}
|
|
13220
13211
|
.info-box {
|
|
13221
13212
|
background-color: #fff;
|
|
13222
|
-
border-left: 4px solid #
|
|
13213
|
+
border-left: 4px solid #4A90E2;
|
|
13223
13214
|
padding: 15px;
|
|
13224
13215
|
margin: 20px 0;
|
|
13225
13216
|
}
|
|
@@ -13228,7 +13219,7 @@ var patientInvitationTemplate = `
|
|
|
13228
13219
|
<body>
|
|
13229
13220
|
<div class="container">
|
|
13230
13221
|
<div class="header">
|
|
13231
|
-
<h1>Welcome to
|
|
13222
|
+
<h1>Welcome to MetaEsthetics</h1>
|
|
13232
13223
|
</div>
|
|
13233
13224
|
<div class="content">
|
|
13234
13225
|
<p>Hello {{patientName}},</p>
|
|
@@ -13255,21 +13246,17 @@ var patientInvitationTemplate = `
|
|
|
13255
13246
|
|
|
13256
13247
|
<p>To create your account:</p>
|
|
13257
13248
|
<ol>
|
|
13258
|
-
<li>Download the
|
|
13259
|
-
<li>
|
|
13249
|
+
<li>Download the <strong>MetaEsthetics</strong> app from the App Store (iOS) or Google Play Store (Android)</li>
|
|
13250
|
+
<li>Open the app and create an account using your email address</li>
|
|
13260
13251
|
<li>When prompted, enter the token shown above</li>
|
|
13261
13252
|
<li>Your profile will be automatically linked to your new account</li>
|
|
13262
13253
|
</ol>
|
|
13263
13254
|
|
|
13264
|
-
<div style="text-align: center;">
|
|
13265
|
-
<a href="{{registrationUrl}}" class="button">Create Your Account</a>
|
|
13266
|
-
</div>
|
|
13267
|
-
|
|
13268
13255
|
<p>If you have any questions or didn't expect this email, please contact {{contactName}} at {{contactEmail}}.</p>
|
|
13269
13256
|
</div>
|
|
13270
13257
|
<div class="footer">
|
|
13271
13258
|
<p>This is an automated message from {{clinicName}}. Please do not reply to this email.</p>
|
|
13272
|
-
<p>© {{currentYear}}
|
|
13259
|
+
<p>© {{currentYear}} MetaEsthetics. All rights reserved.</p>
|
|
13273
13260
|
</div>
|
|
13274
13261
|
</div>
|
|
13275
13262
|
</body>
|
|
@@ -13286,7 +13273,7 @@ var PatientInviteMailingService = class extends BaseMailingService {
|
|
|
13286
13273
|
constructor(firestore19, mailgunClient) {
|
|
13287
13274
|
super(firestore19, mailgunClient);
|
|
13288
13275
|
this.DEFAULT_REGISTRATION_URL = "https://metaesthetics.net/patient/register";
|
|
13289
|
-
this.DEFAULT_SUBJECT = "Claim Your Patient Profile -
|
|
13276
|
+
this.DEFAULT_SUBJECT = "Claim Your Patient Profile - MetaEsthetics";
|
|
13290
13277
|
this.DEFAULT_MAILGUN_DOMAIN = "mg.metaesthetics.net";
|
|
13291
13278
|
}
|
|
13292
13279
|
/**
|
|
@@ -13311,7 +13298,7 @@ var PatientInviteMailingService = class extends BaseMailingService {
|
|
|
13311
13298
|
const contactName = data.clinic.contactName || "Clinic Administrator";
|
|
13312
13299
|
const contactEmail = data.clinic.contactEmail;
|
|
13313
13300
|
const subject = ((_b = data.options) == null ? void 0 : _b.customSubject) || this.DEFAULT_SUBJECT;
|
|
13314
|
-
const fromAddress = ((_c = data.options) == null ? void 0 : _c.fromAddress) || `
|
|
13301
|
+
const fromAddress = ((_c = data.options) == null ? void 0 : _c.fromAddress) || `MetaEsthetics <no-reply@${((_d = data.options) == null ? void 0 : _d.mailgunDomain) || this.DEFAULT_MAILGUN_DOMAIN}>`;
|
|
13315
13302
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear().toString();
|
|
13316
13303
|
const patientName = `${data.patient.firstName} ${data.patient.lastName}`;
|
|
13317
13304
|
const templateVariables = {
|
|
@@ -13481,7 +13468,7 @@ var PatientInviteMailingService = class extends BaseMailingService {
|
|
|
13481
13468
|
Logger.warn(
|
|
13482
13469
|
"[PatientInviteMailingService] No fromAddress provided, using default"
|
|
13483
13470
|
);
|
|
13484
|
-
mailgunConfig.fromAddress = `
|
|
13471
|
+
mailgunConfig.fromAddress = `MetaEsthetics <no-reply@${this.DEFAULT_MAILGUN_DOMAIN}>`;
|
|
13485
13472
|
}
|
|
13486
13473
|
const emailData = {
|
|
13487
13474
|
token: {
|
package/dist/admin/index.mjs
CHANGED
|
@@ -9035,7 +9035,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
9035
9035
|
return metrics;
|
|
9036
9036
|
}
|
|
9037
9037
|
}
|
|
9038
|
-
const
|
|
9038
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
9039
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
9039
9040
|
const canceled = getCanceledAppointments(appointments);
|
|
9040
9041
|
if (groupBy === "clinic") {
|
|
9041
9042
|
return this.groupCancellationsByClinic(canceled, appointments);
|
|
@@ -9264,7 +9265,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
9264
9265
|
return metrics;
|
|
9265
9266
|
}
|
|
9266
9267
|
}
|
|
9267
|
-
const
|
|
9268
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
9269
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
9268
9270
|
const noShow = getNoShowAppointments(appointments);
|
|
9269
9271
|
if (groupBy === "clinic") {
|
|
9270
9272
|
return this.groupNoShowsByClinic(noShow, appointments);
|
|
@@ -13104,7 +13106,7 @@ var patientInvitationTemplate = `
|
|
|
13104
13106
|
padding: 20px;
|
|
13105
13107
|
}
|
|
13106
13108
|
.header {
|
|
13107
|
-
background-color: #
|
|
13109
|
+
background-color: #4A90E2;
|
|
13108
13110
|
padding: 20px;
|
|
13109
13111
|
text-align: center;
|
|
13110
13112
|
color: white;
|
|
@@ -13119,31 +13121,20 @@ var patientInvitationTemplate = `
|
|
|
13119
13121
|
font-size: 12px;
|
|
13120
13122
|
color: #888;
|
|
13121
13123
|
}
|
|
13122
|
-
.button {
|
|
13123
|
-
display: inline-block;
|
|
13124
|
-
background-color: #2C8E99;
|
|
13125
|
-
color: white;
|
|
13126
|
-
text-decoration: none;
|
|
13127
|
-
padding: 12px 24px;
|
|
13128
|
-
border-radius: 4px;
|
|
13129
|
-
margin: 20px 0;
|
|
13130
|
-
font-weight: bold;
|
|
13131
|
-
}
|
|
13132
13124
|
.token {
|
|
13133
|
-
font-size:
|
|
13125
|
+
font-size: 24px;
|
|
13134
13126
|
font-weight: bold;
|
|
13135
|
-
color: #
|
|
13136
|
-
padding:
|
|
13137
|
-
background-color: #
|
|
13138
|
-
border-radius:
|
|
13127
|
+
color: #4A90E2;
|
|
13128
|
+
padding: 10px;
|
|
13129
|
+
background-color: #e9f0f9;
|
|
13130
|
+
border-radius: 4px;
|
|
13139
13131
|
display: inline-block;
|
|
13140
|
-
letter-spacing:
|
|
13141
|
-
margin:
|
|
13142
|
-
font-family: monospace;
|
|
13132
|
+
letter-spacing: 2px;
|
|
13133
|
+
margin: 10px 0;
|
|
13143
13134
|
}
|
|
13144
13135
|
.info-box {
|
|
13145
13136
|
background-color: #fff;
|
|
13146
|
-
border-left: 4px solid #
|
|
13137
|
+
border-left: 4px solid #4A90E2;
|
|
13147
13138
|
padding: 15px;
|
|
13148
13139
|
margin: 20px 0;
|
|
13149
13140
|
}
|
|
@@ -13152,7 +13143,7 @@ var patientInvitationTemplate = `
|
|
|
13152
13143
|
<body>
|
|
13153
13144
|
<div class="container">
|
|
13154
13145
|
<div class="header">
|
|
13155
|
-
<h1>Welcome to
|
|
13146
|
+
<h1>Welcome to MetaEsthetics</h1>
|
|
13156
13147
|
</div>
|
|
13157
13148
|
<div class="content">
|
|
13158
13149
|
<p>Hello {{patientName}},</p>
|
|
@@ -13179,21 +13170,17 @@ var patientInvitationTemplate = `
|
|
|
13179
13170
|
|
|
13180
13171
|
<p>To create your account:</p>
|
|
13181
13172
|
<ol>
|
|
13182
|
-
<li>Download the
|
|
13183
|
-
<li>
|
|
13173
|
+
<li>Download the <strong>MetaEsthetics</strong> app from the App Store (iOS) or Google Play Store (Android)</li>
|
|
13174
|
+
<li>Open the app and create an account using your email address</li>
|
|
13184
13175
|
<li>When prompted, enter the token shown above</li>
|
|
13185
13176
|
<li>Your profile will be automatically linked to your new account</li>
|
|
13186
13177
|
</ol>
|
|
13187
13178
|
|
|
13188
|
-
<div style="text-align: center;">
|
|
13189
|
-
<a href="{{registrationUrl}}" class="button">Create Your Account</a>
|
|
13190
|
-
</div>
|
|
13191
|
-
|
|
13192
13179
|
<p>If you have any questions or didn't expect this email, please contact {{contactName}} at {{contactEmail}}.</p>
|
|
13193
13180
|
</div>
|
|
13194
13181
|
<div class="footer">
|
|
13195
13182
|
<p>This is an automated message from {{clinicName}}. Please do not reply to this email.</p>
|
|
13196
|
-
<p>© {{currentYear}}
|
|
13183
|
+
<p>© {{currentYear}} MetaEsthetics. All rights reserved.</p>
|
|
13197
13184
|
</div>
|
|
13198
13185
|
</div>
|
|
13199
13186
|
</body>
|
|
@@ -13210,7 +13197,7 @@ var PatientInviteMailingService = class extends BaseMailingService {
|
|
|
13210
13197
|
constructor(firestore19, mailgunClient) {
|
|
13211
13198
|
super(firestore19, mailgunClient);
|
|
13212
13199
|
this.DEFAULT_REGISTRATION_URL = "https://metaesthetics.net/patient/register";
|
|
13213
|
-
this.DEFAULT_SUBJECT = "Claim Your Patient Profile -
|
|
13200
|
+
this.DEFAULT_SUBJECT = "Claim Your Patient Profile - MetaEsthetics";
|
|
13214
13201
|
this.DEFAULT_MAILGUN_DOMAIN = "mg.metaesthetics.net";
|
|
13215
13202
|
}
|
|
13216
13203
|
/**
|
|
@@ -13235,7 +13222,7 @@ var PatientInviteMailingService = class extends BaseMailingService {
|
|
|
13235
13222
|
const contactName = data.clinic.contactName || "Clinic Administrator";
|
|
13236
13223
|
const contactEmail = data.clinic.contactEmail;
|
|
13237
13224
|
const subject = ((_b = data.options) == null ? void 0 : _b.customSubject) || this.DEFAULT_SUBJECT;
|
|
13238
|
-
const fromAddress = ((_c = data.options) == null ? void 0 : _c.fromAddress) || `
|
|
13225
|
+
const fromAddress = ((_c = data.options) == null ? void 0 : _c.fromAddress) || `MetaEsthetics <no-reply@${((_d = data.options) == null ? void 0 : _d.mailgunDomain) || this.DEFAULT_MAILGUN_DOMAIN}>`;
|
|
13239
13226
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear().toString();
|
|
13240
13227
|
const patientName = `${data.patient.firstName} ${data.patient.lastName}`;
|
|
13241
13228
|
const templateVariables = {
|
|
@@ -13405,7 +13392,7 @@ var PatientInviteMailingService = class extends BaseMailingService {
|
|
|
13405
13392
|
Logger.warn(
|
|
13406
13393
|
"[PatientInviteMailingService] No fromAddress provided, using default"
|
|
13407
13394
|
);
|
|
13408
|
-
mailgunConfig.fromAddress = `
|
|
13395
|
+
mailgunConfig.fromAddress = `MetaEsthetics <no-reply@${this.DEFAULT_MAILGUN_DOMAIN}>`;
|
|
13409
13396
|
}
|
|
13410
13397
|
const emailData = {
|
|
13411
13398
|
token: {
|
package/dist/index.js
CHANGED
|
@@ -2295,7 +2295,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
2295
2295
|
return metrics;
|
|
2296
2296
|
}
|
|
2297
2297
|
}
|
|
2298
|
-
const
|
|
2298
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
2299
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
2299
2300
|
const canceled = getCanceledAppointments(appointments);
|
|
2300
2301
|
if (groupBy === "clinic") {
|
|
2301
2302
|
return this.groupCancellationsByClinic(canceled, appointments);
|
|
@@ -2524,7 +2525,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
2524
2525
|
return metrics;
|
|
2525
2526
|
}
|
|
2526
2527
|
}
|
|
2527
|
-
const
|
|
2528
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
2529
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
2528
2530
|
const noShow = getNoShowAppointments(appointments);
|
|
2529
2531
|
if (groupBy === "clinic") {
|
|
2530
2532
|
return this.groupNoShowsByClinic(noShow, appointments);
|
package/dist/index.mjs
CHANGED
|
@@ -2138,7 +2138,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
2138
2138
|
return metrics;
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
2141
|
-
const
|
|
2141
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
2142
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
2142
2143
|
const canceled = getCanceledAppointments(appointments);
|
|
2143
2144
|
if (groupBy === "clinic") {
|
|
2144
2145
|
return this.groupCancellationsByClinic(canceled, appointments);
|
|
@@ -2367,7 +2368,8 @@ var AnalyticsService = class extends BaseService {
|
|
|
2367
2368
|
return metrics;
|
|
2368
2369
|
}
|
|
2369
2370
|
}
|
|
2370
|
-
const
|
|
2371
|
+
const filters = (options == null ? void 0 : options.clinicBranchId) ? { clinicBranchId: options.clinicBranchId } : void 0;
|
|
2372
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
2371
2373
|
const noShow = getNoShowAppointments(appointments);
|
|
2372
2374
|
if (groupBy === "clinic") {
|
|
2373
2375
|
return this.groupNoShowsByClinic(noShow, appointments);
|
package/package.json
CHANGED
|
@@ -69,7 +69,7 @@ export class PatientInviteMailingService extends BaseMailingService {
|
|
|
69
69
|
private readonly DEFAULT_REGISTRATION_URL =
|
|
70
70
|
"https://metaesthetics.net/patient/register";
|
|
71
71
|
private readonly DEFAULT_SUBJECT =
|
|
72
|
-
"Claim Your Patient Profile -
|
|
72
|
+
"Claim Your Patient Profile - MetaEsthetics";
|
|
73
73
|
private readonly DEFAULT_MAILGUN_DOMAIN = "mg.metaesthetics.net";
|
|
74
74
|
|
|
75
75
|
/**
|
|
@@ -120,7 +120,7 @@ export class PatientInviteMailingService extends BaseMailingService {
|
|
|
120
120
|
// Determine 'from' address
|
|
121
121
|
const fromAddress =
|
|
122
122
|
data.options?.fromAddress ||
|
|
123
|
-
`
|
|
123
|
+
`MetaEsthetics <no-reply@${
|
|
124
124
|
data.options?.mailgunDomain || this.DEFAULT_MAILGUN_DOMAIN
|
|
125
125
|
}>`;
|
|
126
126
|
|
|
@@ -358,7 +358,7 @@ export class PatientInviteMailingService extends BaseMailingService {
|
|
|
358
358
|
Logger.warn(
|
|
359
359
|
"[PatientInviteMailingService] No fromAddress provided, using default"
|
|
360
360
|
);
|
|
361
|
-
mailgunConfig.fromAddress = `
|
|
361
|
+
mailgunConfig.fromAddress = `MetaEsthetics <no-reply@${this.DEFAULT_MAILGUN_DOMAIN}>`;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
// Prepare email data
|
|
@@ -22,7 +22,7 @@ export const patientInvitationTemplate = `
|
|
|
22
22
|
padding: 20px;
|
|
23
23
|
}
|
|
24
24
|
.header {
|
|
25
|
-
background-color: #
|
|
25
|
+
background-color: #4A90E2;
|
|
26
26
|
padding: 20px;
|
|
27
27
|
text-align: center;
|
|
28
28
|
color: white;
|
|
@@ -37,31 +37,20 @@ export const patientInvitationTemplate = `
|
|
|
37
37
|
font-size: 12px;
|
|
38
38
|
color: #888;
|
|
39
39
|
}
|
|
40
|
-
.button {
|
|
41
|
-
display: inline-block;
|
|
42
|
-
background-color: #2C8E99;
|
|
43
|
-
color: white;
|
|
44
|
-
text-decoration: none;
|
|
45
|
-
padding: 12px 24px;
|
|
46
|
-
border-radius: 4px;
|
|
47
|
-
margin: 20px 0;
|
|
48
|
-
font-weight: bold;
|
|
49
|
-
}
|
|
50
40
|
.token {
|
|
51
|
-
font-size:
|
|
41
|
+
font-size: 24px;
|
|
52
42
|
font-weight: bold;
|
|
53
|
-
color: #
|
|
54
|
-
padding:
|
|
55
|
-
background-color: #
|
|
56
|
-
border-radius:
|
|
43
|
+
color: #4A90E2;
|
|
44
|
+
padding: 10px;
|
|
45
|
+
background-color: #e9f0f9;
|
|
46
|
+
border-radius: 4px;
|
|
57
47
|
display: inline-block;
|
|
58
|
-
letter-spacing:
|
|
59
|
-
margin:
|
|
60
|
-
font-family: monospace;
|
|
48
|
+
letter-spacing: 2px;
|
|
49
|
+
margin: 10px 0;
|
|
61
50
|
}
|
|
62
51
|
.info-box {
|
|
63
52
|
background-color: #fff;
|
|
64
|
-
border-left: 4px solid #
|
|
53
|
+
border-left: 4px solid #4A90E2;
|
|
65
54
|
padding: 15px;
|
|
66
55
|
margin: 20px 0;
|
|
67
56
|
}
|
|
@@ -70,7 +59,7 @@ export const patientInvitationTemplate = `
|
|
|
70
59
|
<body>
|
|
71
60
|
<div class="container">
|
|
72
61
|
<div class="header">
|
|
73
|
-
<h1>Welcome to
|
|
62
|
+
<h1>Welcome to MetaEsthetics</h1>
|
|
74
63
|
</div>
|
|
75
64
|
<div class="content">
|
|
76
65
|
<p>Hello {{patientName}},</p>
|
|
@@ -97,21 +86,17 @@ export const patientInvitationTemplate = `
|
|
|
97
86
|
|
|
98
87
|
<p>To create your account:</p>
|
|
99
88
|
<ol>
|
|
100
|
-
<li>Download the
|
|
101
|
-
<li>
|
|
89
|
+
<li>Download the <strong>MetaEsthetics</strong> app from the App Store (iOS) or Google Play Store (Android)</li>
|
|
90
|
+
<li>Open the app and create an account using your email address</li>
|
|
102
91
|
<li>When prompted, enter the token shown above</li>
|
|
103
92
|
<li>Your profile will be automatically linked to your new account</li>
|
|
104
93
|
</ol>
|
|
105
94
|
|
|
106
|
-
<div style="text-align: center;">
|
|
107
|
-
<a href="{{registrationUrl}}" class="button">Create Your Account</a>
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
95
|
<p>If you have any questions or didn't expect this email, please contact {{contactName}} at {{contactEmail}}.</p>
|
|
111
96
|
</div>
|
|
112
97
|
<div class="footer">
|
|
113
98
|
<p>This is an automated message from {{clinicName}}. Please do not reply to this email.</p>
|
|
114
|
-
<p>© {{currentYear}}
|
|
99
|
+
<p>© {{currentYear}} MetaEsthetics. All rights reserved.</p>
|
|
115
100
|
</div>
|
|
116
101
|
</div>
|
|
117
102
|
</body>
|
|
@@ -644,8 +644,11 @@ export class AnalyticsService extends BaseService {
|
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
|
|
647
|
-
// Fall back to calculation
|
|
648
|
-
const
|
|
647
|
+
// Fall back to calculation - filter by clinic if specified
|
|
648
|
+
const filters: AnalyticsFilters | undefined = options?.clinicBranchId
|
|
649
|
+
? { clinicBranchId: options.clinicBranchId }
|
|
650
|
+
: undefined;
|
|
651
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
649
652
|
const canceled = getCanceledAppointments(appointments);
|
|
650
653
|
|
|
651
654
|
if (groupBy === 'clinic') {
|
|
@@ -941,8 +944,11 @@ export class AnalyticsService extends BaseService {
|
|
|
941
944
|
}
|
|
942
945
|
}
|
|
943
946
|
|
|
944
|
-
// Fall back to calculation
|
|
945
|
-
const
|
|
947
|
+
// Fall back to calculation - filter by clinic if specified
|
|
948
|
+
const filters: AnalyticsFilters | undefined = options?.clinicBranchId
|
|
949
|
+
? { clinicBranchId: options.clinicBranchId }
|
|
950
|
+
: undefined;
|
|
951
|
+
const appointments = await this.fetchAppointments(filters, dateRange);
|
|
946
952
|
const noShow = getNoShowAppointments(appointments);
|
|
947
953
|
|
|
948
954
|
if (groupBy === 'clinic') {
|