Simulator nicht verbunden warnung
This commit is contained in:
@@ -7,6 +7,7 @@ import { getStationsAPI } from "_querys/stations";
|
||||
import toast from "react-hot-toast";
|
||||
import { editConnectedAircraftAPI } from "_querys/aircrafts";
|
||||
import { Prisma } from "@repo/db";
|
||||
import { debug } from "console";
|
||||
|
||||
export const ConnectionBtn = () => {
|
||||
const modalRef = useRef<HTMLDialogElement>(null);
|
||||
@@ -14,9 +15,11 @@ export const ConnectionBtn = () => {
|
||||
const [form, setForm] = useState<{
|
||||
logoffTime: string | null;
|
||||
selectedStationId: number | null;
|
||||
debugPosition: boolean;
|
||||
}>({
|
||||
logoffTime: null,
|
||||
selectedStationId: null,
|
||||
debugPosition: false,
|
||||
});
|
||||
const [logoffDebounce, setLogoffDebounce] = useState<NodeJS.Timeout | null>(null);
|
||||
|
||||
@@ -165,6 +168,21 @@ export const ConnectionBtn = () => {
|
||||
<p className="fieldset-label">Du kannst diese Zeit später noch anpassen.</p>
|
||||
)}
|
||||
</fieldset>
|
||||
|
||||
{session.data?.user.permissions.includes("ADMIN_STATION") && (
|
||||
<fieldset className="fieldset bg-base-100 border-base-300 rounded-box w-full border p-4">
|
||||
<legend className="fieldset-legend">Debug-optionen</legend>
|
||||
<label className="label">
|
||||
<input
|
||||
checked={form.debugPosition}
|
||||
onChange={(e) => setForm({ ...form, debugPosition: e.target.checked })}
|
||||
type="checkbox"
|
||||
className="checkbox"
|
||||
/>
|
||||
Zufalls Position für 2h anzeigen
|
||||
</label>
|
||||
</fieldset>
|
||||
)}
|
||||
<div className="modal-action flex justify-between w-full">
|
||||
<form method="dialog" className="w-full flex justify-between">
|
||||
<button className="btn btn-soft">Zurück</button>
|
||||
@@ -195,6 +213,7 @@ export const ConnectionBtn = () => {
|
||||
form.logoffTime || "",
|
||||
selectedStation,
|
||||
session.data!.user,
|
||||
form.debugPosition,
|
||||
);
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user