added Mission Closed Toeast, enhanced logic

This commit is contained in:
PxlLoewe
2025-07-14 23:57:33 -07:00
parent d7ca0eb166
commit 7be21a738a
7 changed files with 209 additions and 18 deletions

View File

@@ -735,10 +735,15 @@ const FMSStatusHistory = ({ mission }: { mission: Mission }) => {
<span className="text-base-content">{entry.data.message}</span>
</li>
);
if (entry.type === "alert-log") {
const alertReceiver = entry.auto
? null
: entry.data.station?.bosCallsignShort || entry.data.vehicle;
if (
entry.type === "alert-log" ||
entry.type === "completed-log" ||
entry.type === "reopened-log"
) {
const alertReceiver =
entry.auto || entry.type !== "alert-log"
? null
: entry.data.station?.bosCallsignShort || entry.data.vehicle;
return (
<li key={index} className="flex items-center gap-2">
<span className="text-base-content">
@@ -755,8 +760,8 @@ const FMSStatusHistory = ({ mission }: { mission: Mission }) => {
>
{!entry.auto && (
<>
{entry.data.user.firstname?.[0]?.toUpperCase() ?? "?"}
{entry.data.user.lastname?.[0]?.toUpperCase() ?? "?"}
{entry.data.user?.firstname?.[0]?.toUpperCase() ?? "?"}
{entry.data.user?.lastname?.[0]?.toUpperCase() ?? "?"}
</>
)}
{entry.auto && "AUTO"}
@@ -781,7 +786,15 @@ const FMSStatusHistory = ({ mission }: { mission: Mission }) => {
</>
)}
</span>
<span className="text-base-content">Einsatz alarmiert</span>
{entry.type === "alert-log" && (
<span className="text-base-content">Einsatz alarmiert</span>
)}
{entry.type === "completed-log" && (
<span className="text-base-content">Einsatz abgeschlossen</span>
)}
{entry.type === "reopened-log" && (
<span className="text-base-content">Einsatz wiedereröffnet</span>
)}
</li>
);
}