Fixed docker deploments, moved files to _folders in dispatch app
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
ZapOff,
|
||||
} from "lucide-react";
|
||||
import { useAudioStore } from "_store/audioStore";
|
||||
import { cn } from "helpers/cn";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { ConnectionQuality } from "livekit-client";
|
||||
import { ROOMS } from "_data/livekitRooms";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "helpers/cn";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
type MicrophoneLevelProps = {
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
"use client";
|
||||
import {
|
||||
FieldValues,
|
||||
Path,
|
||||
RegisterOptions,
|
||||
UseFormReturn,
|
||||
} from "react-hook-form";
|
||||
import SelectTemplate, {
|
||||
Props as SelectTemplateProps,
|
||||
StylesConfig,
|
||||
} from "react-select";
|
||||
import { cn } from "helpers/cn";
|
||||
import { FieldValues, Path, RegisterOptions, UseFormReturn } from "react-hook-form";
|
||||
import SelectTemplate, { Props as SelectTemplateProps, StylesConfig } from "react-select";
|
||||
import { cn } from "_helpers/cn";
|
||||
import dynamic from "next/dynamic";
|
||||
import { CSSProperties } from "react";
|
||||
|
||||
interface SelectProps<T extends FieldValues>
|
||||
extends Omit<SelectTemplateProps, "form"> {
|
||||
interface SelectProps<T extends FieldValues> extends Omit<SelectTemplateProps, "form"> {
|
||||
label?: any;
|
||||
name: Path<T>;
|
||||
form: UseFormReturn<T> | any;
|
||||
@@ -69,9 +60,7 @@ const SelectCom = <T extends FieldValues>({
|
||||
}: SelectProps<T>) => {
|
||||
return (
|
||||
<div>
|
||||
<span className="label-text text-lg flex items-center gap-2">
|
||||
{label}
|
||||
</span>
|
||||
<span className="label-text text-lg flex items-center gap-2">{label}</span>
|
||||
<SelectTemplate
|
||||
onChange={(newValue: any) => {
|
||||
if (Array.isArray(newValue)) {
|
||||
@@ -88,12 +77,8 @@ const SelectCom = <T extends FieldValues>({
|
||||
}}
|
||||
value={
|
||||
(inputProps as any)?.isMulti
|
||||
? (inputProps as any).options?.filter((o: any) =>
|
||||
form.watch(name)?.includes(o.value),
|
||||
)
|
||||
: (inputProps as any).options?.find(
|
||||
(o: any) => o.value === form.watch(name),
|
||||
)
|
||||
? (inputProps as any).options?.filter((o: any) => form.watch(name)?.includes(o.value))
|
||||
: (inputProps as any).options?.find((o: any) => o.value === form.watch(name))
|
||||
}
|
||||
styles={customStyles as any}
|
||||
className={cn("w-full placeholder:text-neutral-600", className)}
|
||||
@@ -101,17 +86,13 @@ const SelectCom = <T extends FieldValues>({
|
||||
{...inputProps}
|
||||
/>
|
||||
{form.formState.errors[name]?.message && (
|
||||
<p className="text-error">
|
||||
{form.formState.errors[name].message as string}
|
||||
</p>
|
||||
<p className="text-error">{form.formState.errors[name].message as string}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const SelectWrapper = <T extends FieldValues>(props: SelectProps<T>) => (
|
||||
<SelectCom {...props} />
|
||||
);
|
||||
const SelectWrapper = <T extends FieldValues>(props: SelectProps<T>) => <SelectCom {...props} />;
|
||||
|
||||
export const Select = dynamic(() => Promise.resolve(SelectWrapper), {
|
||||
ssr: false,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { GearIcon } from "@radix-ui/react-icons";
|
||||
import { SettingsIcon, Volume2 } from "lucide-react";
|
||||
import MicVolumeBar from "_components/MicVolumeIndication";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { editUserAPI, getUserAPI } from "querys/user";
|
||||
import { editUserAPI, getUserAPI } from "_querys/user";
|
||||
import { Prisma } from "@repo/db";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useAudioStore } from "_store/audioStore";
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { cn } from "helpers/cn";
|
||||
import {
|
||||
RefAttributes,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useImperativeHandle,
|
||||
} from "react";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { RefAttributes, useCallback, useEffect, useImperativeHandle } from "react";
|
||||
import { createContext, Ref, useContext, useState } from "react";
|
||||
import { Popup, PopupProps, useMap } from "react-leaflet";
|
||||
import { Popup as LPopup } from "leaflet";
|
||||
@@ -113,9 +108,9 @@ export const SmartPopup = (
|
||||
const [showContent, setShowContent] = useState(false);
|
||||
const { smartPopupRef, id, className, wrapperClassName, options } = props;
|
||||
|
||||
const [anchor, setAnchor] = useState<
|
||||
"topleft" | "topright" | "bottomleft" | "bottomright"
|
||||
>("topleft");
|
||||
const [anchor, setAnchor] = useState<"topleft" | "topright" | "bottomleft" | "bottomright">(
|
||||
"topleft",
|
||||
);
|
||||
|
||||
const handleConflict = useCallback(() => {
|
||||
const newAnchor = calculateAnchor(id, "popup", options);
|
||||
@@ -160,9 +155,7 @@ export const SmartPopup = (
|
||||
anchor.includes("top") && "-translate-y-1/2",
|
||||
)}
|
||||
/>
|
||||
<PopupContext.Provider value={{ anchor: anchor }}>
|
||||
{props.children}
|
||||
</PopupContext.Provider>
|
||||
<PopupContext.Provider value={{ anchor: anchor }}>{props.children}</PopupContext.Provider>
|
||||
</div>
|
||||
</Popup>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from "helpers/cn";
|
||||
import { cn } from "_helpers/cn";
|
||||
|
||||
export const BaseNotification = ({
|
||||
children,
|
||||
|
||||
@@ -3,10 +3,10 @@ import { ChatBubbleIcon, PaperPlaneIcon } from "@radix-ui/react-icons";
|
||||
import { useLeftMenuStore } from "_store/leftMenuStore";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { Fragment, useEffect, useState } from "react";
|
||||
import { cn } from "helpers/cn";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { asPublicUser } from "@repo/db";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getConnectedUserAPI } from "querys/connected-user";
|
||||
import { getConnectedUserAPI } from "_querys/connected-user";
|
||||
|
||||
export const Chat = () => {
|
||||
const {
|
||||
@@ -88,8 +88,7 @@ export const Chat = () => {
|
||||
|
||||
{[
|
||||
...(connectedUser?.filter(
|
||||
(user, idx, arr) =>
|
||||
arr.findIndex((u) => u.userId === user.userId) === idx,
|
||||
(user, idx, arr) => arr.findIndex((u) => u.userId === user.userId) === idx,
|
||||
) || []),
|
||||
].map((user) => (
|
||||
<option key={user.userId} value={user.userId}>
|
||||
@@ -100,9 +99,7 @@ export const Chat = () => {
|
||||
<button
|
||||
className="btn btn-sm btn-soft btn-primary join-item"
|
||||
onClick={() => {
|
||||
const user = connectedUser?.find(
|
||||
(user) => user.userId === addTabValue,
|
||||
);
|
||||
const user = connectedUser?.find((user) => user.userId === addTabValue);
|
||||
if (!user) return;
|
||||
addChat(addTabValue, asPublicUser(user.publicUser).fullName);
|
||||
setSelectedChat(addTabValue);
|
||||
@@ -135,28 +132,21 @@ export const Chat = () => {
|
||||
/>
|
||||
<div className="tab-content bg-base-100 border-base-300 p-6">
|
||||
{chat.messages.map((chatMessage) => {
|
||||
const isSender =
|
||||
chatMessage.senderId === session.data?.user.id;
|
||||
const isSender = chatMessage.senderId === session.data?.user.id;
|
||||
return (
|
||||
<div
|
||||
key={chatMessage.id}
|
||||
className={`chat ${isSender ? "chat-end" : "chat-start"}`}
|
||||
>
|
||||
<p className="chat-footer opacity-50">
|
||||
{new Date(
|
||||
chatMessage.timestamp,
|
||||
).toLocaleTimeString()}
|
||||
{new Date(chatMessage.timestamp).toLocaleTimeString()}
|
||||
</p>
|
||||
<div className="chat-bubble">
|
||||
{chatMessage.text}
|
||||
</div>
|
||||
<div className="chat-bubble">{chatMessage.text}</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
{!chat.messages.length && (
|
||||
<p className="text-xs opacity-50">
|
||||
Noch keine Nachrichten
|
||||
</p>
|
||||
<p className="text-xs opacity-50">Noch keine Nachrichten</p>
|
||||
)}
|
||||
</div>
|
||||
</Fragment>
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
import { ExclamationTriangleIcon, PaperPlaneIcon } from "@radix-ui/react-icons";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { cn } from "helpers/cn";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useLeftMenuStore } from "_store/leftMenuStore";
|
||||
import { asPublicUser } from "@repo/db";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getConnectedUserAPI } from "querys/connected-user";
|
||||
import { sendReportAPI } from "querys/report";
|
||||
import { getConnectedUserAPI } from "_querys/connected-user";
|
||||
import { sendReportAPI } from "_querys/report";
|
||||
|
||||
export const Report = () => {
|
||||
const { setChatOpen, setReportTabOpen, reportTabOpen, setOwnId } =
|
||||
useLeftMenuStore();
|
||||
const { setChatOpen, setReportTabOpen, reportTabOpen, setOwnId } = useLeftMenuStore();
|
||||
const [sending, setSending] = useState(false);
|
||||
const session = useSession();
|
||||
const [selectedPlayer, setSelectedPlayer] = useState<string>("default");
|
||||
@@ -34,12 +33,7 @@ export const Report = () => {
|
||||
});
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"dropdown dropdown-right",
|
||||
reportTabOpen && "dropdown-open",
|
||||
)}
|
||||
>
|
||||
<div className={cn("dropdown dropdown-right", reportTabOpen && "dropdown-open")}>
|
||||
<div className="indicator">
|
||||
<button
|
||||
className="btn btn-soft btn-sm btn-error"
|
||||
@@ -78,8 +72,7 @@ export const Report = () => {
|
||||
)}
|
||||
{[
|
||||
...(connectedUser?.filter(
|
||||
(user, idx, arr) =>
|
||||
arr.findIndex((u) => u.userId === user.userId) === idx,
|
||||
(user, idx, arr) => arr.findIndex((u) => u.userId === user.userId) === idx,
|
||||
) || []),
|
||||
].map((user) => (
|
||||
<option key={user.userId} value={user.userId}>
|
||||
|
||||
@@ -1,26 +1,10 @@
|
||||
import { Marker, useMap } from "react-leaflet";
|
||||
import { DivIcon, Marker as LMarker, Popup as LPopup } from "leaflet";
|
||||
import { useMapStore } from "_store/mapStore";
|
||||
import {
|
||||
Fragment,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
useMemo,
|
||||
} from "react";
|
||||
import { cn } from "helpers/cn";
|
||||
import {
|
||||
ChevronsRightLeft,
|
||||
House,
|
||||
MessageSquareText,
|
||||
Minimize2,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
SmartPopup,
|
||||
calculateAnchor,
|
||||
useSmartPopup,
|
||||
} from "_components/SmartPopup";
|
||||
import { Fragment, useCallback, useEffect, useRef, useState, useMemo } from "react";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { ChevronsRightLeft, House, MessageSquareText, Minimize2 } from "lucide-react";
|
||||
import { SmartPopup, calculateAnchor, useSmartPopup } from "_components/SmartPopup";
|
||||
import FMSStatusHistory, {
|
||||
FMSStatusSelector,
|
||||
MissionTab,
|
||||
@@ -29,9 +13,9 @@ import FMSStatusHistory, {
|
||||
} from "./_components/AircraftMarkerTabs";
|
||||
import { ConnectedAircraft, Station } from "@repo/db";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getConnectedAircraftsAPI } from "querys/aircrafts";
|
||||
import { getMissionsAPI } from "querys/missions";
|
||||
import { checkSimulatorConnected } from "helpers/simulatorConnected";
|
||||
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)",
|
||||
@@ -86,9 +70,7 @@ const AircraftPopupContent = ({
|
||||
aircraft: ConnectedAircraft & { Station: Station };
|
||||
}) => {
|
||||
const setAircraftTab = useMapStore((state) => state.setAircraftTab);
|
||||
const currentTab = useMapStore(
|
||||
(state) => state.aircraftTabs[aircraft.id] || "home",
|
||||
);
|
||||
const currentTab = useMapStore((state) => state.aircraftTabs[aircraft.id] || "home");
|
||||
|
||||
// Memoize the tab change handler to avoid unnecessary re-renders
|
||||
const handleTabChange = useCallback(
|
||||
@@ -126,9 +108,7 @@ const AircraftPopupContent = ({
|
||||
<MissionTab mission={mission} />
|
||||
) : (
|
||||
<div className="flex flex-col items-center justify-center min-h-full">
|
||||
<span className="text-gray-500 my-10 font-semibold">
|
||||
Kein aktiver Einsatz
|
||||
</span>
|
||||
<span className="text-gray-500 my-10 font-semibold">Kein aktiver Einsatz</span>
|
||||
</div>
|
||||
);
|
||||
case "chat":
|
||||
@@ -138,9 +118,7 @@ const AircraftPopupContent = ({
|
||||
}
|
||||
}, [currentTab, aircraft, mission]);
|
||||
|
||||
const setOpenAircraftMarker = useMapStore(
|
||||
(state) => state.setOpenAircraftMarker,
|
||||
);
|
||||
const setOpenAircraftMarker = useMapStore((state) => state.setOpenAircraftMarker);
|
||||
const { anchor } = useSmartPopup();
|
||||
return (
|
||||
<>
|
||||
@@ -278,19 +256,13 @@ const AircraftPopupContent = ({
|
||||
);
|
||||
};
|
||||
|
||||
const AircraftMarker = ({
|
||||
aircraft,
|
||||
}: {
|
||||
aircraft: ConnectedAircraft & { Station: Station };
|
||||
}) => {
|
||||
const AircraftMarker = ({ aircraft }: { aircraft: ConnectedAircraft & { Station: Station } }) => {
|
||||
const [hideMarker, setHideMarker] = useState(false);
|
||||
const map = useMap();
|
||||
const markerRef = useRef<LMarker>(null);
|
||||
const popupRef = useRef<LPopup>(null);
|
||||
|
||||
const { openAircraftMarker, setOpenAircraftMarker } = useMapStore(
|
||||
(store) => store,
|
||||
);
|
||||
const { openAircraftMarker, setOpenAircraftMarker } = useMapStore((store) => store);
|
||||
|
||||
useEffect(() => {
|
||||
const handleClick = () => {
|
||||
@@ -319,9 +291,9 @@ const AircraftMarker = ({
|
||||
};
|
||||
}, [aircraft.id, openAircraftMarker, setOpenAircraftMarker]);
|
||||
|
||||
const [anchor, setAnchor] = useState<
|
||||
"topleft" | "topright" | "bottomleft" | "bottomright"
|
||||
>("topleft");
|
||||
const [anchor, setAnchor] = useState<"topleft" | "topright" | "bottomleft" | "bottomright">(
|
||||
"topleft",
|
||||
);
|
||||
|
||||
const handleConflict = useCallback(() => {
|
||||
const newAnchor = calculateAnchor(`aircraft-${aircraft.id}`, "marker");
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||
import { useMapStore } from "_store/mapStore";
|
||||
import { usePannelStore } from "_store/pannelStore";
|
||||
import { MapPin, MapPinned, Radius, Ruler, Search, RulerDimensionLine, Scan } from "lucide-react";
|
||||
import { getOsmAddress } from "querys/osm";
|
||||
import { getOsmAddress } from "_querys/osm";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { Popup, useMap } from "react-leaflet";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { DivIcon, Marker as LMarker, Popup as LPopup } from "leaflet";
|
||||
import { useMapStore } from "_store/mapStore";
|
||||
import { usePannelStore } from "_store/pannelStore";
|
||||
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { cn } from "helpers/cn";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { ClipboardList, Cross, House, Minimize2, SmartphoneNfc, PencilLine } from "lucide-react";
|
||||
import { calculateAnchor, SmartPopup, useSmartPopup } from "_components/SmartPopup";
|
||||
import { Mission, MissionState } from "@repo/db";
|
||||
@@ -13,10 +13,10 @@ import Einsatzdetails, {
|
||||
Rettungsmittel,
|
||||
} from "./_components/MissionMarkerTabs";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getMissionsAPI } from "querys/missions";
|
||||
import { getMissionsAPI } from "_querys/missions";
|
||||
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||
import { HPGValidationRequired } from "helpers/hpgValidationRequired";
|
||||
import { getConnectedAircraftsAPI } from "querys/aircrafts";
|
||||
import { HPGValidationRequired } from "_helpers/hpgValidationRequired";
|
||||
import { getConnectedAircraftsAPI } from "_querys/aircrafts";
|
||||
|
||||
export const MISSION_STATUS_COLORS: Record<MissionState | "attention", string> = {
|
||||
draft: "#0092b8",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Fragment, useEffect, useRef } from "react";
|
||||
import { Marker, Polygon, Popup } from "react-leaflet";
|
||||
import L from "leaflet";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getMissionsAPI } from "querys/missions";
|
||||
import { getMissionsAPI } from "_querys/missions";
|
||||
import { OSMWay } from "@repo/db";
|
||||
import { usePannelStore } from "_store/pannelStore";
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ import {
|
||||
} from "@repo/db";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { editConnectedAircraftAPI } from "querys/aircrafts";
|
||||
import { editConnectedAircraftAPI } from "_querys/aircrafts";
|
||||
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||
import { cn } from "helpers/cn";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { PersonIcon } from "@radix-ui/react-icons";
|
||||
import {
|
||||
Ban,
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
TextSearch,
|
||||
} from "lucide-react";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { editMissionAPI, sendSdsMessageAPI } from "querys/missions";
|
||||
import { editMissionAPI, sendSdsMessageAPI } from "_querys/missions";
|
||||
|
||||
const FMSStatusHistory = ({
|
||||
aircraft,
|
||||
@@ -48,25 +48,18 @@ const FMSStatusHistory = ({
|
||||
}) => {
|
||||
console.log("FMSStatusHistory", mission?.missionLog);
|
||||
const log = ((mission?.missionLog as unknown as MissionLog[]) || [])
|
||||
.filter(
|
||||
(entry) =>
|
||||
entry.type === "station-log" &&
|
||||
entry.data.stationId === aircraft.Station.id,
|
||||
)
|
||||
.filter((entry) => entry.type === "station-log" && entry.data.stationId === aircraft.Station.id)
|
||||
.reverse()
|
||||
.splice(0, 6) as MissionStationLog[];
|
||||
|
||||
const aircraftUser =
|
||||
typeof aircraft.publicUser === "string"
|
||||
? JSON.parse(aircraft.publicUser)
|
||||
: aircraft.publicUser;
|
||||
typeof aircraft.publicUser === "string" ? JSON.parse(aircraft.publicUser) : aircraft.publicUser;
|
||||
|
||||
return (
|
||||
<div className="p-4">
|
||||
<ul className="text-base-content font-semibold">
|
||||
<li className="flex items-center gap-2 mb-1">
|
||||
<PersonIcon className="w-5 h-5" /> {aircraftUser.fullName} (
|
||||
{aircraftUser.publicId})
|
||||
<PersonIcon className="w-5 h-5" /> {aircraftUser.fullName} ({aircraftUser.publicId})
|
||||
</li>
|
||||
</ul>
|
||||
<div className="divider mt-0 mb-0" />
|
||||
@@ -99,8 +92,7 @@ const FMSStatusSelector = ({
|
||||
}: {
|
||||
aircraft: ConnectedAircraft & { Station: Station };
|
||||
}) => {
|
||||
const dispatcherConnected =
|
||||
useDispatchConnectionStore((s) => s.status) === "connected";
|
||||
const dispatcherConnected = useDispatchConnectionStore((s) => s.status) === "connected";
|
||||
const [hoveredStatus, setHoveredStatus] = useState<string | null>(null);
|
||||
const queryClient = useQueryClient();
|
||||
const changeAircraftMutation = useMutation({
|
||||
@@ -299,13 +291,7 @@ const SDSTab = ({
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const sendSdsMutation = useMutation({
|
||||
mutationFn: async ({
|
||||
id,
|
||||
message,
|
||||
}: {
|
||||
id: number;
|
||||
message: MissionSdsLog;
|
||||
}) => {
|
||||
mutationFn: async ({ id, message }: { id: number; message: MissionSdsLog }) => {
|
||||
await sendSdsMessageAPI(id, message);
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["missions"],
|
||||
@@ -318,9 +304,7 @@ const SDSTab = ({
|
||||
?.slice()
|
||||
.reverse()
|
||||
.filter(
|
||||
(entry) =>
|
||||
entry.type === "sds-log" &&
|
||||
entry.data.stationId === aircraft.Station.id,
|
||||
(entry) => entry.type === "sds-log" && entry.data.stationId === aircraft.Station.id,
|
||||
) || [];
|
||||
|
||||
return (
|
||||
|
||||
@@ -5,13 +5,13 @@ import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||
import { useMapStore } from "_store/mapStore";
|
||||
import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_components/map/AircraftMarker";
|
||||
import { MISSION_STATUS_COLORS, MISSION_STATUS_TEXT_COLORS } from "_components/map/MissionMarkers";
|
||||
import { cn } from "helpers/cn";
|
||||
import { checkSimulatorConnected } from "helpers/simulatorConnected";
|
||||
import { getConnectedAircraftsAPI } from "querys/aircrafts";
|
||||
import { getMissionsAPI } from "querys/missions";
|
||||
import { cn } from "_helpers/cn";
|
||||
import { checkSimulatorConnected } from "_helpers/simulatorConnected";
|
||||
import { getConnectedAircraftsAPI } from "_querys/aircrafts";
|
||||
import { getMissionsAPI } from "_querys/missions";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { useMap } from "react-leaflet";
|
||||
import { HPGValidationRequired } from "helpers/hpgValidationRequired";
|
||||
import { HPGValidationRequired } from "_helpers/hpgValidationRequired";
|
||||
|
||||
const PopupContent = ({
|
||||
aircrafts,
|
||||
|
||||
@@ -32,13 +32,13 @@ import {
|
||||
import { usePannelStore } from "_store/pannelStore";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { deleteMissionAPI, editMissionAPI, sendMissionAPI } from "querys/missions";
|
||||
import { getConnectedAircraftsAPI } from "querys/aircrafts";
|
||||
import { getStationsAPI } from "querys/stations";
|
||||
import { deleteMissionAPI, editMissionAPI, sendMissionAPI } from "_querys/missions";
|
||||
import { getConnectedAircraftsAPI } from "_querys/aircrafts";
|
||||
import { getStationsAPI } from "_querys/stations";
|
||||
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||
import { HPGValidationRequired } from "helpers/hpgValidationRequired";
|
||||
import { getOsmAddress } from "querys/osm";
|
||||
import { hpgStateToFMSStatus } from "helpers/hpgStateToFmsStatus";
|
||||
import { HPGValidationRequired } from "_helpers/hpgValidationRequired";
|
||||
import { getOsmAddress } from "_querys/osm";
|
||||
import { hpgStateToFMSStatus } from "_helpers/hpgStateToFmsStatus";
|
||||
|
||||
const Einsatzdetails = ({
|
||||
mission,
|
||||
|
||||
Reference in New Issue
Block a user