removed console.log

This commit is contained in:
PxlLoewe
2025-07-19 16:05:01 -07:00
parent 68e26b18b2
commit 9eaf3a06ed
18 changed files with 37 additions and 80 deletions

View File

@@ -107,7 +107,6 @@ export function StationsSelect({
menuPlacement={menuPlacement}
isMulti={isMulti}
onChange={(v) => {
console.log("Selected values:", v);
setValue(v);
if (!isMulti) {
const singleValue = v as string;

View File

@@ -195,7 +195,7 @@ export const MissionForm = () => {
<form className="space-y-4">
{/* Koorinaten Section */}
<div className="form-control">
<h2 className="text-lg font-bold mb-2">Koordinaten</h2>
<h2 className="mb-2 text-lg font-bold">Koordinaten</h2>
<div className="grid grid-cols-2 gap-4">
<input
type="text"
@@ -219,12 +219,12 @@ export const MissionForm = () => {
{/* Adresse Section */}
<div className="form-control">
<h2 className="text-lg font-bold mb-2">Adresse</h2>
<h2 className="mb-2 text-lg font-bold">Adresse</h2>
<input
type="text"
{...form.register("addressStreet")}
placeholder="Straße"
className="input input-primary input-bordered w-full mb-4"
className="input input-primary input-bordered mb-4 w-full"
/>
<div className="grid grid-cols-2 gap-4">
<input
@@ -244,17 +244,16 @@ export const MissionForm = () => {
type="text"
{...form.register("addressAdditionalInfo")}
placeholder="Zusätzliche Adressinformationen"
className="input input-primary input-bordered w-full mt-4"
className="input input-primary input-bordered mt-4 w-full"
/>
</div>
{/* Rettungsmittel Section */}
<div className="form-control">
<h2 className="text-lg font-bold mb-2">Rettungsmittel</h2>
<h2 className="mb-2 text-lg font-bold">Rettungsmittel</h2>
<StationsSelect
isMulti
selectedStations={form.watch("missionStationIds")}
onChange={(v) => {
console.log("Selected stations:", v);
form.setValue("missionStationIds", v.selectedStationIds);
form.setValue("hpgAmbulanceState", v.hpgAmbulanceState);
form.setValue("hpgFireEngineState", v.hpgFireEngineState);
@@ -270,10 +269,10 @@ export const MissionForm = () => {
{/* Einsatzdaten Section */}
<div className="form-control">
<h2 className="text-lg font-bold mb-2">Einsatzdaten</h2>
<h2 className="mb-2 text-lg font-bold">Einsatzdaten</h2>
<select
{...form.register("type")}
className="select select-primary select-bordered w-full mb-4"
className="select select-primary select-bordered mb-4 w-full"
onChange={(e) => {
form.setValue("type", e.target.value as missionType);
if (e.target.value === "primary") {
@@ -295,7 +294,7 @@ export const MissionForm = () => {
<>
<select
{...form.register("missionKeywordCategory")}
className="select select-primary select-bordered w-full mb-4"
className="select select-primary select-bordered mb-4 w-full"
onChange={(e) => {
form.setValue("missionKeywordCategory", e.target.value as string);
form.setValue("missionKeywordName", null as any);
@@ -316,13 +315,13 @@ export const MissionForm = () => {
))}
</select>
{form.formState.errors.missionKeywordCategory && (
<p className="text-error text-sm mb-4">Bitte wähle eine Kategorie aus.</p>
<p className="text-error mb-4 text-sm">Bitte wähle eine Kategorie aus.</p>
)}
</>
)}
<select
{...form.register("missionKeywordAbbreviation")}
className="select select-primary select-bordered w-full mb-4"
className="select select-primary select-bordered mb-4 w-full"
onChange={(e) => {
const keyword = keywords?.find((k) => k.abreviation === e.target.value);
form.setValue("missionKeywordName", keyword?.name || (null as any));
@@ -344,7 +343,7 @@ export const MissionForm = () => {
))}
</select>
{form.formState.errors.missionKeywordAbbreviation && (
<p className="text-error text-sm mb-4">Bitte wähle ein Stichwort aus.</p>
<p className="text-error mb-4 text-sm">Bitte wähle ein Stichwort aus.</p>
)}
<div className="mb-4">
<select
@@ -364,7 +363,7 @@ export const MissionForm = () => {
form.setValue("missionAdditionalInfo", name || "");
}
}}
className="select select-primary select-bordered w-full mb-2"
className="select select-primary select-bordered mb-2 w-full"
value={form.watch("hpgMissionString") || "please_select"}
>
<option disabled value="please_select">
@@ -383,14 +382,14 @@ export const MissionForm = () => {
})}
</select>
{validationRequired && (
<p className="text-sm text-warning">Szenario wird vor Alarmierung HPG-Validiert.</p>
<p className="text-warning text-sm">Szenario wird vor Alarmierung HPG-Validiert.</p>
)}
</div>
<textarea
{...form.register("missionAdditionalInfo")}
placeholder="Einsatzinformationen"
className="textarea textarea-primary textarea-bordered w-full mb-4"
className="textarea textarea-primary textarea-bordered mb-4 w-full"
/>
{form.watch("type") === "sekundär" && (
<input
@@ -402,7 +401,7 @@ export const MissionForm = () => {
)}
</div>
<div className="form-control">
<h2 className="text-lg font-bold mb-2">Patienteninformationen</h2>
<h2 className="mb-2 text-lg font-bold">Patienteninformationen</h2>
<textarea
{...form.register("missionPatientInfo")}
placeholder="Patienteninformationen"

View File

@@ -27,7 +27,6 @@ export default async function RootLayout({
});
if (!session) {
console.log(session);
return redirect("/logout");
}

View File

@@ -31,7 +31,6 @@ export const useSounds = () => {
const timeouts: NodeJS.Timeout[] = [];
if (page === "new-mission" && newMissionSound.current) {
console.log("new-mission", mission);
newMissionSound.current.currentTime = 0;
newMissionSound.current.play();
if (mission) {

View File

@@ -183,7 +183,6 @@ export const ConnectionBtn = () => {
const [logoffHours, logoffMinutes] =
form.logoffTime?.split(":").map(Number) || [];
console.log(logoffHours, logoffMinutes, form.logoffTime);
await aircraftMutation.mutateAsync({
sessionId: connection.connectedAircraft.id,
change: {