File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1075,11 +1075,19 @@ function startSlotRefreshTimer() {
10751075 const coords = await getValidGpsForZoneCheck ( ) ;
10761076 if ( coords ) {
10771077 const result = await checkZoneStatus ( coords ) ;
1078- if ( result . success && result . zone ) {
1078+ if ( result . success && result . in_zone && result . zone ) {
1079+ // Still in zone - update slots display
10791080 state . currentZone = result . zone ;
10801081 updateSlotsDisplay ( result . zone ) ;
10811082 updateMapOnZoneCheck ( coords ) ; // Update map and GPS overlay
10821083 debugLog ( `[GEO AUTH] [SLOT REFRESH] Updated slots: ${ result . zone . slots_available } /${ result . zone . slots_max } ` ) ;
1084+ } else if ( result . success && ! result . in_zone ) {
1085+ // Moved outside zone - update UI to show outside zone status
1086+ state . currentZone = null ;
1087+ state . lastZoneCheckCoords = { lat : coords . lat , lon : coords . lon } ;
1088+ updateZoneStatusUI ( result ) ;
1089+ updateMapOnZoneCheck ( coords ) ;
1090+ debugLog ( `[GEO AUTH] [SLOT REFRESH] Now outside zone, nearest: ${ result . nearest_zone ?. name } at ${ result . nearest_zone ?. distance_km } km` ) ;
10831091 } else if ( result && ! result . success ) {
10841092 // Handle error states (outofdate, etc.) - this will disable button and clear currentZone
10851093 updateZoneStatusUI ( result ) ;
You can’t perform that action at this time.
0 commit comments