ready to test

Testing

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-06-22 10:06:58 +08:00
parent bf48c95467
commit 439bb33f77
189 changed files with 17559 additions and 686 deletions
+47 -74
View File
@@ -1,116 +1,89 @@
const CLOSING = `Regards,\nPhilproperties IT Team\n\nThis is an automated message from STARR System. Please do not reply.`;
const build = (body) => `${body.trim()}\n\n${CLOSING}`;
export const emailTemplates = {
OTP: ({ otp, expiryMinutes = 10 }) => ({
subject: "Email OTP Verification - STARR System",
title: "Email Verification",
body: `
<p>Dear User,</p>
text: build(`
Dear User,
<p>Please use the One-Time Password (OTP) below to verify your email address.
This code is valid for <strong>${expiryMinutes} minutes</strong>.</p>
Please use the One-Time Password (OTP) below to verify your email address. This code is valid for ${expiryMinutes} minutes.
<div style="margin:24px 0;font-size:32px;font-weight:bold;letter-spacing:8px;text-align:center;color:#1d4ed8">
${otp}
</div>
${otp}
<p style="font-size:13px;color:#6b7280">
For security reasons, please do not share this code with anyone.
If you did not request this, please contact the administrator.
</p>
`,
For security reasons, please do not share this code with anyone. If you did not request this, please contact the administrator.
`),
}),
WELCOME: ({ name }) => ({
subject: "Welcome to STARR System",
title: `Welcome Aboard!`,
body: `
<p>Dear ${name},</p>
text: build(`
Dear ${name},
<p>We are pleased to welcome you to the STARR System. Your account has been successfully created and is now ready for use.</p>
We are pleased to welcome you to the STARR System. Your account has been successfully created and is now ready for use.
<p>You may now access your dashboard and begin using the available services.</p>
You may now access your dashboard and begin using the available services.
<p style="margin-top:16px">We look forward to supporting you.</p>
`,
We look forward to supporting you.
`),
}),
PASSWORD_CHANGED: () => ({
subject: "Password Update Confirmation - STARR System",
title: "Password Successfully Updated",
body: `
<p>Dear User,</p>
text: build(`
Dear User,
<p>This is to confirm that your account password has been successfully changed.</p>
This is to confirm that your account password has been successfully changed.
<p>If you did not perform this action, please reset your password immediately or contact support.</p>
If you did not perform this action, please reset your password immediately or contact support.
<p style="margin-top:16px">For your security, we recommend using a strong and unique password.</p>
`,
For your security, we recommend using a strong and unique password.
`),
}),
ADDED_TO_GROUP: ({ groupName }) => ({
subject: "Group Assignment Notification",
title: "Added to Group",
body: `
<p>Dear User,</p>
subject: "Group Assignment Notification - STARR System",
text: build(`
Dear User,
<p>You have been assigned to the group <strong>${groupName}</strong> in the STARR System.</p>
You have been assigned to the group "${groupName}" in the STARR System.
<p>This assignment grants you access to shared resources and collaboration tools within the group.</p>
This assignment grants you access to shared resources and collaboration tools within the group.
<p style="margin-top:16px">Please log in to your account to view group details.</p>
`,
Please log in to your account to view group details.
`),
}),
TASK_ASSIGNED: ({ taskTitle, dueDate }) => ({
subject: "New Task Assignment",
title: "Task Assigned",
body: `
<p>Dear User,</p>
subject: "New Task Assignment - STARR System",
text: build(`
Dear User,
<p>You have been assigned a new task in the STARR System.</p>
You have been assigned a new task in the STARR System.
<div style="margin:16px 0;padding:12px;border:1px solid #e5e7eb;border-radius:6px">
<strong>Task:</strong> ${taskTitle}
</div>
Task: ${taskTitle}
Due Date: ${dueDate}
<p><strong>Due Date:</strong> ${dueDate}</p>
<p style="margin-top:16px">Kindly ensure completion within the specified timeframe.</p>
`,
Kindly ensure completion within the specified timeframe.
`),
}),
ADD_STAFF: ({ name, email, password, expiryHours = 24 }) => ({
subject: "Your Staff Account Has Been Created - STARR System",
title: "Staff Account Created",
body: `
<p>Dear ${name},</p>
text: build(`
Dear ${name},
<p>Your staff account has been successfully created in the STARR System.
Below are your login credentials:</p>
Your staff account has been successfully created in the STARR System. Below are your login credentials:
<div style="margin:24px 0;padding:16px;border:1px solid #e5e7eb;border-radius:6px;background:#f9fafb">
<table style="width:100%;font-size:14px">
<tr>
<td style="padding:6px 0;color:#6b7280;width:100px"><strong>Email</strong></td>
<td style="padding:6px 0">${email}</td>
</tr>
<tr>
<td style="padding:6px 0;color:#6b7280"><strong>Password</strong></td>
<td style="padding:6px 0;font-size:18px;color:#1d4ed8">${password}</td>
</tr>
</table>
</div>
Email: ${email}
Password: ${password}
<p>⚠️ This temporary password is valid for <strong>${expiryHours} hours</strong>.
You will be required to change it upon first login.</p>
This temporary password is valid for ${expiryHours} hours. You will be required to change it upon first login.
<p>If you did not request this account or believe this was created in error,
please contact your administrator immediately to have it deactivated.</p>
If you did not request this account or believe this was created in error, please contact your administrator immediately to have it deactivated.
<p style="margin-top:16px;font-size:13px;color:#6b7280">
For security, please do not share your credentials with anyone.
If you need a new password, contact your administrator.
</p>
`,
For security, please do not share your credentials with anyone. If you need a new password, contact your administrator.
`),
}),
};
};