Fix AircraftMarker SDS Form avail for Everyone
This commit is contained in:
@@ -290,6 +290,8 @@ const SDSTab = ({
|
|||||||
const [note, setNote] = useState("");
|
const [note, setNote] = useState("");
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
|
const dispatcherConnected = useDispatchConnectionStore((s) => s.status) === "connected";
|
||||||
|
|
||||||
const sendSdsMutation = useMutation({
|
const sendSdsMutation = useMutation({
|
||||||
mutationFn: async ({ id, message }: { id: number; message: MissionSdsLog }) => {
|
mutationFn: async ({ id, message }: { id: number; message: MissionSdsLog }) => {
|
||||||
await sendSdsMessageAPI(id, message);
|
await sendSdsMessageAPI(id, message);
|
||||||
@@ -309,6 +311,8 @@ const SDSTab = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
|
{dispatcherConnected && (
|
||||||
|
<div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
{!isChatOpen ? (
|
{!isChatOpen ? (
|
||||||
<button
|
<button
|
||||||
@@ -368,6 +372,8 @@ const SDSTab = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="divider m-0" />
|
<div className="divider m-0" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<ul className="space-y-2 max-h-[300px] overflow-y-auto overflow-x-auto">
|
<ul className="space-y-2 max-h-[300px] overflow-y-auto overflow-x-auto">
|
||||||
{log.map((entry, index) => {
|
{log.map((entry, index) => {
|
||||||
const sdsEntry = entry as MissionSdsLog;
|
const sdsEntry = entry as MissionSdsLog;
|
||||||
|
|||||||
Reference in New Issue
Block a user