@blackcode_sa/metaestetics-api 1.12.22 → 1.12.24
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.d.mts +3 -3
- package/dist/admin/index.d.ts +3 -3
- package/dist/admin/index.js +414 -22
- package/dist/admin/index.mjs +414 -22
- package/package.json +1 -1
- package/src/admin/booking/booking.calculator.ts +16 -12
- package/src/admin/mailing/appointment/appointment.mailing.service.ts +459 -104
package/dist/admin/index.d.mts
CHANGED
|
@@ -3458,14 +3458,14 @@ interface AppointmentEmailDataBase {
|
|
|
3458
3458
|
}
|
|
3459
3459
|
interface AppointmentConfirmationEmailData extends AppointmentEmailDataBase {
|
|
3460
3460
|
recipientProfile: PatientProfileInfo | PractitionerProfileInfo;
|
|
3461
|
-
recipientRole:
|
|
3461
|
+
recipientRole: 'patient' | 'practitioner';
|
|
3462
3462
|
}
|
|
3463
3463
|
interface AppointmentRequestedEmailData extends AppointmentEmailDataBase {
|
|
3464
3464
|
clinicProfile: ClinicInfo;
|
|
3465
3465
|
}
|
|
3466
3466
|
interface AppointmentCancellationEmailData extends AppointmentEmailDataBase {
|
|
3467
3467
|
recipientProfile: PatientProfileInfo | PractitionerProfileInfo;
|
|
3468
|
-
recipientRole:
|
|
3468
|
+
recipientRole: 'patient' | 'practitioner';
|
|
3469
3469
|
cancellationReason?: string;
|
|
3470
3470
|
}
|
|
3471
3471
|
interface AppointmentRescheduledProposalEmailData extends AppointmentEmailDataBase {
|
|
@@ -3479,7 +3479,7 @@ interface ReviewRequestEmailData extends AppointmentEmailDataBase {
|
|
|
3479
3479
|
}
|
|
3480
3480
|
interface ReviewAddedEmailData extends AppointmentEmailDataBase {
|
|
3481
3481
|
recipientProfile: PractitionerProfileInfo | ClinicInfo;
|
|
3482
|
-
recipientRole:
|
|
3482
|
+
recipientRole: 'practitioner' | 'clinic';
|
|
3483
3483
|
reviewerName: string;
|
|
3484
3484
|
reviewRating: number;
|
|
3485
3485
|
reviewComment?: string;
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -3458,14 +3458,14 @@ interface AppointmentEmailDataBase {
|
|
|
3458
3458
|
}
|
|
3459
3459
|
interface AppointmentConfirmationEmailData extends AppointmentEmailDataBase {
|
|
3460
3460
|
recipientProfile: PatientProfileInfo | PractitionerProfileInfo;
|
|
3461
|
-
recipientRole:
|
|
3461
|
+
recipientRole: 'patient' | 'practitioner';
|
|
3462
3462
|
}
|
|
3463
3463
|
interface AppointmentRequestedEmailData extends AppointmentEmailDataBase {
|
|
3464
3464
|
clinicProfile: ClinicInfo;
|
|
3465
3465
|
}
|
|
3466
3466
|
interface AppointmentCancellationEmailData extends AppointmentEmailDataBase {
|
|
3467
3467
|
recipientProfile: PatientProfileInfo | PractitionerProfileInfo;
|
|
3468
|
-
recipientRole:
|
|
3468
|
+
recipientRole: 'patient' | 'practitioner';
|
|
3469
3469
|
cancellationReason?: string;
|
|
3470
3470
|
}
|
|
3471
3471
|
interface AppointmentRescheduledProposalEmailData extends AppointmentEmailDataBase {
|
|
@@ -3479,7 +3479,7 @@ interface ReviewRequestEmailData extends AppointmentEmailDataBase {
|
|
|
3479
3479
|
}
|
|
3480
3480
|
interface ReviewAddedEmailData extends AppointmentEmailDataBase {
|
|
3481
3481
|
recipientProfile: PractitionerProfileInfo | ClinicInfo;
|
|
3482
|
-
recipientRole:
|
|
3482
|
+
recipientRole: 'practitioner' | 'clinic';
|
|
3483
3483
|
reviewerName: string;
|
|
3484
3484
|
reviewRating: number;
|
|
3485
3485
|
reviewComment?: string;
|
package/dist/admin/index.js
CHANGED
|
@@ -1917,8 +1917,406 @@ var BaseMailingService = class {
|
|
|
1917
1917
|
};
|
|
1918
1918
|
|
|
1919
1919
|
// src/admin/mailing/appointment/appointment.mailing.service.ts
|
|
1920
|
-
var patientAppointmentConfirmedTemplate =
|
|
1921
|
-
|
|
1920
|
+
var patientAppointmentConfirmedTemplate = `
|
|
1921
|
+
<!DOCTYPE html>
|
|
1922
|
+
<html lang="en">
|
|
1923
|
+
<head>
|
|
1924
|
+
<meta charset="UTF-8">
|
|
1925
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
1926
|
+
<title>Appointment Confirmed</title>
|
|
1927
|
+
<style>
|
|
1928
|
+
body {
|
|
1929
|
+
margin: 0;
|
|
1930
|
+
padding: 0;
|
|
1931
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
1932
|
+
background: linear-gradient(135deg, #a48a76 0%, #67574A 100%);
|
|
1933
|
+
min-height: 100vh;
|
|
1934
|
+
}
|
|
1935
|
+
.email-container {
|
|
1936
|
+
max-width: 600px;
|
|
1937
|
+
margin: 0 auto;
|
|
1938
|
+
background: #ffffff;
|
|
1939
|
+
border-radius: 20px;
|
|
1940
|
+
overflow: hidden;
|
|
1941
|
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
|
1942
|
+
margin-top: 40px;
|
|
1943
|
+
margin-bottom: 40px;
|
|
1944
|
+
}
|
|
1945
|
+
.header {
|
|
1946
|
+
background: linear-gradient(135deg, #a48a76 0%, #67574A 100%);
|
|
1947
|
+
padding: 40px 30px;
|
|
1948
|
+
text-align: center;
|
|
1949
|
+
color: white;
|
|
1950
|
+
}
|
|
1951
|
+
.header h1 {
|
|
1952
|
+
margin: 0;
|
|
1953
|
+
font-size: 28px;
|
|
1954
|
+
font-weight: 300;
|
|
1955
|
+
letter-spacing: 1px;
|
|
1956
|
+
}
|
|
1957
|
+
.header .subtitle {
|
|
1958
|
+
margin: 10px 0 0 0;
|
|
1959
|
+
font-size: 16px;
|
|
1960
|
+
opacity: 0.9;
|
|
1961
|
+
font-weight: 300;
|
|
1962
|
+
}
|
|
1963
|
+
.content {
|
|
1964
|
+
padding: 40px 30px;
|
|
1965
|
+
}
|
|
1966
|
+
.greeting {
|
|
1967
|
+
font-size: 18px;
|
|
1968
|
+
color: #333;
|
|
1969
|
+
margin-bottom: 25px;
|
|
1970
|
+
font-weight: 400;
|
|
1971
|
+
}
|
|
1972
|
+
.appointment-card {
|
|
1973
|
+
background: linear-gradient(135deg, #f8f6f5 0%, #f5f3f2 100%);
|
|
1974
|
+
border-radius: 15px;
|
|
1975
|
+
padding: 30px;
|
|
1976
|
+
margin: 25px 0;
|
|
1977
|
+
border-left: 5px solid #a48a76;
|
|
1978
|
+
}
|
|
1979
|
+
.appointment-title {
|
|
1980
|
+
font-size: 20px;
|
|
1981
|
+
color: #a48a76;
|
|
1982
|
+
margin-bottom: 20px;
|
|
1983
|
+
font-weight: 600;
|
|
1984
|
+
}
|
|
1985
|
+
.appointment-details {
|
|
1986
|
+
display: grid;
|
|
1987
|
+
gap: 15px;
|
|
1988
|
+
}
|
|
1989
|
+
.detail-row {
|
|
1990
|
+
display: flex;
|
|
1991
|
+
align-items: center;
|
|
1992
|
+
padding: 8px 0;
|
|
1993
|
+
}
|
|
1994
|
+
.detail-label {
|
|
1995
|
+
font-weight: 600;
|
|
1996
|
+
color: #555;
|
|
1997
|
+
min-width: 120px;
|
|
1998
|
+
font-size: 14px;
|
|
1999
|
+
}
|
|
2000
|
+
.detail-value {
|
|
2001
|
+
color: #333;
|
|
2002
|
+
font-size: 16px;
|
|
2003
|
+
font-weight: 500;
|
|
2004
|
+
}
|
|
2005
|
+
.procedure-name {
|
|
2006
|
+
color: #67574A;
|
|
2007
|
+
font-weight: 600;
|
|
2008
|
+
}
|
|
2009
|
+
.clinic-name {
|
|
2010
|
+
color: #a48a76;
|
|
2011
|
+
font-weight: 600;
|
|
2012
|
+
}
|
|
2013
|
+
.success-icon {
|
|
2014
|
+
text-align: center;
|
|
2015
|
+
margin: 20px 0;
|
|
2016
|
+
font-size: 48px;
|
|
2017
|
+
}
|
|
2018
|
+
.footer {
|
|
2019
|
+
background: #f8f9fa;
|
|
2020
|
+
padding: 25px 30px;
|
|
2021
|
+
text-align: center;
|
|
2022
|
+
color: #666;
|
|
2023
|
+
font-size: 14px;
|
|
2024
|
+
border-top: 1px solid #eee;
|
|
2025
|
+
}
|
|
2026
|
+
.logo {
|
|
2027
|
+
font-size: 24px;
|
|
2028
|
+
font-weight: 700;
|
|
2029
|
+
color: white;
|
|
2030
|
+
margin-bottom: 5px;
|
|
2031
|
+
}
|
|
2032
|
+
.divider {
|
|
2033
|
+
height: 2px;
|
|
2034
|
+
background: linear-gradient(90deg, #a48a76, #67574A);
|
|
2035
|
+
margin: 25px 0;
|
|
2036
|
+
border-radius: 1px;
|
|
2037
|
+
}
|
|
2038
|
+
.thank-you {
|
|
2039
|
+
background: linear-gradient(135deg, #f0ede8 0%, #ebe6e0 100%);
|
|
2040
|
+
border-radius: 15px;
|
|
2041
|
+
padding: 25px;
|
|
2042
|
+
margin: 25px 0;
|
|
2043
|
+
text-align: center;
|
|
2044
|
+
border-left: 5px solid #4CAF50;
|
|
2045
|
+
}
|
|
2046
|
+
</style>
|
|
2047
|
+
</head>
|
|
2048
|
+
<body>
|
|
2049
|
+
<div class="email-container">
|
|
2050
|
+
<div class="header">
|
|
2051
|
+
<div class="logo">MetaEstetics</div>
|
|
2052
|
+
<h1>Appointment Confirmed</h1>
|
|
2053
|
+
<div class="subtitle">Your Beauty Journey Awaits</div>
|
|
2054
|
+
</div>
|
|
2055
|
+
|
|
2056
|
+
<div class="content">
|
|
2057
|
+
<div class="success-icon">\u2728</div>
|
|
2058
|
+
|
|
2059
|
+
<div class="greeting">
|
|
2060
|
+
Dear <strong>{{patientName}}</strong>,
|
|
2061
|
+
</div>
|
|
2062
|
+
|
|
2063
|
+
<p style="color: #555; font-size: 16px; line-height: 1.6; margin-bottom: 25px;">
|
|
2064
|
+
We're delighted to confirm your appointment! Your journey to enhanced beauty and confidence is just around the corner.
|
|
2065
|
+
</p>
|
|
2066
|
+
|
|
2067
|
+
<div class="appointment-card">
|
|
2068
|
+
<div class="appointment-title">\u{1F4C5} Your Appointment Details</div>
|
|
2069
|
+
<div class="appointment-details">
|
|
2070
|
+
<div class="detail-row">
|
|
2071
|
+
<div class="detail-label">Procedure:</div>
|
|
2072
|
+
<div class="detail-value procedure-name">{{procedureName}}</div>
|
|
2073
|
+
</div>
|
|
2074
|
+
<div class="detail-row">
|
|
2075
|
+
<div class="detail-label">Date:</div>
|
|
2076
|
+
<div class="detail-value">{{appointmentDate}}</div>
|
|
2077
|
+
</div>
|
|
2078
|
+
<div class="detail-row">
|
|
2079
|
+
<div class="detail-label">Time:</div>
|
|
2080
|
+
<div class="detail-value">{{appointmentTime}}</div>
|
|
2081
|
+
</div>
|
|
2082
|
+
<div class="detail-row">
|
|
2083
|
+
<div class="detail-label">Practitioner:</div>
|
|
2084
|
+
<div class="detail-value">{{practitionerName}}</div>
|
|
2085
|
+
</div>
|
|
2086
|
+
<div class="detail-row">
|
|
2087
|
+
<div class="detail-label">Location:</div>
|
|
2088
|
+
<div class="detail-value clinic-name">{{clinicName}}</div>
|
|
2089
|
+
</div>
|
|
2090
|
+
</div>
|
|
2091
|
+
</div>
|
|
2092
|
+
|
|
2093
|
+
<div class="divider"></div>
|
|
2094
|
+
|
|
2095
|
+
<div class="thank-you">
|
|
2096
|
+
<h3 style="margin: 0 0 10px 0; color: #4caf50; font-weight: 600;">Thank You for Choosing MetaEstetics!</h3>
|
|
2097
|
+
<p style="margin: 0; color: #555; font-size: 14px;">
|
|
2098
|
+
We look forward to providing you with exceptional care and outstanding results.
|
|
2099
|
+
</p>
|
|
2100
|
+
</div>
|
|
2101
|
+
|
|
2102
|
+
<p style="color: #555; font-size: 14px; line-height: 1.6; margin-top: 25px;">
|
|
2103
|
+
<strong>Important:</strong> Please arrive 15 minutes early for your appointment. If you need to reschedule or have any questions, please contact us as soon as possible.
|
|
2104
|
+
</p>
|
|
2105
|
+
</div>
|
|
2106
|
+
|
|
2107
|
+
<div class="footer">
|
|
2108
|
+
<p style="margin: 0 0 10px 0;">
|
|
2109
|
+
<strong>MetaEstetics</strong> - Premium Aesthetic Services
|
|
2110
|
+
</p>
|
|
2111
|
+
<p style="margin: 0; font-size: 12px; color: #999;">
|
|
2112
|
+
This is an automated message. Please do not reply to this email.
|
|
2113
|
+
</p>
|
|
2114
|
+
</div>
|
|
2115
|
+
</div>
|
|
2116
|
+
</body>
|
|
2117
|
+
</html>
|
|
2118
|
+
`;
|
|
2119
|
+
var clinicAppointmentRequestedTemplate = `
|
|
2120
|
+
<!DOCTYPE html>
|
|
2121
|
+
<html lang="en">
|
|
2122
|
+
<head>
|
|
2123
|
+
<meta charset="UTF-8">
|
|
2124
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
2125
|
+
<title>New Appointment Request</title>
|
|
2126
|
+
<style>
|
|
2127
|
+
body {
|
|
2128
|
+
margin: 0;
|
|
2129
|
+
padding: 0;
|
|
2130
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
2131
|
+
background: linear-gradient(135deg, #a48a76 0%, #67574A 100%);
|
|
2132
|
+
min-height: 100vh;
|
|
2133
|
+
}
|
|
2134
|
+
.email-container {
|
|
2135
|
+
max-width: 600px;
|
|
2136
|
+
margin: 0 auto;
|
|
2137
|
+
background: #ffffff;
|
|
2138
|
+
border-radius: 20px;
|
|
2139
|
+
overflow: hidden;
|
|
2140
|
+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
|
2141
|
+
margin-top: 40px;
|
|
2142
|
+
margin-bottom: 40px;
|
|
2143
|
+
}
|
|
2144
|
+
.header {
|
|
2145
|
+
background: linear-gradient(135deg, #a48a76 0%, #67574A 100%);
|
|
2146
|
+
padding: 40px 30px;
|
|
2147
|
+
text-align: center;
|
|
2148
|
+
color: white;
|
|
2149
|
+
}
|
|
2150
|
+
.header h1 {
|
|
2151
|
+
margin: 0;
|
|
2152
|
+
font-size: 28px;
|
|
2153
|
+
font-weight: 300;
|
|
2154
|
+
letter-spacing: 1px;
|
|
2155
|
+
}
|
|
2156
|
+
.header .subtitle {
|
|
2157
|
+
margin: 10px 0 0 0;
|
|
2158
|
+
font-size: 16px;
|
|
2159
|
+
opacity: 0.9;
|
|
2160
|
+
font-weight: 300;
|
|
2161
|
+
}
|
|
2162
|
+
.content {
|
|
2163
|
+
padding: 40px 30px;
|
|
2164
|
+
}
|
|
2165
|
+
.greeting {
|
|
2166
|
+
font-size: 18px;
|
|
2167
|
+
color: #333;
|
|
2168
|
+
margin-bottom: 25px;
|
|
2169
|
+
font-weight: 400;
|
|
2170
|
+
}
|
|
2171
|
+
.appointment-card {
|
|
2172
|
+
background: linear-gradient(135deg, #f8f6f5 0%, #f5f3f2 100%);
|
|
2173
|
+
border-radius: 15px;
|
|
2174
|
+
padding: 30px;
|
|
2175
|
+
margin: 25px 0;
|
|
2176
|
+
border-left: 5px solid #a48a76;
|
|
2177
|
+
}
|
|
2178
|
+
.appointment-title {
|
|
2179
|
+
font-size: 20px;
|
|
2180
|
+
color: #a48a76;
|
|
2181
|
+
margin-bottom: 20px;
|
|
2182
|
+
font-weight: 600;
|
|
2183
|
+
}
|
|
2184
|
+
.appointment-details {
|
|
2185
|
+
display: grid;
|
|
2186
|
+
gap: 15px;
|
|
2187
|
+
}
|
|
2188
|
+
.detail-row {
|
|
2189
|
+
display: flex;
|
|
2190
|
+
align-items: center;
|
|
2191
|
+
padding: 8px 0;
|
|
2192
|
+
}
|
|
2193
|
+
.detail-label {
|
|
2194
|
+
font-weight: 600;
|
|
2195
|
+
color: #555;
|
|
2196
|
+
min-width: 120px;
|
|
2197
|
+
font-size: 14px;
|
|
2198
|
+
}
|
|
2199
|
+
.detail-value {
|
|
2200
|
+
color: #333;
|
|
2201
|
+
font-size: 16px;
|
|
2202
|
+
font-weight: 500;
|
|
2203
|
+
}
|
|
2204
|
+
.patient-name {
|
|
2205
|
+
color: #a48a76;
|
|
2206
|
+
font-weight: 600;
|
|
2207
|
+
}
|
|
2208
|
+
.procedure-name {
|
|
2209
|
+
color: #67574A;
|
|
2210
|
+
font-weight: 600;
|
|
2211
|
+
}
|
|
2212
|
+
.cta-section {
|
|
2213
|
+
text-align: center;
|
|
2214
|
+
margin: 35px 0;
|
|
2215
|
+
}
|
|
2216
|
+
.cta-button {
|
|
2217
|
+
display: inline-block;
|
|
2218
|
+
background: linear-gradient(135deg, #a48a76 0%, #67574A 100%);
|
|
2219
|
+
color: white;
|
|
2220
|
+
text-decoration: none;
|
|
2221
|
+
padding: 15px 35px;
|
|
2222
|
+
border-radius: 50px;
|
|
2223
|
+
font-weight: 600;
|
|
2224
|
+
font-size: 16px;
|
|
2225
|
+
letter-spacing: 0.5px;
|
|
2226
|
+
transition: transform 0.3s ease;
|
|
2227
|
+
box-shadow: 0 8px 25px rgba(164, 138, 118, 0.3);
|
|
2228
|
+
}
|
|
2229
|
+
.cta-button:hover {
|
|
2230
|
+
transform: translateY(-2px);
|
|
2231
|
+
}
|
|
2232
|
+
.footer {
|
|
2233
|
+
background: #f8f9fa;
|
|
2234
|
+
padding: 25px 30px;
|
|
2235
|
+
text-align: center;
|
|
2236
|
+
color: #666;
|
|
2237
|
+
font-size: 14px;
|
|
2238
|
+
border-top: 1px solid #eee;
|
|
2239
|
+
}
|
|
2240
|
+
.logo {
|
|
2241
|
+
font-size: 24px;
|
|
2242
|
+
font-weight: 700;
|
|
2243
|
+
color: white;
|
|
2244
|
+
margin-bottom: 5px;
|
|
2245
|
+
}
|
|
2246
|
+
.divider {
|
|
2247
|
+
height: 2px;
|
|
2248
|
+
background: linear-gradient(90deg, #a48a76, #67574A);
|
|
2249
|
+
margin: 25px 0;
|
|
2250
|
+
border-radius: 1px;
|
|
2251
|
+
}
|
|
2252
|
+
</style>
|
|
2253
|
+
</head>
|
|
2254
|
+
<body>
|
|
2255
|
+
<div class="email-container">
|
|
2256
|
+
<div class="header">
|
|
2257
|
+
<div class="logo">MetaEstetics</div>
|
|
2258
|
+
<h1>New Appointment Request</h1>
|
|
2259
|
+
<div class="subtitle">Requires Your Attention</div>
|
|
2260
|
+
</div>
|
|
2261
|
+
|
|
2262
|
+
<div class="content">
|
|
2263
|
+
<div class="greeting">
|
|
2264
|
+
Dear <strong>{{clinicName}}</strong> Team,
|
|
2265
|
+
</div>
|
|
2266
|
+
|
|
2267
|
+
<p style="color: #555; font-size: 16px; line-height: 1.6; margin-bottom: 25px;">
|
|
2268
|
+
We hope this message finds you well. You have received a new appointment request that requires your review and confirmation.
|
|
2269
|
+
</p>
|
|
2270
|
+
|
|
2271
|
+
<div class="appointment-card">
|
|
2272
|
+
<div class="appointment-title">\u{1F4C5} Appointment Details</div>
|
|
2273
|
+
<div class="appointment-details">
|
|
2274
|
+
<div class="detail-row">
|
|
2275
|
+
<div class="detail-label">Patient:</div>
|
|
2276
|
+
<div class="detail-value patient-name">{{patientName}}</div>
|
|
2277
|
+
</div>
|
|
2278
|
+
<div class="detail-row">
|
|
2279
|
+
<div class="detail-label">Procedure:</div>
|
|
2280
|
+
<div class="detail-value procedure-name">{{procedureName}}</div>
|
|
2281
|
+
</div>
|
|
2282
|
+
<div class="detail-row">
|
|
2283
|
+
<div class="detail-label">Date:</div>
|
|
2284
|
+
<div class="detail-value">{{appointmentDate}}</div>
|
|
2285
|
+
</div>
|
|
2286
|
+
<div class="detail-row">
|
|
2287
|
+
<div class="detail-label">Time:</div>
|
|
2288
|
+
<div class="detail-value">{{appointmentTime}}</div>
|
|
2289
|
+
</div>
|
|
2290
|
+
<div class="detail-row">
|
|
2291
|
+
<div class="detail-label">Practitioner:</div>
|
|
2292
|
+
<div class="detail-value">{{practitionerName}}</div>
|
|
2293
|
+
</div>
|
|
2294
|
+
</div>
|
|
2295
|
+
</div>
|
|
2296
|
+
|
|
2297
|
+
<div class="divider"></div>
|
|
2298
|
+
|
|
2299
|
+
<p style="color: #555; font-size: 16px; line-height: 1.6; margin-bottom: 30px;">
|
|
2300
|
+
Please review this appointment request and confirm availability in your admin panel. The patient is waiting for your confirmation to finalize their booking.
|
|
2301
|
+
</p>
|
|
2302
|
+
|
|
2303
|
+
<div class="cta-section">
|
|
2304
|
+
<a href="#" class="cta-button">Review & Confirm Appointment</a>
|
|
2305
|
+
</div>
|
|
2306
|
+
</div>
|
|
2307
|
+
|
|
2308
|
+
<div class="footer">
|
|
2309
|
+
<p style="margin: 0 0 10px 0;">
|
|
2310
|
+
<strong>MetaEstetics</strong> - Premium Aesthetic Services
|
|
2311
|
+
</p>
|
|
2312
|
+
<p style="margin: 0; font-size: 12px; color: #999;">
|
|
2313
|
+
This is an automated message. Please do not reply to this email.
|
|
2314
|
+
</p>
|
|
2315
|
+
</div>
|
|
2316
|
+
</div>
|
|
2317
|
+
</body>
|
|
2318
|
+
</html>
|
|
2319
|
+
`;
|
|
1922
2320
|
var AppointmentMailingService = class extends BaseMailingService {
|
|
1923
2321
|
constructor(firestore18, mailgunClient) {
|
|
1924
2322
|
super(firestore18, mailgunClient);
|
|
@@ -1932,10 +2330,10 @@ var AppointmentMailingService = class extends BaseMailingService {
|
|
|
1932
2330
|
);
|
|
1933
2331
|
const recipientEmail = data.recipientProfile.email;
|
|
1934
2332
|
if (!recipientEmail) {
|
|
1935
|
-
Logger.error(
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
);
|
|
2333
|
+
Logger.error("[AppointmentMailingService] Recipient email not found for confirmation.", {
|
|
2334
|
+
recipientId: data.recipientProfile.id,
|
|
2335
|
+
role: data.recipientRole
|
|
2336
|
+
});
|
|
1939
2337
|
throw new Error("Recipient email address is missing.");
|
|
1940
2338
|
}
|
|
1941
2339
|
const templateVariables = {
|
|
@@ -1946,10 +2344,7 @@ var AppointmentMailingService = class extends BaseMailingService {
|
|
|
1946
2344
|
practitionerName: data.appointment.practitionerInfo.name,
|
|
1947
2345
|
clinicName: data.appointment.clinicInfo.name
|
|
1948
2346
|
};
|
|
1949
|
-
const html = this.renderTemplate(
|
|
1950
|
-
patientAppointmentConfirmedTemplate,
|
|
1951
|
-
templateVariables
|
|
1952
|
-
);
|
|
2347
|
+
const html = this.renderTemplate(patientAppointmentConfirmedTemplate, templateVariables);
|
|
1953
2348
|
const subject = ((_a = data.options) == null ? void 0 : _a.customSubject) || "Your Appointment is Confirmed!";
|
|
1954
2349
|
const fromAddress = ((_b = data.options) == null ? void 0 : _b.fromAddress) || `MetaEstetics <no-reply@${((_c = data.options) == null ? void 0 : _c.mailgunDomain) || this.DEFAULT_MAILGUN_DOMAIN}>`;
|
|
1955
2350
|
const domainToSendFrom = ((_d = data.options) == null ? void 0 : _d.mailgunDomain) || this.DEFAULT_MAILGUN_DOMAIN;
|
|
@@ -2000,10 +2395,7 @@ var AppointmentMailingService = class extends BaseMailingService {
|
|
|
2000
2395
|
appointmentTime: data.appointment.appointmentStartTime.toDate().toLocaleTimeString(),
|
|
2001
2396
|
practitionerName: data.appointment.practitionerInfo.name
|
|
2002
2397
|
};
|
|
2003
|
-
const html = this.renderTemplate(
|
|
2004
|
-
clinicAppointmentRequestedTemplate,
|
|
2005
|
-
templateVariables
|
|
2006
|
-
);
|
|
2398
|
+
const html = this.renderTemplate(clinicAppointmentRequestedTemplate, templateVariables);
|
|
2007
2399
|
const subject = ((_b = data.options) == null ? void 0 : _b.customSubject) || "New Appointment Request Received";
|
|
2008
2400
|
const fromAddress = ((_c = data.options) == null ? void 0 : _c.fromAddress) || `MetaEstetics <no-reply@${((_d = data.options) == null ? void 0 : _d.mailgunDomain) || this.DEFAULT_MAILGUN_DOMAIN}>`;
|
|
2009
2401
|
const domainToSendFrom = ((_e = data.options) == null ? void 0 : _e.mailgunDomain) || this.DEFAULT_MAILGUN_DOMAIN;
|
|
@@ -6248,8 +6640,8 @@ var BookingAvailabilityCalculator = class {
|
|
|
6248
6640
|
*/
|
|
6249
6641
|
static createWorkingHoursIntervals(workingHours, startDate, endDate, tz) {
|
|
6250
6642
|
const workingIntervals = [];
|
|
6251
|
-
let start = import_luxon.DateTime.
|
|
6252
|
-
const end = import_luxon.DateTime.
|
|
6643
|
+
let start = import_luxon.DateTime.fromMillis(startDate.getTime(), { zone: tz });
|
|
6644
|
+
const end = import_luxon.DateTime.fromMillis(endDate.getTime(), { zone: tz });
|
|
6253
6645
|
while (start <= end) {
|
|
6254
6646
|
const dayOfWeek = start.weekday;
|
|
6255
6647
|
const dayName = [
|
|
@@ -6279,8 +6671,8 @@ var BookingAvailabilityCalculator = class {
|
|
|
6279
6671
|
millisecond: 0
|
|
6280
6672
|
});
|
|
6281
6673
|
if (workEnd.toMillis() > startDate.getTime() && workStart.toMillis() < endDate.getTime()) {
|
|
6282
|
-
const intervalStart = workStart < import_luxon.DateTime.
|
|
6283
|
-
const intervalEnd = workEnd > import_luxon.DateTime.
|
|
6674
|
+
const intervalStart = workStart < import_luxon.DateTime.fromMillis(startDate.getTime(), { zone: tz }) ? import_luxon.DateTime.fromMillis(startDate.getTime(), { zone: tz }) : workStart;
|
|
6675
|
+
const intervalEnd = workEnd > import_luxon.DateTime.fromMillis(endDate.getTime(), { zone: tz }) ? import_luxon.DateTime.fromMillis(endDate.getTime(), { zone: tz }) : workEnd;
|
|
6284
6676
|
workingIntervals.push({
|
|
6285
6677
|
start: import_firestore2.Timestamp.fromMillis(intervalStart.toMillis()),
|
|
6286
6678
|
end: import_firestore2.Timestamp.fromMillis(intervalEnd.toMillis())
|
|
@@ -6387,8 +6779,8 @@ var BookingAvailabilityCalculator = class {
|
|
|
6387
6779
|
*/
|
|
6388
6780
|
static createPractitionerWorkingHoursIntervals(workingHours, startDate, endDate, tz) {
|
|
6389
6781
|
const workingIntervals = [];
|
|
6390
|
-
let start = import_luxon.DateTime.
|
|
6391
|
-
const end = import_luxon.DateTime.
|
|
6782
|
+
let start = import_luxon.DateTime.fromMillis(startDate.getTime(), { zone: tz });
|
|
6783
|
+
const end = import_luxon.DateTime.fromMillis(endDate.getTime(), { zone: tz });
|
|
6392
6784
|
while (start <= end) {
|
|
6393
6785
|
const dayOfWeek = start.weekday;
|
|
6394
6786
|
const dayName = [
|
|
@@ -6411,8 +6803,8 @@ var BookingAvailabilityCalculator = class {
|
|
|
6411
6803
|
});
|
|
6412
6804
|
const workEnd = start.set({ hour: endHours, minute: endMinutes });
|
|
6413
6805
|
if (workEnd.toMillis() > startDate.getTime() && workStart.toMillis() < endDate.getTime()) {
|
|
6414
|
-
const intervalStart = workStart < import_luxon.DateTime.
|
|
6415
|
-
const intervalEnd = workEnd > import_luxon.DateTime.
|
|
6806
|
+
const intervalStart = workStart < import_luxon.DateTime.fromMillis(startDate.getTime(), { zone: tz }) ? import_luxon.DateTime.fromMillis(startDate.getTime(), { zone: tz }) : workStart;
|
|
6807
|
+
const intervalEnd = workEnd > import_luxon.DateTime.fromMillis(endDate.getTime(), { zone: tz }) ? import_luxon.DateTime.fromMillis(endDate.getTime(), { zone: tz }) : workEnd;
|
|
6416
6808
|
workingIntervals.push({
|
|
6417
6809
|
start: import_firestore2.Timestamp.fromMillis(intervalStart.toMillis()),
|
|
6418
6810
|
end: import_firestore2.Timestamp.fromMillis(intervalEnd.toMillis())
|