trovesuite 1.0.1__py3-none-any.whl → 1.0.31__py3-none-any.whl
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.
- trovesuite/__init__.py +12 -5
- trovesuite/auth/__init__.py +2 -5
- trovesuite/auth/auth_controller.py +6 -5
- trovesuite/auth/auth_read_dto.py +3 -3
- trovesuite/auth/auth_service.py +223 -80
- trovesuite/auth/auth_write_dto.py +1 -1
- trovesuite/configs/database.py +212 -58
- trovesuite/configs/settings.py +75 -132
- trovesuite/entities/health.py +4 -4
- trovesuite/notification/__init__.py +14 -0
- trovesuite/notification/notification_base.py +13 -0
- trovesuite/notification/notification_controller.py +21 -0
- trovesuite/notification/notification_read_dto.py +21 -0
- trovesuite/notification/notification_service.py +73 -0
- trovesuite/notification/notification_write_dto.py +21 -0
- trovesuite/storage/__init__.py +42 -0
- trovesuite/storage/storage_base.py +63 -0
- trovesuite/storage/storage_controller.py +198 -0
- trovesuite/storage/storage_read_dto.py +74 -0
- trovesuite/storage/storage_service.py +529 -0
- trovesuite/storage/storage_write_dto.py +70 -0
- trovesuite/utils/__init__.py +3 -1
- trovesuite/utils/helper.py +714 -5
- trovesuite/utils/templates.py +487 -0
- {trovesuite-1.0.1.dist-info → trovesuite-1.0.31.dist-info}/METADATA +184 -9
- trovesuite-1.0.31.dist-info/RECORD +34 -0
- trovesuite-1.0.1.dist-info/RECORD +0 -21
- {trovesuite-1.0.1.dist-info → trovesuite-1.0.31.dist-info}/WHEEL +0 -0
- {trovesuite-1.0.1.dist-info → trovesuite-1.0.31.dist-info}/licenses/LICENSE +0 -0
- {trovesuite-1.0.1.dist-info → trovesuite-1.0.31.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
OTP_TEXT_TEMPLATE = (
|
|
2
|
+
"Your Trovesuite OTP code is: {otp_code}\n"
|
|
3
|
+
"Please do not share this code with anyone.\n"
|
|
4
|
+
"This code will expire in 5 minutes.\n"
|
|
5
|
+
"Sent at: {cdate}, {ctime}"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
OTP_HTML_TEMPLATE = """
|
|
9
|
+
<html>
|
|
10
|
+
<body style="font-family: Arial, sans-serif; background-color: #f8f9fa; padding: 20px;">
|
|
11
|
+
<div style="max-width: 500px; margin: auto; background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 6px rgba(0,0,0,0.1);">
|
|
12
|
+
<h2 style="color: #2e86de; text-align: center;">🔐 {message_header}</h2>
|
|
13
|
+
<p style="font-size: 16px; color: #333;">Dear {user_name},</p>
|
|
14
|
+
<p style="font-size: 15px; color: #333;">
|
|
15
|
+
Please use the following <b>One-Time Password (OTP)</b> to complete your verification:
|
|
16
|
+
</p>
|
|
17
|
+
<div style="text-align: center; margin: 30px 0;">
|
|
18
|
+
<div style="display: inline-block; background-color: #2e86de; color: white; padding: 15px 30px; border-radius: 8px; font-size: 28px; letter-spacing: 4px;">
|
|
19
|
+
{otp_code}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<p style="font-size: 14px; color: #555;">
|
|
23
|
+
This code will expire in <b>5 minutes</b>. Please do not share this code with anyone.
|
|
24
|
+
</p>
|
|
25
|
+
<hr style="border: none; border-top: 1px solid #eee; margin: 25px 0;">
|
|
26
|
+
<p style="font-size: 12px; color: #888; text-align: center;">
|
|
27
|
+
Trovesuite Security System<br>
|
|
28
|
+
Sent at: {cdate}, {ctime}
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
</body>
|
|
32
|
+
</html>
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
PASSWORD_CHANGE_HTML_TEMPLATE = """
|
|
36
|
+
<html>
|
|
37
|
+
<body style="font-family: Arial, sans-serif; background-color: #f8f9fa; padding: 20px;">
|
|
38
|
+
<div style="max-width: 500px; margin: auto; background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 6px rgba(0,0,0,0.1);">
|
|
39
|
+
<h2 style="color: #2e86de; text-align: center;">🔒 Password Change Alert</h2>
|
|
40
|
+
<p style="font-size: 16px; color: #333;">Hello {user_name},</p>
|
|
41
|
+
<p style="font-size: 15px; color: #333;">
|
|
42
|
+
We noticed that the password for your <b>Trovesuite</b> account was recently changed.
|
|
43
|
+
</p>
|
|
44
|
+
<p style="font-size: 15px; color: #333;">
|
|
45
|
+
If you made this change, you can safely ignore this message.
|
|
46
|
+
</p>
|
|
47
|
+
<p style="font-size: 15px; color: #333;">
|
|
48
|
+
However, if you did <b>not</b> make this change, please take immediate action to secure your account.
|
|
49
|
+
</p>
|
|
50
|
+
<div style="margin-top: 30px; padding: 15px; background-color: #f1f3f6; border-radius: 8px;">
|
|
51
|
+
<p style="font-size: 13px; color: #555; margin: 0;">
|
|
52
|
+
Date: <b>{cdate}</b><br>
|
|
53
|
+
Time: <b>{ctime}</b>
|
|
54
|
+
</p>
|
|
55
|
+
</div>
|
|
56
|
+
<hr style="border: none; border-top: 1px solid #eee; margin: 25px 0;">
|
|
57
|
+
<p style="font-size: 12px; color: #888; text-align: center;">
|
|
58
|
+
Trovesuite Security System<br>
|
|
59
|
+
Ensuring your data safety always.<br>
|
|
60
|
+
Sent at: {cdate}, {ctime}
|
|
61
|
+
</p>
|
|
62
|
+
</div>
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
PASSWORD_CHANGE_TEXT_TEMPLATE = (
|
|
68
|
+
"Hello {user_name},\n\n"
|
|
69
|
+
"We wanted to let you know that the password for your Trovesuite account was just changed.\n\n"
|
|
70
|
+
"If you made this change, you can safely ignore this message.\n"
|
|
71
|
+
"If you did NOT make this change, please take immediate action to secure your account.\n\n"
|
|
72
|
+
"Date: {cdate}\n"
|
|
73
|
+
"Time: {ctime}\n"
|
|
74
|
+
"— The Trovesuite Security Team"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
ACCESS_GRANTED_HTML_TEMPLATE = """
|
|
78
|
+
<html>
|
|
79
|
+
<body style="font-family: Arial, sans-serif; background-color: #f8f9fa; padding: 20px; margin: 0;">
|
|
80
|
+
<div style="max-width: 600px; margin: auto; background: white; border-radius: 12px; padding: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
|
|
81
|
+
<!-- Header -->
|
|
82
|
+
<div style="text-align: center; padding-bottom: 25px; border-bottom: 2px solid #2e86de;">
|
|
83
|
+
<h1 style="color: #2e86de; margin: 0; font-size: 28px;">🎉 Welcome to Trovesuite!</h1>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<!-- Greeting -->
|
|
87
|
+
<div style="padding: 25px 0;">
|
|
88
|
+
<p style="font-size: 16px; color: #333; margin-bottom: 15px;">Dear <strong>{user_name}</strong>,</p>
|
|
89
|
+
<p style="font-size: 15px; color: #333; line-height: 1.6;">
|
|
90
|
+
Great news! You have been granted access to <strong>Trovesuite</strong>.
|
|
91
|
+
You can now log in and start exploring all the features available to you.
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<!-- Login Details -->
|
|
96
|
+
<div style="background-color: #f8f9fa; border-radius: 8px; padding: 20px; margin: 20px 0;">
|
|
97
|
+
<h3 style="color: #2e86de; margin-top: 0; font-size: 18px; margin-bottom: 15px;">📋 Your Login Details</h3>
|
|
98
|
+
|
|
99
|
+
<table style="width: 100%; border-collapse: collapse;">
|
|
100
|
+
<tr>
|
|
101
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px; width: 40%;">
|
|
102
|
+
<strong>App URL:</strong>
|
|
103
|
+
</td>
|
|
104
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
105
|
+
<a href="{app_url}" style="color: #2e86de; text-decoration: none; font-weight: 500;">{app_url}</a>
|
|
106
|
+
</td>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
110
|
+
<strong>Email:</strong>
|
|
111
|
+
</td>
|
|
112
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
113
|
+
{user_email}
|
|
114
|
+
</td>
|
|
115
|
+
</tr>
|
|
116
|
+
<tr>
|
|
117
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
118
|
+
<strong>Password:</strong>
|
|
119
|
+
</td>
|
|
120
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px; font-family: 'Courier New', monospace; background-color: #fff; padding: 5px 10px; border-radius: 4px; display: inline-block;">
|
|
121
|
+
{password}
|
|
122
|
+
</td>
|
|
123
|
+
</tr>
|
|
124
|
+
<tr>
|
|
125
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
126
|
+
<strong>Login Access:</strong>
|
|
127
|
+
</td>
|
|
128
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
129
|
+
{login_type_text}
|
|
130
|
+
</td>
|
|
131
|
+
</tr>
|
|
132
|
+
</table>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<!-- CTA Button -->
|
|
136
|
+
<div style="text-align: center; margin: 30px 0;">
|
|
137
|
+
<a href="{app_url}" style="display: inline-block; background-color: #2e86de; color: white; padding: 14px 35px; text-decoration: none; border-radius: 8px; font-size: 16px; font-weight: 600; box-shadow: 0 2px 4px rgba(46, 134, 222, 0.3);">
|
|
138
|
+
Login Now →
|
|
139
|
+
</a>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<!-- Security Note -->
|
|
143
|
+
<div style="background-color: #fff3cd; border-left: 4px solid #ffc107; padding: 15px; margin: 25px 0; border-radius: 4px;">
|
|
144
|
+
<p style="font-size: 13px; color: #856404; margin: 0; line-height: 1.5;">
|
|
145
|
+
<strong>⚠️ Security Reminder:</strong> For your security, we recommend changing your password upon your first login.
|
|
146
|
+
Please do not share your credentials with anyone.
|
|
147
|
+
</p>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<!-- Footer -->
|
|
151
|
+
<hr style="border: none; border-top: 1px solid #eee; margin: 25px 0;">
|
|
152
|
+
<div style="text-align: center;">
|
|
153
|
+
<p style="font-size: 12px; color: #888; margin: 5px 0;">
|
|
154
|
+
Trovesuite - Empowering Your Business<br>
|
|
155
|
+
Sent on: {cdate} at {ctime}
|
|
156
|
+
</p>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</body>
|
|
160
|
+
</html>
|
|
161
|
+
"""
|
|
162
|
+
|
|
163
|
+
ACCESS_GRANTED_TEXT_TEMPLATE = (
|
|
164
|
+
"Welcome to Trovesuite!\n\n"
|
|
165
|
+
"Dear {user_name},\n\n"
|
|
166
|
+
"Great news! You have been granted access to Trovesuite.\n"
|
|
167
|
+
"You can now log in and start exploring all the features available to you.\n\n"
|
|
168
|
+
"YOUR LOGIN DETAILS:\n"
|
|
169
|
+
"==================\n"
|
|
170
|
+
"App URL: {app_url}\n"
|
|
171
|
+
"Email: {user_email}\n"
|
|
172
|
+
"Password: {password}\n"
|
|
173
|
+
"Login Access: {login_type_text}\n\n"
|
|
174
|
+
"SECURITY REMINDER:\n"
|
|
175
|
+
"For your security, we recommend changing your password upon your first login.\n"
|
|
176
|
+
"Please do not share your credentials with anyone.\n\n"
|
|
177
|
+
"— The Trovesuite Team\n"
|
|
178
|
+
"Sent on: {cdate} at {ctime}"
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
RESET_PASSWORD_TEXT_TEMPLATE = (
|
|
182
|
+
"Trovesuite Password Reset\n\n"
|
|
183
|
+
"Dear {user_name},\n\n"
|
|
184
|
+
"Your Trovesuite account password has been reset by an administrator.\n\n"
|
|
185
|
+
"NEW LOGIN DETAILS:\n"
|
|
186
|
+
"==================\n"
|
|
187
|
+
"App URL: {app_url}\n"
|
|
188
|
+
"Email: {user_email}\n"
|
|
189
|
+
"Temporary Password: {password}\n\n"
|
|
190
|
+
"SECURITY REMINDER:\n"
|
|
191
|
+
"Please sign in and change this temporary password immediately. "
|
|
192
|
+
"Do not share your credentials with anyone.\n\n"
|
|
193
|
+
"— The Trovesuite Team\n"
|
|
194
|
+
"Sent on: {cdate} at {ctime}"
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
RESET_PASSWORD_HTML_TEMPLATE = """
|
|
198
|
+
<html>
|
|
199
|
+
<body style="font-family: Arial, sans-serif; background-color: #f8f9fa; padding: 20px; margin: 0;">
|
|
200
|
+
<div style="max-width: 600px; margin: auto; background: white; border-radius: 12px; padding: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
|
|
201
|
+
<!-- Header -->
|
|
202
|
+
<div style="text-align: center; padding-bottom: 25px; border-bottom: 2px solid #2e86de;">
|
|
203
|
+
<h1 style="color: #2e86de; margin: 0; font-size: 26px;">🔑 Password Reset</h1>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<!-- Greeting -->
|
|
207
|
+
<div style="padding: 25px 0;">
|
|
208
|
+
<p style="font-size: 16px; color: #333; margin-bottom: 15px;">Dear <strong>{user_name}</strong>,</p>
|
|
209
|
+
<p style="font-size: 15px; color: #333; line-height: 1.6;">
|
|
210
|
+
Your Trovesuite account password has been reset by an administrator. Use the credentials below to sign in.
|
|
211
|
+
</p>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<!-- Login Details -->
|
|
215
|
+
<div style="background-color: #f8f9fa; border-radius: 8px; padding: 20px; margin: 20px 0;">
|
|
216
|
+
<h3 style="color: #2e86de; margin-top: 0; font-size: 18px; margin-bottom: 15px;">📋 New Login Details</h3>
|
|
217
|
+
|
|
218
|
+
<table style="width: 100%; border-collapse: collapse;">
|
|
219
|
+
<tr>
|
|
220
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px; width: 35%;">
|
|
221
|
+
<strong>App URL:</strong>
|
|
222
|
+
</td>
|
|
223
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
224
|
+
<a href="{app_url}" style="color: #2e86de; text-decoration: none; font-weight: 500;">{app_url}</a>
|
|
225
|
+
</td>
|
|
226
|
+
</tr>
|
|
227
|
+
<tr>
|
|
228
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
229
|
+
<strong>Email:</strong>
|
|
230
|
+
</td>
|
|
231
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
232
|
+
{user_email}
|
|
233
|
+
</td>
|
|
234
|
+
</tr>
|
|
235
|
+
<tr>
|
|
236
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
237
|
+
<strong>Temporary Password:</strong>
|
|
238
|
+
</td>
|
|
239
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px; font-family: 'Courier New', monospace; background-color: #fff; padding: 5px 10px; border-radius: 4px; display: inline-block;">
|
|
240
|
+
{password}
|
|
241
|
+
</td>
|
|
242
|
+
</tr>
|
|
243
|
+
</table>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<!-- Security Note -->
|
|
247
|
+
<div style="background-color: #fff3cd; border-left: 4px solid #ffc107; padding: 15px; margin: 25px 0; border-radius: 4px;">
|
|
248
|
+
<p style="font-size: 13px; color: #856404; margin: 0; line-height: 1.5;">
|
|
249
|
+
<strong>⚠️ Important:</strong> For security reasons, please change this temporary password immediately after logging in.
|
|
250
|
+
</p>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<!-- Footer -->
|
|
254
|
+
<hr style="border: none; border-top: 1px solid #eee; margin: 25px 0;">
|
|
255
|
+
<div style="text-align: center;">
|
|
256
|
+
<p style="font-size: 12px; color: #888; margin: 5px 0;">
|
|
257
|
+
This is an automated notification from Trovesuite
|
|
258
|
+
</p>
|
|
259
|
+
<p style="font-size: 12px; color: #888; margin: 5px 0;">
|
|
260
|
+
Trovesuite - Empowering Your Business<br>
|
|
261
|
+
Sent on: {cdate} at {ctime}
|
|
262
|
+
</p>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
</body>
|
|
266
|
+
</html>
|
|
267
|
+
"""
|
|
268
|
+
|
|
269
|
+
RESOURCE_DELETION_HTML_TEMPLATE = """
|
|
270
|
+
<html>
|
|
271
|
+
<body style="font-family: Arial, sans-serif; background-color: #f8f9fa; padding: 20px; margin: 0;">
|
|
272
|
+
<div style="max-width: 600px; margin: auto; background: white; border-radius: 12px; padding: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
|
|
273
|
+
<!-- Header -->
|
|
274
|
+
<div style="text-align: center; padding-bottom: 25px; border-bottom: 2px solid #dc3545;">
|
|
275
|
+
<h1 style="color: #dc3545; margin: 0; font-size: 28px;">🗑️ Resource Deletion Notice</h1>
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<!-- Greeting -->
|
|
279
|
+
<div style="padding: 25px 0;">
|
|
280
|
+
<p style="font-size: 16px; color: #333; margin-bottom: 15px;">Dear <strong>{admin_name}</strong>,</p>
|
|
281
|
+
<p style="font-size: 15px; color: #333; line-height: 1.6;">
|
|
282
|
+
This is to notify you that a resource has been deleted in your Trovesuite account.
|
|
283
|
+
</p>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
<!-- Deletion Details -->
|
|
287
|
+
<div style="background-color: #fff3cd; border-left: 4px solid #ffc107; padding: 20px; margin: 20px 0; border-radius: 4px;">
|
|
288
|
+
<h3 style="color: #856404; margin-top: 0; font-size: 18px; margin-bottom: 15px;">📋 Deletion Details</h3>
|
|
289
|
+
|
|
290
|
+
<table style="width: 100%; border-collapse: collapse;">
|
|
291
|
+
<tr>
|
|
292
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px; width: 35%;">
|
|
293
|
+
<strong>Resource Type:</strong>
|
|
294
|
+
</td>
|
|
295
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
296
|
+
{resource_type}
|
|
297
|
+
</td>
|
|
298
|
+
</tr>
|
|
299
|
+
<tr>
|
|
300
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
301
|
+
<strong>Resource Name:</strong>
|
|
302
|
+
</td>
|
|
303
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
304
|
+
{resource_name}
|
|
305
|
+
</td>
|
|
306
|
+
</tr>
|
|
307
|
+
<tr>
|
|
308
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
309
|
+
<strong>Deleted By:</strong>
|
|
310
|
+
</td>
|
|
311
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
312
|
+
{deleted_by_name} ({deleted_by_email})
|
|
313
|
+
</td>
|
|
314
|
+
</tr>
|
|
315
|
+
<tr>
|
|
316
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
317
|
+
<strong>Deletion Time:</strong>
|
|
318
|
+
</td>
|
|
319
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
320
|
+
{cdate} at {ctime}
|
|
321
|
+
</td>
|
|
322
|
+
</tr>
|
|
323
|
+
<tr style="{message_row_style}">
|
|
324
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px; vertical-align: top;">
|
|
325
|
+
<strong>Message:</strong>
|
|
326
|
+
</td>
|
|
327
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
328
|
+
{message}
|
|
329
|
+
</td>
|
|
330
|
+
</tr>
|
|
331
|
+
</table>
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
<!-- Action Note -->
|
|
335
|
+
<div style="background-color: #f8f9fa; padding: 15px; margin: 25px 0; border-radius: 4px; border-left: 4px solid #2e86de;">
|
|
336
|
+
<p style="font-size: 13px; color: #333; margin: 0; line-height: 1.5;">
|
|
337
|
+
<strong>ℹ️ Note:</strong> This resource has been soft-deleted and can be restored if needed.
|
|
338
|
+
Please contact the person who deleted it or log in to your account to review this action.
|
|
339
|
+
</p>
|
|
340
|
+
</div>
|
|
341
|
+
|
|
342
|
+
<!-- CTA Button -->
|
|
343
|
+
<div style="text-align: center; margin: 30px 0;">
|
|
344
|
+
<a href="{app_url}" style="display: inline-block; background-color: #2e86de; color: white; padding: 14px 35px; text-decoration: none; border-radius: 8px; font-size: 16px; font-weight: 600; box-shadow: 0 2px 4px rgba(46, 134, 222, 0.3);">
|
|
345
|
+
Login to Review →
|
|
346
|
+
</a>
|
|
347
|
+
</div>
|
|
348
|
+
|
|
349
|
+
<!-- Footer -->
|
|
350
|
+
<hr style="border: none; border-top: 1px solid #eee; margin: 25px 0;">
|
|
351
|
+
<div style="text-align: center;">
|
|
352
|
+
<p style="font-size: 12px; color: #888; margin: 5px 0;">
|
|
353
|
+
This is an automated notification from Trovesuite
|
|
354
|
+
</p>
|
|
355
|
+
<p style="font-size: 12px; color: #888; margin: 5px 0;">
|
|
356
|
+
Trovesuite - Empowering Your Business<br>
|
|
357
|
+
Sent on: {cdate} at {ctime}
|
|
358
|
+
</p>
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
</body>
|
|
362
|
+
</html>
|
|
363
|
+
"""
|
|
364
|
+
|
|
365
|
+
RESOURCE_DELETION_TEXT_TEMPLATE = (
|
|
366
|
+
"Resource Deletion Notice\n\n"
|
|
367
|
+
"Dear {admin_name},\n\n"
|
|
368
|
+
"This is to notify you that a resource has been deleted in your Trovesuite account.\n\n"
|
|
369
|
+
"DELETION DETAILS:\n"
|
|
370
|
+
"==================\n"
|
|
371
|
+
"Resource Type: {resource_type}\n"
|
|
372
|
+
"Resource Name: {resource_name}\n"
|
|
373
|
+
"Deleted By: {deleted_by_name} ({deleted_by_email})\n"
|
|
374
|
+
"Deletion Time: {cdate} at {ctime}\n"
|
|
375
|
+
"{message_text}"
|
|
376
|
+
"\n"
|
|
377
|
+
"NOTE:\n"
|
|
378
|
+
"This resource has been soft-deleted and can be restored if needed.\n"
|
|
379
|
+
"Please contact the person who deleted it or log in to your account to review this action.\n\n"
|
|
380
|
+
"Login: {app_url}\n\n"
|
|
381
|
+
"— The Trovesuite Team\n"
|
|
382
|
+
"Sent on: {cdate} at {ctime}"
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
RESOURCE_STATUS_CHANGE_HTML_TEMPLATE = """
|
|
386
|
+
<html>
|
|
387
|
+
<body style="font-family: Arial, sans-serif; background-color: #f8f9fa; padding: 20px; margin: 0;">
|
|
388
|
+
<div style="max-width: 600px; margin: auto; background: white; border-radius: 12px; padding: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
|
|
389
|
+
<!-- Header -->
|
|
390
|
+
<div style="text-align: center; padding-bottom: 25px; border-bottom: 2px solid {status_color};">
|
|
391
|
+
<h1 style="color: {status_color}; margin: 0; font-size: 28px;">{status_icon} {status_title}</h1>
|
|
392
|
+
</div>
|
|
393
|
+
|
|
394
|
+
<!-- Greeting -->
|
|
395
|
+
<div style="padding: 25px 0;">
|
|
396
|
+
<p style="font-size: 16px; color: #333; margin-bottom: 15px;">Dear <strong>{admin_name}</strong>,</p>
|
|
397
|
+
<p style="font-size: 15px; color: #333; line-height: 1.6;">
|
|
398
|
+
{status_description}
|
|
399
|
+
</p>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<!-- Status Details -->
|
|
403
|
+
<div style="background-color: #f8f9fa; border-radius: 8px; padding: 20px; margin: 20px 0;">
|
|
404
|
+
<h3 style="color: {status_color}; margin-top: 0; font-size: 18px; margin-bottom: 15px;">📋 Status Details</h3>
|
|
405
|
+
<table style="width: 100%; border-collapse: collapse;">
|
|
406
|
+
<tr>
|
|
407
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px; width: 35%;">
|
|
408
|
+
<strong>Resource Type:</strong>
|
|
409
|
+
</td>
|
|
410
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
411
|
+
{resource_type}
|
|
412
|
+
</td>
|
|
413
|
+
</tr>
|
|
414
|
+
<tr>
|
|
415
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
416
|
+
<strong>Resource Name:</strong>
|
|
417
|
+
</td>
|
|
418
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
419
|
+
{resource_name}
|
|
420
|
+
</td>
|
|
421
|
+
</tr>
|
|
422
|
+
<tr>
|
|
423
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
424
|
+
<strong>Status:</strong>
|
|
425
|
+
</td>
|
|
426
|
+
<td style="padding: 8px 0; color: {status_color}; font-size: 14px; font-weight: 600;">
|
|
427
|
+
{status_display}
|
|
428
|
+
</td>
|
|
429
|
+
</tr>
|
|
430
|
+
<tr>
|
|
431
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px;">
|
|
432
|
+
<strong>Triggered By:</strong>
|
|
433
|
+
</td>
|
|
434
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
435
|
+
{actor_name} ({actor_email})
|
|
436
|
+
</td>
|
|
437
|
+
</tr>
|
|
438
|
+
<tr style="{message_row_style}">
|
|
439
|
+
<td style="padding: 8px 0; color: #666; font-size: 14px; vertical-align: top;">
|
|
440
|
+
<strong>Message:</strong>
|
|
441
|
+
</td>
|
|
442
|
+
<td style="padding: 8px 0; color: #333; font-size: 14px;">
|
|
443
|
+
{message}
|
|
444
|
+
</td>
|
|
445
|
+
</tr>
|
|
446
|
+
</table>
|
|
447
|
+
</div>
|
|
448
|
+
|
|
449
|
+
<!-- CTA Button -->
|
|
450
|
+
<div style="text-align: center; margin: 30px 0;">
|
|
451
|
+
<a href="{app_url}" style="display: inline-block; background-color: #2e86de; color: white; padding: 14px 35px; text-decoration: none; border-radius: 8px; font-size: 16px; font-weight: 600; box-shadow: 0 2px 4px rgba(46, 134, 222, 0.3);">
|
|
452
|
+
Login to Review →
|
|
453
|
+
</a>
|
|
454
|
+
</div>
|
|
455
|
+
|
|
456
|
+
<!-- Footer -->
|
|
457
|
+
<hr style="border: none; border-top: 1px solid #eee; margin: 25px 0;">
|
|
458
|
+
<div style="text-align: center;">
|
|
459
|
+
<p style="font-size: 12px; color: #888; margin: 5px 0;">
|
|
460
|
+
This is an automated notification from Trovesuite
|
|
461
|
+
</p>
|
|
462
|
+
<p style="font-size: 12px; color: #888; margin: 5px 0;">
|
|
463
|
+
Trovesuite - Empowering Your Business<br>
|
|
464
|
+
Sent on: {cdate} at {ctime}
|
|
465
|
+
</p>
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
468
|
+
</body>
|
|
469
|
+
</html>
|
|
470
|
+
"""
|
|
471
|
+
|
|
472
|
+
RESOURCE_STATUS_CHANGE_TEXT_TEMPLATE = (
|
|
473
|
+
"Resource Status Update\n\n"
|
|
474
|
+
"Dear {admin_name},\n\n"
|
|
475
|
+
"{status_description}\n\n"
|
|
476
|
+
"DETAILS:\n"
|
|
477
|
+
"========\n"
|
|
478
|
+
"Resource Type: {resource_type}\n"
|
|
479
|
+
"Resource Name: {resource_name}\n"
|
|
480
|
+
"Status: {status_display}\n"
|
|
481
|
+
"Triggered By: {actor_name} ({actor_email})\n"
|
|
482
|
+
"{message_text}"
|
|
483
|
+
"\n"
|
|
484
|
+
"Login: {app_url}\n\n"
|
|
485
|
+
"— The Trovesuite Team\n"
|
|
486
|
+
"Sent on: {cdate} at {ctime}"
|
|
487
|
+
)
|