Compare commits

...

8 Commits

Author SHA1 Message Date
81964946f8 Merge branch 'dev' into expiry-using-payment 2025-08-05 15:45:22 +05:30
a2ce504b02 Changes Updated 2025-08-05 15:43:45 +05:30
3c405012b9 Changes Updated 2025-08-05 15:24:21 +05:30
c2be01e6b1 Merge branch 'dev' into expiry-using-payment 2025-08-05 14:29:45 +05:30
3a4c5cab2a Updated 2025-08-05 14:29:14 +05:30
a22d8f9ea6 Changes Updated 2025-08-05 14:12:03 +05:30
690732d515 Changes Updated 2025-08-04 18:08:06 +05:30
b2bb8891c3 Changes updated 2025-08-04 16:54:19 +05:30
2 changed files with 5 additions and 5 deletions

View File

@ -274,6 +274,7 @@ async function processExpiredMembership(
} }
} }
async function sendPlanExpiredNotification( async function sendPlanExpiredNotification(
membershipId: string, membershipId: string,
membershipData: MembershipData membershipData: MembershipData
@ -311,6 +312,7 @@ async function sendPlanExpiredNotification(
month: "long", month: "long",
day: "numeric", day: "numeric",
}); });
} }
await app await app
@ -323,15 +325,13 @@ async function sendPlanExpiredNotification(
notificationSent: false, notificationSent: false,
timestamp: admin.firestore.FieldValue.serverTimestamp(), timestamp: admin.firestore.FieldValue.serverTimestamp(),
read: false, read: false,
readBy: [],
data: { data: {
title: "Plan Expired",
message: `The plan ${
membershipData.subscription?.name || "Unknown Plan"
} for client ${clientName} has expired.`,
planName: membershipData.subscription?.name || "Unknown Plan", planName: membershipData.subscription?.name || "Unknown Plan",
clientName, clientName,
membershipId, membershipId,
gymName, gymName,
ownerId: gymOwnerId,
formattedExpiryDate: formattedDate, formattedExpiryDate: formattedDate,
expiryDate: expiryDate expiryDate: expiryDate
? admin.firestore.Timestamp.fromDate(expiryDate) ? admin.firestore.Timestamp.fromDate(expiryDate)

View File

@ -240,7 +240,7 @@ function prepareNotificationMessage(
title = notification.data?.title || "Plan Expired"; title = notification.data?.title || "Plan Expired";
body = body =
notification.data?.message || notification.data?.message ||
`The plan ${notification.data?.planName} for client ${notification.data?.clientName} has expired.`; `${notification.data?.clientName}/s subscription for plan ${notification.data?.planName} has expired.`;
break; break;
case "schedule_update": case "schedule_update":