Skip to content

Commit 5c6b79e

Browse files
committed
fix: Update email invitation
1 parent 8664d5e commit 5c6b79e

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

functions/src/https/email.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ export const sendEmail = functions.onCall({
2525
.replace("{{site}}", process.env.SITE_URL)
2626
.replace("{{message}}", content.data.message)
2727
.replace(/{{testTitle}}/g, content.data.testTitle)
28-
.replace(/{{adminEmail}}/g, content.data.adminEmail);
28+
.replace(/{{testDescription}}/g, content.data.testDescription)
29+
.replace(/{{adminEmail}}/g, content.data.adminEmail)
30+
.replace(/{{adminName}}/g, content.data.adminName);
2931
}
3032
else if (content.template === 'passwordReset') {
3133
const actionCodeSettings = {

functions/src/templates/mails/invitations.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@
2222
<p>{{message}}</p>
2323
<p>
2424
You have been invited to participate in the study:
25+
<br>
2526
<strong>{{testTitle}}</strong>
2627
</p>
28+
<p style="margin:0 0 15px 0; font-size:14px; color:#555;">
29+
Organized by <strong>{{adminName}}</strong>
30+
</p>
31+
<p>
32+
{{testDescription}}
33+
</p>
2734
<p>
2835
Click the button below to access the platform and begin your participation:
2936
</p>
@@ -43,10 +50,7 @@
4350
<!-- Footer -->
4451
<tr>
4552
<td style="background:#f0f0f0; padding:20px; text-align:center; font-size:13px; color:#555; line-height:1.5;">
46-
<p>Need help? Contact:</p>
47-
<p>
48-
<a href="mailto:{{adminEmail}}" style="color:#4CAF50; text-decoration:none;">{{adminEmail}}</a>
49-
</p>
53+
<p>Need help? Contact: <a href="mailto:{{adminEmail}}" style="color:#4CAF50; text-decoration:none;">{{adminEmail}}</a></p>
5054
<p style="margin-top:15px; font-size:12px; color:#999;">
5155
© 2025 RUXAILAB - All rights reserved.
5256
</p>

src/shared/views/CooperatorsView.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ const showIntroView = computed(() => {
204204
// Computeds
205205
const dialog = computed(() => store.getters.getDialogLeaveStatus);
206206
const test = computed(() => store.getters.test);
207+
const userAuth = computed(() => store.getters.user);
207208
const users = computed(() => store.state.Users?.users || []);
208209
const cooperatorsEdit = computed(() => test.value?.cooperators ? [...test.value.cooperators] : []);
209210
const loading = computed(() => store.getters.loading);
@@ -239,7 +240,9 @@ const handleSendEmail = async (guest) => {
239240
data: {
240241
message: inviteMessages.value || '',
241242
testTitle: test.value.testTitle,
243+
testDescription: test.value.testDescription,
242244
adminEmail: test.value.testAdmin.email,
245+
adminName: userAuth.value.name || userAuth.value.email,
243246
}
244247
})
245248
}

0 commit comments

Comments
 (0)