mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
indicate loading daysBooked in calendar
This commit is contained in:
@@ -49,7 +49,10 @@ export default function MyCalendar() {
|
|||||||
'Calendar-grid-item',
|
'Calendar-grid-item',
|
||||||
day.isSame(moment(), 'day') && 'Calendar-grid-item--current',
|
day.isSame(moment(), 'day') && 'Calendar-grid-item--current',
|
||||||
day.isBefore(moment(), 'day') && 'Calendar-grid-item--past',
|
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
|
classNames
|
||||||
)}
|
)}
|
||||||
onClick={(e) => onPickDate(day)}
|
onClick={(e) => onPickDate(day)}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.Calendar-grid-item {
|
.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);
|
flex: 0 calc(100% / 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,6 +136,9 @@
|
|||||||
@apply font-bold;
|
@apply font-bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Calendar-grid-item--free:not(.Calendar-grid-item--past) {
|
||||||
|
@apply bg-green-200;
|
||||||
|
}
|
||||||
.Calendar-grid-item--booked {
|
.Calendar-grid-item--booked {
|
||||||
@apply bg-red-200 cursor-not-allowed;
|
@apply bg-red-200 cursor-not-allowed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user