fixed #92
This commit is contained in:
@@ -9,6 +9,7 @@ import { getConnectedAircraftsAPI } from "_querys/aircrafts";
|
|||||||
import { FMS_STATUS_COLORS, FMS_STATUS_TEXT_COLORS } from "_helpers/fmsStatusColors";
|
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";
|
||||||
|
import { findLeitstelleForPosition } from "_helpers/findLeitstelleinPoint";
|
||||||
|
|
||||||
export const SituationBoard = () => {
|
export const SituationBoard = () => {
|
||||||
const { setSituationTabOpen, situationTabOpen } = useLeftMenuStore();
|
const { setSituationTabOpen, situationTabOpen } = useLeftMenuStore();
|
||||||
@@ -64,17 +65,17 @@ export const SituationBoard = () => {
|
|||||||
setSituationTabOpen(!situationTabOpen);
|
setSituationTabOpen(!situationTabOpen);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ListCollapse className="w-4 h-4" />
|
<ListCollapse className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{situationTabOpen && (
|
{situationTabOpen && (
|
||||||
<div
|
<div
|
||||||
tabIndex={0}
|
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="card-body flex flex-row gap-4">
|
||||||
<div className="flex-1">
|
<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{" "}
|
<ListCollapse /> Einsatzliste{" "}
|
||||||
</h2>
|
</h2>
|
||||||
<div>
|
<div>
|
||||||
@@ -90,8 +91,8 @@ export const SituationBoard = () => {
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="overflow-x-auto overflow-y-auto max-h-[170px] select-none">
|
<div className="max-h-[170px] select-none overflow-x-auto overflow-y-auto">
|
||||||
<table className="table table-xs">
|
<table className="table-xs table">
|
||||||
{/* head */}
|
{/* head */}
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -145,13 +146,13 @@ export const SituationBoard = () => {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-px bg-gray-400 mx-2" />
|
<div className="mx-2 w-px bg-gray-400" />
|
||||||
<div className="flex-1">
|
<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
|
<Plane /> Stationen
|
||||||
</h2>
|
</h2>
|
||||||
<div className="overflow-x-auto overflow-y-auto max-h-[200px] select-none">
|
<div className="max-h-[200px] select-none overflow-x-auto overflow-y-auto">
|
||||||
<table className="table table-xs">
|
<table className="table-xs table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>BOS Name</th>
|
<th>BOS Name</th>
|
||||||
@@ -186,7 +187,7 @@ export const SituationBoard = () => {
|
|||||||
>
|
>
|
||||||
<td>{station.Station.bosCallsignShort}</td>
|
<td>{station.Station.bosCallsignShort}</td>
|
||||||
<td
|
<td
|
||||||
className="text-center font-lg font-semibold"
|
className="font-lg text-center font-semibold"
|
||||||
style={{
|
style={{
|
||||||
color: FMS_STATUS_TEXT_COLORS[station.fmsStatus],
|
color: FMS_STATUS_TEXT_COLORS[station.fmsStatus],
|
||||||
backgroundColor: FMS_STATUS_COLORS[station.fmsStatus],
|
backgroundColor: FMS_STATUS_COLORS[station.fmsStatus],
|
||||||
@@ -194,7 +195,13 @@ export const SituationBoard = () => {
|
|||||||
>
|
>
|
||||||
{station.fmsStatus}
|
{station.fmsStatus}
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user