This commit is contained in:
PxlLoewe
2025-07-23 18:48:49 -07:00
parent 445dc13829
commit 115296d7f7

View File

@@ -9,6 +9,7 @@ import { getConnectedAircraftsAPI } from "_querys/aircrafts";
import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors";
import { useMapStore } from "_store/mapStore";
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
import { findLeitstelleForPosition } from "_helpers/findLeitstelleinPoint";
export const SituationBoard = () => {
const { setSituationTabOpen, situationTabOpen } = useLeftMenuStore();
@@ -64,17 +65,17 @@ export const SituationBoard = () => {
setSituationTabOpen(!situationTabOpen);
}}
>
<ListCollapse className="w-4 h-4" />
<ListCollapse className="h-4 w-4" />
</button>
</div>
{situationTabOpen && (
<div
tabIndex={0}
className="dropdown-content card bg-base-200 shadow-md z-[1100] ml-2 border-1 border-info min-w-[900px] max-h-[300px]"
className="dropdown-content card bg-base-200 border-1 border-info z-[1100] ml-2 max-h-[300px] min-w-[900px] shadow-md"
>
<div className="card-body flex flex-row gap-4">
<div className="flex-1">
<h2 className="inline-flex items-center gap-2 text-lg font-bold mb-2">
<h2 className="mb-2 inline-flex items-center gap-2 text-lg font-bold">
<ListCollapse /> Einsatzliste{" "}
</h2>
<div>
@@ -90,8 +91,8 @@ export const SituationBoard = () => {
</label>
</div>
</div>
<div className="overflow-x-auto overflow-y-auto max-h-[170px] select-none">
<table className="table table-xs">
<div className="max-h-[170px] select-none overflow-x-auto overflow-y-auto">
<table className="table-xs table">
{/* head */}
<thead>
<tr>
@@ -145,13 +146,13 @@ export const SituationBoard = () => {
</table>
</div>
</div>
<div className="w-px bg-gray-400 mx-2" />
<div className="mx-2 w-px bg-gray-400" />
<div className="flex-1">
<h2 className="inline-flex items-center gap-2 text-lg font-bold mb-2">
<h2 className="mb-2 inline-flex items-center gap-2 text-lg font-bold">
<Plane /> Stationen
</h2>
<div className="overflow-x-auto overflow-y-auto max-h-[200px] select-none">
<table className="table table-xs">
<div className="max-h-[200px] select-none overflow-x-auto overflow-y-auto">
<table className="table-xs table">
<thead>
<tr>
<th>BOS Name</th>
@@ -186,7 +187,7 @@ export const SituationBoard = () => {
>
<td>{station.Station.bosCallsignShort}</td>
<td
className="text-center font-lg font-semibold"
className="font-lg text-center font-semibold"
style={{
color: FMS_STATUS_TEXT_COLORS[station.fmsStatus],
backgroundColor: FMS_STATUS_COLORS[station.fmsStatus],
@@ -194,7 +195,13 @@ export const SituationBoard = () => {
>
{station.fmsStatus}
</td>
<td className="whitespace-nowrap">{station.Station.bosRadioArea}</td>
<td className="whitespace-nowrap">
{station.posLng || !station.posLat ? (
<>{findLeitstelleForPosition(station.posLng!, station.posLat!)}</>
) : (
station.Station.bosRadioArea
)}
</td>
</tr>
))}
</tbody>