@@ -39,6 +39,7 @@ const BookingComponent = () => {
39
39
}
40
40
41
41
const acceptedFIRsRegex = / ( ( E K [ A - Z ] [ A - Z ] _ ) | ( E F [ A - Z ] [ A - Z ] _ ) | ( B I [ A - Z ] [ A - Z ] _ ) | ( E N [ A - Z ] [ A - Z ] _ ) | ( E S [ A - Z ] [ A - Z ] _ ) ) \w + / i;
42
+ const mentorRegex = / ( ( _ X _ ) | ( _ M _ ) ) \w + / i;
42
43
43
44
function startsWithSameICAO ( callsign1 , callsign2 ) {
44
45
if ( callsign1 . substring ( 0 , 2 ) === callsign2 . substring ( 0 , 2 ) ) {
@@ -67,7 +68,7 @@ const BookingComponent = () => {
67
68
} ) ;
68
69
69
70
VATSIMNetworkData . controllers . forEach ( session => {
70
- if ( acceptedFIRsRegex . test ( session . callsign ) ) {
71
+ if ( acceptedFIRsRegex . test ( session . callsign ) && ! mentorRegex . test ( session . callsign ) ) {
71
72
const correctedCallsign = getBookableCallsign ( session . callsign , session . frequency ) ;
72
73
session . callsign = correctedCallsign ;
73
74
const existingBooking = dateArray [ 0 ] . data . find ( booking => booking . callsign === session . callsign ) ;
@@ -105,6 +106,15 @@ const BookingComponent = () => {
105
106
return (
106
107
< table className = "w-full h-full px-2" >
107
108
< tbody className = "h-full" >
109
+ { ControlCenterBookings . length > 0 ? (
110
+ ""
111
+ ) : (
112
+ < tr className = "h-12" >
113
+ < td colSpan = { 4 } >
114
+ < iframe src = "https://lottie.host/embed/e516525c-74c1-4db5-b2b2-bb135366e103/W8AodEgALN.json" className = "w-full h-full" />
115
+ </ td >
116
+ </ tr >
117
+ ) }
108
118
{ ControlCenterBookings . map ( ( date , index ) => (
109
119
< React . Fragment key = { index } >
110
120
{ date . data . length > 0 ?
@@ -124,6 +134,9 @@ const BookingComponent = () => {
124
134
125
135
</ React . Fragment >
126
136
) ) }
137
+ { ControlCenterBookings . length < 1 ? (
138
+ ""
139
+ ) : (
127
140
< tr className = "bg-snow dark:bg-secondary w-full font-bold text-black dark:text-white py-4 text-center h-12" >
128
141
< td colSpan = { 4 } className = "underline hover:no-underline text-md" >
129
142
< a href = "https://cc.vatsim-scandinavia.org/booking" target = "_blank" className = "underline hover:no-underline" >
@@ -132,6 +145,8 @@ const BookingComponent = () => {
132
145
< ExternalLinkIcon width = "0.75rem" marginLeft = "0.3rem" />
133
146
</ td >
134
147
</ tr >
148
+ ) }
149
+
135
150
</ tbody >
136
151
</ table >
137
152
) ;
0 commit comments