@@ -42,7 +42,7 @@ export interface TimeTableGroup {
4242
4343export interface TimeTableEntry <
4444 G extends TimeTableGroup ,
45- I extends TimeSlotBooking
45+ I extends TimeSlotBooking ,
4646> {
4747 group : G
4848 items : I [ ]
@@ -57,7 +57,7 @@ export interface SelectedTimeSlot<G extends TimeTableGroup> {
5757
5858export interface LPTimeTableProps <
5959 G extends TimeTableGroup ,
60- I extends TimeSlotBooking
60+ I extends TimeSlotBooking ,
6161> {
6262 /* The start date also defines the time the time slots starts in the morning */
6363 startDate : Dayjs
@@ -80,7 +80,7 @@ export interface LPTimeTableProps<
8080
8181 /* this function gets called when a selection was made, i.g. to create a booking. the return value states if the selection should be cleared or not */
8282 onTimeRangeSelected ?: (
83- s : { group : G ; startDate : Dayjs ; endDate : Dayjs } | undefined
83+ s : { group : G ; startDate : Dayjs ; endDate : Dayjs } | undefined ,
8484 ) => boolean | void
8585
8686 /* The selected time range context sets this callback to be able for a time table parent component to clear the selected time range from outside */
@@ -137,11 +137,11 @@ const nowbarUpdateIntervall = 1000 * 60 // 1 minute
137137
138138export default function LPTimeTable <
139139 G extends TimeTableGroup ,
140- I extends TimeSlotBooking
140+ I extends TimeSlotBooking ,
141141> ( { timeTableMessages, ...props } : LPTimeTableProps < G , I > ) {
142142 if ( ! getCurrentTheme ( ) ) {
143143 console . warn (
144- "LPTimeTable - no theme set, LPTable required Atlassian.design token to have the color scheme set correctly"
144+ "LPTimeTable - no theme set, LPTable required Atlassian.design token to have the color scheme set correctly" ,
145145 )
146146 }
147147
@@ -205,13 +205,13 @@ const LPTimeTableImpl = <G extends TimeTableGroup, I extends TimeSlotBooking>({
205205 endDate ,
206206 timeStepsMinutes ,
207207 rounding ?? "round" ,
208- setMessage
208+ setMessage ,
209209 )
210210 const slotsArray = calculateTimeSlots (
211211 timeSlotsPerDay ,
212212 daysDifference ,
213213 timeSteps ,
214- startDate
214+ startDate ,
215215 )
216216 return { slotsArray, timeSteps, timeSlotsPerDay }
217217 } , [ startDate , endDate , timeStepsMinutes , rounding , setMessage ] )
@@ -227,7 +227,7 @@ const LPTimeTableImpl = <G extends TimeTableGroup, I extends TimeSlotBooking>({
227227 const itemsOutside = itemsOutsideOfDayRange (
228228 entry . items ,
229229 slotsArray ,
230- timeSteps
230+ timeSteps ,
231231 )
232232 foundItemsOutsideOfDayRange += itemsOutside . length
233233 }
@@ -300,6 +300,7 @@ const LPTimeTableImpl = <G extends TimeTableGroup, I extends TimeSlotBooking>({
300300 timeSteps = { timeSteps }
301301 onTimeRangeSelected = { onTimeRangeSelected }
302302 setClearSelectedTimeRangeCB = { setClearSelectedTimeRangeCB }
303+ disableWeekendInteractions = { disableWeekendInteractions }
303304 >
304305 < div
305306 style = { {
@@ -383,7 +384,7 @@ function TimeSlotBarRow({
383384 // when the debugging overwrite is active, we still want to move the bar to test it
384385 nowRef . current = nowRef . current . add (
385386 nowbarUpdateIntervall ,
386- "milliseconds"
387+ "milliseconds" ,
387388 )
388389 } else {
389390 nowRef . current = dayjs ( )
@@ -396,7 +397,7 @@ function TimeSlotBarRow({
396397 nowBarRef ,
397398 tableHeaderRef ,
398399 tableBodyRef ,
399- setMessage
400+ setMessage ,
400401 )
401402 } , [
402403 slotsArray ,
@@ -431,7 +432,7 @@ function TimeSlotBarRow({
431432 messageKey : "timetable.timeSlotColumnsNotFound" ,
432433 } )
433434 console . log (
434- "LPTimeTable - unable to find time slot columns for the time slot bars"
435+ "LPTimeTable - unable to find time slot columns for the time slot bars" ,
435436 )
436437 return
437438 }
@@ -499,7 +500,7 @@ function calculateTimeSlotProperties(
499500 endDate : Dayjs ,
500501 timeStepsMinute : number ,
501502 rounding : "ceil" | "floor" | "round" ,
502- setMessage : ( message : TimeTableMessage ) => void
503+ setMessage : ( message : TimeTableMessage ) => void ,
503504) {
504505 let timeSlotsPerDay = 0
505506 let timeSteps = timeStepsMinute
@@ -542,7 +543,7 @@ function calculateTimeSlotProperties(
542543 . startOf ( "day" )
543544 . add ( startDate . hour ( ) , "hours" )
544545 . add ( startDate . minute ( ) , "minutes" ) ,
545- "minutes"
546+ "minutes" ,
546547 )
547548
548549 if ( timeDiff === 0 ) {
@@ -574,22 +575,22 @@ function calculateTimeSlots(
574575 timeSlotsPerDay : number ,
575576 daysDifference : number ,
576577 timeSteps : number ,
577- startDate : Dayjs
578+ startDate : Dayjs ,
578579) {
579580 if ( ! isFinite ( timeSlotsPerDay ) ) {
580581 return null
581582 }
582583 const daysArray = Array . from ( { length : daysDifference } , ( x , i ) => i ) . map (
583584 ( day ) => {
584585 return dayjs ( startDate ) . add ( day , "days" )
585- }
586+ } ,
586587 )
587588
588589 const slotsArray = daysArray . flatMap ( ( date ) => {
589590 console . log ( "LPTimeTable - timeSlotsPerDay" , timeSlotsPerDay )
590591 return Array . from (
591592 { length : timeSlotsPerDay } ,
592- ( _ , i ) => i * timeSteps
593+ ( _ , i ) => i * timeSteps ,
593594 ) . map ( ( minutes ) => {
594595 return dayjs ( date ) . add ( minutes , "minutes" )
595596 } )
@@ -616,7 +617,7 @@ function moveNowBar(
616617 nowBarRef : MutableRefObject < HTMLDivElement | undefined > ,
617618 tableHeaderRef : MutableRefObject < HTMLTableSectionElement | null > ,
618619 tableBodyRef : MutableRefObject < HTMLTableSectionElement | null > ,
619- setMessage : ( message : TimeTableMessage ) => void
620+ setMessage : ( message : TimeTableMessage ) => void ,
620621) {
621622 if ( ! tableHeaderRef . current || ! tableBodyRef . current ) {
622623 console . log ( "LPTimeTable - time table header or body ref not yet set" )
@@ -667,7 +668,7 @@ function moveNowBar(
667668 if ( ! slotBar ) {
668669 console . log (
669670 "LPTimeTable - unable to find time slot column for the now bar: " ,
670- startSlot
671+ startSlot ,
671672 )
672673 return
673674 }
0 commit comments