Просмотр исходного кода

Tint booked day cells with light lavender background

ZiB 4 месяцев назад
Родитель
Сommit
1e11069d9b
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      room_cal/vue/calendar.html

+ 4 - 0
room_cal/vue/calendar.html

@@ -228,6 +228,9 @@
     .day-cell.closed .day-num { color: var(--text-muted); }
     .day-cell.closed .day-num { color: var(--text-muted); }
     .day-cell.closed .day-price-row,
     .day-cell.closed .day-price-row,
     .day-cell.closed .day-no-price { opacity: 0.4; }
     .day-cell.closed .day-no-price { opacity: 0.4; }
+    .day-cell.booked { background: #f0ebf8; }
+    .day-cell.booked .day-price-row,
+    .day-cell.booked .day-no-price { opacity: 0.45; }
 
 
     .day-top {
     .day-top {
       display: flex;
       display: flex;
@@ -741,6 +744,7 @@
             :class="{
             :class="{
               outside:  !inMonth(day),
               outside:  !inMonth(day),
               today:    isToday(day),
               today:    isToday(day),
+              booked:   inMonth(day) && !!reservations.value[fmtDate(day)],
               closed:   inMonth(day) && isClosed(day),
               closed:   inMonth(day) && isClosed(day),
               selected: bulkEnabled ? bulkDays.has(fmtDate(day)) : (selection?.type === 'day' && selection.key === fmtDate(day)),
               selected: bulkEnabled ? bulkDays.has(fmtDate(day)) : (selection?.type === 'day' && selection.key === fmtDate(day)),
             }"
             }"