mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(mobile): a stay chip in the timeline header opens the stay, not the day (#2210)
The hotel chips next to the day pill shared its target, so tapping a stay opened the day sheet. A chip now carries its stay and opens it the way the stay card in the day sheet does: the accommodation editor for members who may edit days, otherwise the hotel's place, and the day sheet only when neither applies. Closing the editor returns to the timeline it was opened from instead of surfacing the day sheet, and the chip's accessible name says whether it is a check-in, a check-out or an ongoing stay.
This commit is contained in:
@@ -133,7 +133,7 @@ describe('useMPlanTimeline', () => {
|
||||
expect(result.current.hotelLegs.top?.seg).toBe(out)
|
||||
expect(result.current.hotelLegs.bottom?.seg).toBe(back)
|
||||
expect(result.current.hotelChips).toEqual([
|
||||
{ key: 'stay-71', variant: 'stay', name: 'Hotel Sacher', time: null },
|
||||
{ key: 'stay-71', variant: 'stay', name: 'Hotel Sacher', time: null, accId: 71, placeId: null },
|
||||
])
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user