disable expired desired booking slots
This commit is contained in:
@@ -112,6 +112,23 @@ async function sendStoreWatchNotification({ profileId, storeName, storeId, regio
|
||||
});
|
||||
}
|
||||
|
||||
async function sendDesiredWindowMissedNotification({ profileId, storeName, desiredWindowLabel }) {
|
||||
if (!profileId) {
|
||||
return;
|
||||
}
|
||||
const title = `Keine Slots gefunden: ${storeName}`;
|
||||
const messageBase = desiredWindowLabel
|
||||
? `Für den gewünschten Zeitraum ${desiredWindowLabel} konnte kein Slot gefunden werden.`
|
||||
: 'Für den gewünschten Zeitraum konnte kein Slot gefunden werden.';
|
||||
const message = `${messageBase} Der Eintrag wurde deaktiviert.`;
|
||||
await notifyChannels(profileId, {
|
||||
title,
|
||||
message,
|
||||
link: null,
|
||||
priority: 'default'
|
||||
});
|
||||
}
|
||||
|
||||
async function sendTestNotification(profileId, channel) {
|
||||
const title = 'Pickup Benachrichtigung (Test)';
|
||||
const message = 'Das ist eine Testnachricht. Bei Fragen wende dich bitte an den Admin.';
|
||||
@@ -148,5 +165,6 @@ async function sendTestNotification(profileId, channel) {
|
||||
module.exports = {
|
||||
sendSlotNotification,
|
||||
sendStoreWatchNotification,
|
||||
sendTestNotification
|
||||
sendTestNotification,
|
||||
sendDesiredWindowMissedNotification
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user