removed console.log
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -27,7 +27,6 @@ export default async function RootLayout({
|
||||
});
|
||||
|
||||
if (!session) {
|
||||
console.log(session);
|
||||
return redirect("/logout");
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -530,7 +530,6 @@ const Rettungsmittel = ({ mission }: { mission: Mission }) => {
|
||||
className="min-w-[320px] flex-1"
|
||||
isMulti={false}
|
||||
onChange={(v) => {
|
||||
console.log("Selected station:", v);
|
||||
setSelectedStation({
|
||||
selectedStationId: v?.selectedStationIds[0],
|
||||
hpgAmbulanceState: mission.hpgAmbulanceState || HpgState.NOT_REQUESTED,
|
||||
|
||||
@@ -91,16 +91,16 @@ export const SettingsBtn = () => {
|
||||
modalRef.current?.showModal();
|
||||
}}
|
||||
>
|
||||
<GearIcon className="w-5 h-5" />
|
||||
<GearIcon className="h-5 w-5" />
|
||||
</button>
|
||||
|
||||
<dialog ref={modalRef} className="modal">
|
||||
<div className="modal-box">
|
||||
<h3 className="flex items-center gap-2 text-lg font-bold mb-5">
|
||||
<h3 className="mb-5 flex items-center gap-2 text-lg font-bold">
|
||||
<SettingsIcon size={20} /> Einstellungen
|
||||
</h3>
|
||||
<div className="flex flex-col items-center justify-center">
|
||||
<fieldset className="fieldset w-full mb-2">
|
||||
<fieldset className="fieldset mb-2 w-full">
|
||||
<label className="floating-label w-full text-base">
|
||||
<span>Eingabegerät</span>
|
||||
<select
|
||||
@@ -122,7 +122,7 @@ export const SettingsBtn = () => {
|
||||
</select>
|
||||
</label>
|
||||
</fieldset>
|
||||
<p className="flex items-center gap-2 text-base mb-2 justify-start w-full">
|
||||
<p className="mb-2 flex w-full items-center justify-start gap-2 text-base">
|
||||
<Volume2 size={20} /> Eingabelautstärke
|
||||
</p>
|
||||
<div className="w-full">
|
||||
@@ -139,7 +139,7 @@ export const SettingsBtn = () => {
|
||||
value={settings.micVolume}
|
||||
className="range range-xs range-accent w-full"
|
||||
/>
|
||||
<div className="flex justify-between px-2.5 mt-2 text-xs">
|
||||
<div className="mt-2 flex justify-between px-2.5 text-xs">
|
||||
<span>0%</span>
|
||||
<span>25%</span>
|
||||
<span>50%</span>
|
||||
@@ -155,24 +155,23 @@ export const SettingsBtn = () => {
|
||||
)}
|
||||
<div className="divider w-full" />
|
||||
</div>
|
||||
<p className="flex items-center gap-2 text-base mb-2">
|
||||
<p className="mb-2 flex items-center gap-2 text-base">
|
||||
<Volume2 size={20} /> Funk Lautstärke
|
||||
</p>
|
||||
<div className="w-full mb-2">
|
||||
<div className="mb-2 w-full">
|
||||
<input
|
||||
type="range"
|
||||
min={0}
|
||||
max={1}
|
||||
step={0.01}
|
||||
onChange={(e) => {
|
||||
console.log("Radio Volume", e.target.value);
|
||||
const value = parseFloat(e.target.value);
|
||||
setSettingsPartial({ radioVolume: value });
|
||||
}}
|
||||
value={settings.radioVolume}
|
||||
className="range range-xs range-primary w-full"
|
||||
/>
|
||||
<div className="flex justify-between px-2.5 mt-2 text-xs">
|
||||
<div className="mt-2 flex justify-between px-2.5 text-xs">
|
||||
<span>0%</span>
|
||||
<span>25%</span>
|
||||
<span>50%</span>
|
||||
@@ -181,7 +180,7 @@ export const SettingsBtn = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p className="flex items-center gap-2 text-base mb-2">
|
||||
<p className="mb-2 flex items-center gap-2 text-base">
|
||||
<Volume2 size={20} /> Melder Lautstärke
|
||||
</p>
|
||||
<div className="w-full">
|
||||
@@ -200,7 +199,7 @@ export const SettingsBtn = () => {
|
||||
value={settings.dmeVolume}
|
||||
className="range range-xs range-primary w-full"
|
||||
/>
|
||||
<div className="flex justify-between px-2.5 mt-2 text-xs">
|
||||
<div className="mt-2 flex justify-between px-2.5 text-xs">
|
||||
<span>0%</span>
|
||||
<span>25%</span>
|
||||
<span>50%</span>
|
||||
@@ -208,12 +207,12 @@ export const SettingsBtn = () => {
|
||||
<span>100%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-center w-full">
|
||||
<div className="flex w-full justify-center">
|
||||
<div className="divider w-full" />
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<label className="floating-label w-full">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<Bell /> NTFY room
|
||||
</span>
|
||||
<input
|
||||
@@ -237,7 +236,7 @@ export const SettingsBtn = () => {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-between modal-action">
|
||||
<div className="modal-action flex justify-between">
|
||||
<button
|
||||
className="btn btn-soft"
|
||||
type="submit"
|
||||
|
||||
@@ -171,12 +171,6 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
||||
deviceId: get().settings.micDeviceId ?? undefined,
|
||||
},
|
||||
});
|
||||
console.log(
|
||||
"Connected to room",
|
||||
roomName,
|
||||
get().settings.micDeviceId,
|
||||
get().settings.micVolume,
|
||||
);
|
||||
// Funk-Effekt anwenden
|
||||
const radioStream = getRadioStream(inputStream, get().settings.micVolume);
|
||||
if (!radioStream) throw new Error("Konnte Funkstream nicht erzeugen");
|
||||
|
||||
@@ -116,14 +116,12 @@ dispatchSocket.on(
|
||||
"chat-message",
|
||||
({ userId, message }: { userId: string; message: ChatMessage }) => {
|
||||
const store = useLeftMenuStore.getState();
|
||||
console.log("chat-message", userId, message);
|
||||
// Update the chat store with the new message
|
||||
store.addMessage(userId, message);
|
||||
},
|
||||
);
|
||||
pilotSocket.on("chat-message", ({ userId, message }: { userId: string; message: ChatMessage }) => {
|
||||
const store = useLeftMenuStore.getState();
|
||||
console.log("chat-message", userId, message);
|
||||
// Update the chat store with the new message
|
||||
store.addMessage(userId, message);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user