mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 23:27:31 +00:00
fix(notifications): drop a tab the planner lacks from the URL, link booking mails to the reservations tab, open the chat on the phone
This commit is contained in:
@@ -296,7 +296,7 @@ const EVENT_NOTIFICATION_CONFIG: Record<string, EventNotifConfig> = {
|
||||
titleKey: 'notif.mail_booking_added.title',
|
||||
textKey: (p) => (p.role === 'traveller' ? MAIL_BOOKING_TEXT.traveller : MAIL_BOOKING_TEXT.forwarder).textKey,
|
||||
navigateTextKey: 'notif.action.view_trip',
|
||||
navigateTarget: (p) => (p.tripId ? `/trips/${p.tripId}?tab=bookings` : null),
|
||||
navigateTarget: (p) => (p.tripId ? `/trips/${p.tripId}?tab=buchungen` : null),
|
||||
},
|
||||
// Bookings from forwarded mails wait in the person's inbox for a decision.
|
||||
mail_booking_pending: {
|
||||
|
||||
@@ -682,8 +682,8 @@ describe('send() — in-app notification content', () => {
|
||||
const notifs = await getInAppNotifications(user.id);
|
||||
expect(notifs.map((n) => [n.text_key, n.navigate_target])).toEqual(
|
||||
expect.arrayContaining([
|
||||
['notif.mail_booking_added.text', '/trips/7?tab=bookings'],
|
||||
['notif.mail_booking_added.shared', '/trips/7?tab=bookings'],
|
||||
['notif.mail_booking_added.text', '/trips/7?tab=buchungen'],
|
||||
['notif.mail_booking_added.shared', '/trips/7?tab=buchungen'],
|
||||
['notif.mail_booking_pending.text', '/dashboard?inbox=mail'],
|
||||
['notif.mail_ingest_paused.text', null],
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user