mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
indicate loading daysBooked in calendar
This commit is contained in:
@@ -49,7 +49,10 @@ export default function MyCalendar() {
|
||||
'Calendar-grid-item',
|
||||
day.isSame(moment(), 'day') && 'Calendar-grid-item--current',
|
||||
day.isBefore(moment(), 'day') && 'Calendar-grid-item--past',
|
||||
dayBooked(day.toDate()) && 'Calendar-grid-item--booked',
|
||||
!!daysBooked &&
|
||||
(dayBooked(day.toDate())
|
||||
? 'Calendar-grid-item--booked'
|
||||
: 'Calendar-grid-item--free'),
|
||||
classNames
|
||||
)}
|
||||
onClick={(e) => onPickDate(day)}
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
}
|
||||
|
||||
.Calendar-grid-item {
|
||||
@apply text-center p-1 bg-green-200 border-r border-b border-solid border-gray-500;
|
||||
@apply text-center p-1 border-r border-b border-solid border-gray-500;
|
||||
flex: 0 calc(100% / 7);
|
||||
}
|
||||
|
||||
@@ -136,6 +136,9 @@
|
||||
@apply font-bold;
|
||||
}
|
||||
|
||||
.Calendar-grid-item--free:not(.Calendar-grid-item--past) {
|
||||
@apply bg-green-200;
|
||||
}
|
||||
.Calendar-grid-item--booked {
|
||||
@apply bg-red-200 cursor-not-allowed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user