- {dayAccs.map(acc => {
- const isCheckIn = acc.start_day_id === day.id
- const isCheckOut = acc.end_day_id === day.id
- const accName = (acc as any).place_name || (acc as any).reservation_title
- // The state is said in words as well as colour: check-in green,
- // check-out red, a stay in between quiet.
- const state = isCheckOut && !isCheckIn ? t('day.checkOut') : isCheckIn ? t('day.checkIn') : null
- const iconTone = isCheckOut && !isCheckIn ? 'text-danger' : isCheckIn ? 'text-success' : 'text-content-faint'
- // Not confirmed yet: a dashed ring says so at a glance, the tooltip in words (#2281).
- const pending = pendingStays.has(acc.id)
- const named = state ? `${state}: ${accName}` : accName
- const tip = pending ? `${named} (${t('reservations.pending')})` : named
- // The name opens the place, as before; a stay with a booking gets a
- // second target in the same pill that opens the booking (#2363).
- const stayBooking = onOpenBooking
- ? reservations.find(r => r.accommodation_id != null && Number(r.accommodation_id) === acc.id)
- : undefined
- return (
-
-
-
-
- {stayBooking && (
-
-
-
- )}
-
- )
- })}
- {/* Active rental car badges */}
- {activeRentals.map(r => (
-
- ))}
- {/* A plugin's name for this day (which leg of the trip it belongs to). */}
- {dayTint?.label && {dayTint.label}}
-
- )}
-
+ {/* Pulled out of the line's height, so the pills below sit under the name
+ rather than under the 28px buttons. */}
+
{canEditDays && (
: }
+ {hasDayPills && (
+
+ {dayAccs.map(acc => {
+ const isCheckIn = acc.start_day_id === day.id
+ const isCheckOut = acc.end_day_id === day.id
+ const accName = (acc as any).place_name || (acc as any).reservation_title
+ // The state is said in words as well as colour: check-in green,
+ // check-out red, a stay in between quiet.
+ const state = isCheckOut && !isCheckIn ? t('day.checkOut') : isCheckIn ? t('day.checkIn') : null
+ const iconTone = isCheckOut && !isCheckIn ? 'text-danger' : isCheckIn ? 'text-success' : 'text-content-faint'
+ // Not confirmed yet: a dashed ring says so at a glance, the tooltip in words (#2281).
+ const pending = pendingStays.has(acc.id)
+ const named = state ? `${state}: ${accName}` : accName
+ const tip = pending ? `${named} (${t('reservations.pending')})` : named
+ // The name opens the place, as before; a stay with a booking gets a
+ // second target in the same pill that opens the booking (#2363).
+ const stayBooking = onOpenBooking
+ ? reservations.find(r => r.accommodation_id != null && Number(r.accommodation_id) === acc.id)
+ : undefined
+ return (
+
+
+
+
+ {stayBooking && (
+
+
+
+ )}
+
+ )
+ })}
+ {/* Active rental car badges */}
+ {activeRentals.map(r => (
+
+ ))}
+ {/* A plugin's name for this day (which leg of the trip it belongs to). */}
+ {dayTint?.label && {dayTint.label}}
+