.
This commit is contained in:
@@ -138,7 +138,6 @@ const FMSStatusSelector = ({
|
||||
onMouseEnter={() => setHoveredStatus(status)}
|
||||
onMouseLeave={() => setHoveredStatus(null)}
|
||||
onClick={async () => {
|
||||
// Handle status change logic here
|
||||
await changeAircraftMutation.mutateAsync({
|
||||
id: aircraft.id,
|
||||
update: {
|
||||
@@ -153,10 +152,10 @@ const FMSStatusSelector = ({
|
||||
))}
|
||||
</div>
|
||||
<div className="flex gap-1 p-2 justify-center items-center">
|
||||
{["E", "C", "F", "J", "L", "c", "d", "h", "o", "u"].map((char) => (
|
||||
{["E", "C", "F", "J", "L", "c", "d", "h", "o", "u"].map((status) => (
|
||||
<button
|
||||
disabled={!dispatcherConnected}
|
||||
key={char}
|
||||
key={status}
|
||||
className={cn(
|
||||
"flex justify-center items-center min-w-10 min-h-10 cursor-pointer text-lg font-bold",
|
||||
!dispatcherConnected && "cursor-not-allowed",
|
||||
@@ -165,11 +164,17 @@ const FMSStatusSelector = ({
|
||||
backgroundColor: "var(--color-base-200)",
|
||||
color: "gray",
|
||||
}}
|
||||
onClick={() => {
|
||||
toast.success(`Button ${char} clicked`);
|
||||
onClick={async () => {
|
||||
await changeAircraftMutation.mutateAsync({
|
||||
id: aircraft.id,
|
||||
update: {
|
||||
fmsStatus: status,
|
||||
},
|
||||
});
|
||||
toast.success(`Status changed to ${status}`);
|
||||
}}
|
||||
>
|
||||
{char}
|
||||
{status}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user