From 0fd2f9265451d90d6f82b939341b986d2d9808c6 Mon Sep 17 00:00:00 2001 From: nocnico Date: Thu, 22 May 2025 01:21:41 +0200 Subject: [PATCH] Fix dispatcherConnected elements --- .../map/_components/MissionMarkerTabs.tsx | 285 +++++++++--------- 1 file changed, 147 insertions(+), 138 deletions(-) diff --git a/apps/dispatch/app/dispatch/_components/map/_components/MissionMarkerTabs.tsx b/apps/dispatch/app/dispatch/_components/map/_components/MissionMarkerTabs.tsx index 275c6a46..2ed8880d 100644 --- a/apps/dispatch/app/dispatch/_components/map/_components/MissionMarkerTabs.tsx +++ b/apps/dispatch/app/dispatch/_components/map/_components/MissionMarkerTabs.tsx @@ -38,6 +38,7 @@ import { } from "querys/missions"; import { getConnectedAircraftsAPI } from "querys/aircrafts"; import { getStationsAPI } from "querys/stations"; +import { useDispatchConnectionStore } from "_store/dispatch/connectionStore"; const Einsatzdetails = ({ mission }: { mission: Mission }) => { const queryClient = useQueryClient(); @@ -80,6 +81,8 @@ const Einsatzdetails = ({ mission }: { mission: Mission }) => { }); }, }); + const dispatcherConnected = + useDispatchConnectionStore((s) => s.status) === "connected"; const { setMissionFormValues, setOpen } = usePannelStore((state) => state); return (
@@ -87,53 +90,51 @@ const Einsatzdetails = ({ mission }: { mission: Mission }) => {

Einsatzdetails

- {mission.state !== "draft" && - typeof window !== "undefined" && - !window.location.pathname.startsWith("/pilot") && ( -
-
+
+ -
-
- -
+ +
- )} +
+ +
+
+ )}