fsanyoto commited on
Commit
309fe95
·
verified ·
1 Parent(s): 9b3539a

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
Files changed (3) hide show
  1. RELEASES.json +1 -1
  2. VERSION +1 -1
  3. web/src/customer-grid/MapView.tsx +6 -1
RELEASES.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "current": "258dba2",
3
  "releases": [
4
  {
5
  "version": "v56",
 
1
  {
2
+ "current": "fbb56dd",
3
  "releases": [
4
  {
5
  "version": "v56",
VERSION CHANGED
@@ -1 +1 @@
1
- 258dba2
 
1
+ fbb56dd
web/src/customer-grid/MapView.tsx CHANGED
@@ -882,11 +882,16 @@ export function MapView({
882
  });
883
  const body = res.ok ? await res.json().catch(() => null) : null;
884
  if (zoneRequestRef.current.generation !== generation) return;
885
- setZones(Array.isArray(body?.zones) ? body.zones : []);
 
 
 
 
886
  } catch {
887
  if (controller.signal.aborted) return;
888
  if (zoneRequestRef.current.generation !== generation) return;
889
  setZones([]);
 
890
  }
891
  }, [tableKey]);
892
  useEffect(() => { void loadZones(); }, [loadZones]);
 
882
  });
883
  const body = res.ok ? await res.json().catch(() => null) : null;
884
  if (zoneRequestRef.current.generation !== generation) return;
885
+ const loadedZones: MapZone[] = Array.isArray(body?.zones) ? body.zones : [];
886
+ setZones(loadedZones);
887
+ setActiveZoneIds(new Set(
888
+ loadedZones.filter((zone) => zone.visible).map((zone) => zone.id)
889
+ ));
890
  } catch {
891
  if (controller.signal.aborted) return;
892
  if (zoneRequestRef.current.generation !== generation) return;
893
  setZones([]);
894
+ setActiveZoneIds(new Set());
895
  }
896
  }, [tableKey]);
897
  useEffect(() => { void loadZones(); }, [loadZones]);