Added role

This commit is contained in:
Sharon Dcruz 2025-08-14 14:01:53 +05:30
parent 182c2838e4
commit bdd94264a6

View File

@ -545,6 +545,7 @@ async function sendTrainerNotifications(
try { try {
const trainerName = await getTrainerName(assignment.trainerId); const trainerName = await getTrainerName(assignment.trainerId);
const trainerUserId = await getTrainerUserId(assignment.trainerId); const trainerUserId = await getTrainerUserId(assignment.trainerId);
const kTrainerRole = 'Trainer';
const notifType = const notifType =
notificationType === "expired" notificationType === "expired"
@ -588,7 +589,7 @@ async function sendTrainerNotifications(
gymName, gymName,
assignmentId: assignment.id, assignmentId: assignment.id,
formattedExpiryDate: formattedDate, formattedExpiryDate: formattedDate,
role: 'Trainer', role: kTrainerRole,
expiryDate: expiryDate expiryDate: expiryDate
? admin.firestore.Timestamp.fromDate(expiryDate) ? admin.firestore.Timestamp.fromDate(expiryDate)
: admin.firestore.Timestamp.fromDate(new Date()), : admin.firestore.Timestamp.fromDate(new Date()),