notification-issue #73
@ -166,6 +166,42 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"collectionGroup": "notifications",
|
||||||
|
"queryScope": "COLLECTION",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldPath": "data.ownerId",
|
||||||
|
"order": "ASCENDING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "timestamp",
|
||||||
|
"order": "DESCENDING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "__name__",
|
||||||
|
"order": "DESCENDING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collectionGroup": "notifications",
|
||||||
|
"queryScope": "COLLECTION",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldPath": "data.trainerId",
|
||||||
|
"order": "ASCENDING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "timestamp",
|
||||||
|
"order": "DESCENDING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "__name__",
|
||||||
|
"order": "DESCENDING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"collectionGroup": "workout_logs",
|
"collectionGroup": "workout_logs",
|
||||||
"queryScope": "COLLECTION",
|
"queryScope": "COLLECTION",
|
||||||
|
|||||||
@ -236,6 +236,13 @@ function prepareNotificationMessage(
|
|||||||
`You have been assigned ${notification.data?.subscriptionName} at ${notification.data?.gymName}`;
|
`You have been assigned ${notification.data?.subscriptionName} at ${notification.data?.gymName}`;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "plan_expired":
|
||||||
|
title = notification.data?.title || "Plan Expired";
|
||||||
|
body =
|
||||||
|
notification.data?.message ||
|
||||||
|
`The plan ${notification.data?.planName} for client ${notification.data?.clientName} expired on ${notification.data?.formattedExpiryDate}.`;
|
||||||
|
break;
|
||||||
|
|
||||||
case "schedule_update":
|
case "schedule_update":
|
||||||
title = notification.data?.title || "Schedule Update";
|
title = notification.data?.title || "Schedule Update";
|
||||||
body =
|
body =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user