diff --git a/apps/dispatch/app/_components/left/SituationBoard.tsx b/apps/dispatch/app/_components/left/SituationBoard.tsx index 5e86f229..4dfc75f3 100644 --- a/apps/dispatch/app/_components/left/SituationBoard.tsx +++ b/apps/dispatch/app/_components/left/SituationBoard.tsx @@ -1,13 +1,12 @@ "use client"; import { useLeftMenuStore } from "_store/leftMenuStore"; -import { useSession } from "next-auth/react"; import { cn } from "_helpers/cn"; import { ListCollapse, Plane } from "lucide-react"; import { useQuery } from "@tanstack/react-query"; import { getMissionsAPI } from "_querys/missions"; -import { MissionsOnStations, Station } from "@repo/db"; +import { Station } from "@repo/db"; import { getConnectedAircraftsAPI } from "_querys/aircrafts"; -import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_components/map/AircraftMarker"; +import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors"; import { useMapStore } from "_store/mapStore"; import { useDispatchConnectionStore } from "_store/dispatch/connectionStore"; diff --git a/apps/dispatch/app/_components/map/AircraftMarker.tsx b/apps/dispatch/app/_components/map/AircraftMarker.tsx index da68b817..51b54638 100644 --- a/apps/dispatch/app/_components/map/AircraftMarker.tsx +++ b/apps/dispatch/app/_components/map/AircraftMarker.tsx @@ -16,53 +16,7 @@ import { useQuery } from "@tanstack/react-query"; import { getConnectedAircraftsAPI } from "_querys/aircrafts"; import { getMissionsAPI } from "_querys/missions"; import { checkSimulatorConnected } from "_helpers/simulatorConnected"; - -export const FMS_STATUS_COLORS: { [key: string]: string } = { - "0": "rgb(140,10,10)", - "1": "rgb(10,134,25)", - "2": "rgb(10,134,25)", - "3": "rgb(140,10,10)", - "4": "rgb(140,10,10)", - "5": "rgb(231,77,22)", - "6": "rgb(85,85,85)", - "7": "rgb(140,10,10)", - "8": "rgb(186,105,0)", - "9": "rgb(10,134,25)", - E: "rgb(186,105,0)", - C: "rgb(186,105,0)", - F: "rgb(186,105,0)", - J: "rgb(186,105,0)", - L: "rgb(186,105,0)", - c: "rgb(186,105,0)", - d: "rgb(186,105,0)", - h: "rgb(186,105,0)", - o: "rgb(186,105,0)", - u: "rgb(186,105,0)", -}; - -export const FMS_STATUS_TEXT_COLORS: { [key: string]: string } = { - "0": "rgb(243,27,25)", - "1": "rgb(9,212,33)", - "2": "rgb(9,212,33)", - "3": "rgb(243,27,25)", - "4": "rgb(243,27,25)", - "5": "rgb(251,176,158)", - "6": "rgb(153,153,153)", - "7": "rgb(243,27,25)", - "8": "rgb(255,143,0)", - "9": "rgb(9,212,33)", - N: "rgb(9,212,33)", - E: "rgb(255,143,0)", - C: "rgb(255,143,0)", - F: "rgb(255,143,0)", - J: "rgb(255,143,0)", - L: "rgb(255,143,0)", - c: "rgb(255,143,0)", - d: "rgb(255,143,0)", - h: "rgb(255,143,0)", - o: "rgb(255,143,0)", - u: "rgb(255,143,0)", -}; +import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors"; const AircraftPopupContent = ({ aircraft, diff --git a/apps/dispatch/app/_components/map/_components/AircraftMarkerTabs.tsx b/apps/dispatch/app/_components/map/_components/AircraftMarkerTabs.tsx index 5ea062eb..e46eba05 100644 --- a/apps/dispatch/app/_components/map/_components/AircraftMarkerTabs.tsx +++ b/apps/dispatch/app/_components/map/_components/AircraftMarkerTabs.tsx @@ -1,6 +1,6 @@ "use client"; import React, { useState } from "react"; -import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "../AircraftMarker"; +import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors"; import { ConnectedAircraft, getPublicUser, diff --git a/apps/dispatch/app/_components/map/_components/MarkerCluster.tsx b/apps/dispatch/app/_components/map/_components/MarkerCluster.tsx index fa35e6e8..18e30a49 100644 --- a/apps/dispatch/app/_components/map/_components/MarkerCluster.tsx +++ b/apps/dispatch/app/_components/map/_components/MarkerCluster.tsx @@ -3,7 +3,7 @@ import { useQuery } from "@tanstack/react-query"; import { SmartPopup, useSmartPopup } from "_components/SmartPopup"; import { useDispatchConnectionStore } from "_store/dispatch/connectionStore"; import { useMapStore } from "_store/mapStore"; -import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_components/map/AircraftMarker"; +import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors"; import { MISSION_STATUS_COLORS, MISSION_STATUS_TEXT_COLORS } from "_components/map/MissionMarkers"; import { cn } from "_helpers/cn"; import { checkSimulatorConnected } from "_helpers/simulatorConnected"; diff --git a/apps/dispatch/app/_components/map/_components/MissionMarkerTabs.tsx b/apps/dispatch/app/_components/map/_components/MissionMarkerTabs.tsx index 44d6ad12..9d8185c7 100644 --- a/apps/dispatch/app/_components/map/_components/MissionMarkerTabs.tsx +++ b/apps/dispatch/app/_components/map/_components/MissionMarkerTabs.tsx @@ -1,6 +1,6 @@ "use client"; import React, { useEffect, useState } from "react"; -import { FMS_STATUS_TEXT_COLORS } from "../AircraftMarker"; +import { FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors"; import { toast } from "react-hot-toast"; import { Ban, diff --git a/apps/dispatch/app/_helpers/fmsStatusColors.ts b/apps/dispatch/app/_helpers/fmsStatusColors.ts new file mode 100644 index 00000000..fa5a3c37 --- /dev/null +++ b/apps/dispatch/app/_helpers/fmsStatusColors.ts @@ -0,0 +1,46 @@ +export const FMS_STATUS_COLORS: { [key: string]: string } = { + "0": "rgb(140,10,10)", + "1": "rgb(10,134,25)", + "2": "rgb(10,134,25)", + "3": "rgb(140,10,10)", + "4": "rgb(140,10,10)", + "5": "rgb(231,77,22)", + "6": "rgb(85,85,85)", + "7": "rgb(140,10,10)", + "8": "rgb(186,105,0)", + "9": "rgb(10,134,25)", + E: "rgb(186,105,0)", + C: "rgb(186,105,0)", + F: "rgb(186,105,0)", + J: "rgb(186,105,0)", + L: "rgb(186,105,0)", + c: "rgb(186,105,0)", + d: "rgb(186,105,0)", + h: "rgb(186,105,0)", + o: "rgb(186,105,0)", + u: "rgb(186,105,0)", +}; + +export const FMS_STATUS_TEXT_COLORS: { [key: string]: string } = { + "0": "rgb(243,27,25)", + "1": "rgb(9,212,33)", + "2": "rgb(9,212,33)", + "3": "rgb(243,27,25)", + "4": "rgb(243,27,25)", + "5": "rgb(251,176,158)", + "6": "rgb(153,153,153)", + "7": "rgb(243,27,25)", + "8": "rgb(255,143,0)", + "9": "rgb(9,212,33)", + N: "rgb(9,212,33)", + E: "rgb(255,143,0)", + C: "rgb(255,143,0)", + F: "rgb(255,143,0)", + J: "rgb(255,143,0)", + L: "rgb(255,143,0)", + c: "rgb(255,143,0)", + d: "rgb(255,143,0)", + h: "rgb(255,143,0)", + o: "rgb(255,143,0)", + u: "rgb(255,143,0)", +};