Fix window not found on dispatch
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { useLeftMenuStore } from "_store/leftMenuStore";
|
import { useLeftMenuStore } from "_store/leftMenuStore";
|
||||||
import { useSession } from "next-auth/react";
|
|
||||||
import { cn } from "_helpers/cn";
|
import { cn } from "_helpers/cn";
|
||||||
import { ListCollapse, Plane } from "lucide-react";
|
import { ListCollapse, Plane } from "lucide-react";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { getMissionsAPI } from "_querys/missions";
|
import { getMissionsAPI } from "_querys/missions";
|
||||||
import { MissionsOnStations, Station } from "@repo/db";
|
import { Station } from "@repo/db";
|
||||||
import { getConnectedAircraftsAPI } from "_querys/aircrafts";
|
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 { useMapStore } from "_store/mapStore";
|
||||||
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||||
|
|
||||||
|
|||||||
@@ -16,53 +16,7 @@ import { useQuery } from "@tanstack/react-query";
|
|||||||
import { getConnectedAircraftsAPI } from "_querys/aircrafts";
|
import { getConnectedAircraftsAPI } from "_querys/aircrafts";
|
||||||
import { getMissionsAPI } from "_querys/missions";
|
import { getMissionsAPI } from "_querys/missions";
|
||||||
import { checkSimulatorConnected } from "_helpers/simulatorConnected";
|
import { checkSimulatorConnected } from "_helpers/simulatorConnected";
|
||||||
|
import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors";
|
||||||
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)",
|
|
||||||
};
|
|
||||||
|
|
||||||
const AircraftPopupContent = ({
|
const AircraftPopupContent = ({
|
||||||
aircraft,
|
aircraft,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import React, { useState } from "react";
|
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 {
|
import {
|
||||||
ConnectedAircraft,
|
ConnectedAircraft,
|
||||||
getPublicUser,
|
getPublicUser,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useQuery } from "@tanstack/react-query";
|
|||||||
import { SmartPopup, useSmartPopup } from "_components/SmartPopup";
|
import { SmartPopup, useSmartPopup } from "_components/SmartPopup";
|
||||||
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||||
import { useMapStore } from "_store/mapStore";
|
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 { MISSION_STATUS_COLORS, MISSION_STATUS_TEXT_COLORS } from "_components/map/MissionMarkers";
|
||||||
import { cn } from "_helpers/cn";
|
import { cn } from "_helpers/cn";
|
||||||
import { checkSimulatorConnected } from "_helpers/simulatorConnected";
|
import { checkSimulatorConnected } from "_helpers/simulatorConnected";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import React, { useEffect, useState } from "react";
|
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 { toast } from "react-hot-toast";
|
||||||
import {
|
import {
|
||||||
Ban,
|
Ban,
|
||||||
|
|||||||
46
apps/dispatch/app/_helpers/fmsStatusColors.ts
Normal file
46
apps/dispatch/app/_helpers/fmsStatusColors.ts
Normal file
@@ -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)",
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user