removed console.log
This commit is contained in:
@@ -19,7 +19,6 @@ router.post("/set-standard-name", async (req, res) => {
|
|||||||
id: userId,
|
id: userId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(`Setting standard name for user ${userId} (${user?.publicId}) to member ${memberId}`);
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
res.status(404).json({ error: "User not found" });
|
res.status(404).json({ error: "User not found" });
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -261,9 +261,7 @@ router.post("/:id/hpg-validation-result", async (req, res) => {
|
|||||||
},
|
},
|
||||||
} as NotificationPayload);
|
} as NotificationPayload);
|
||||||
|
|
||||||
console.log("Got positiv validation Result", result.alertWhenValid);
|
|
||||||
if (result.alertWhenValid) {
|
if (result.alertWhenValid) {
|
||||||
console.log(req.user);
|
|
||||||
sendAlert(Number(missionId), {}, "HPG");
|
sendAlert(Number(missionId), {}, "HPG");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ export const handleSendMessage =
|
|||||||
{ userId, message }: { userId: string; message: string },
|
{ userId, message }: { userId: string; message: string },
|
||||||
cb: (err: { error?: string }) => void,
|
cb: (err: { error?: string }) => void,
|
||||||
) => {
|
) => {
|
||||||
console.log("send-message", userId, message);
|
|
||||||
const senderId = socket.data.user.id;
|
const senderId = socket.data.user.id;
|
||||||
|
|
||||||
const senderUser = await prisma.user.findUnique({
|
const senderUser = await prisma.user.findUnique({
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ export function StationsSelect({
|
|||||||
menuPlacement={menuPlacement}
|
menuPlacement={menuPlacement}
|
||||||
isMulti={isMulti}
|
isMulti={isMulti}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
console.log("Selected values:", v);
|
|
||||||
setValue(v);
|
setValue(v);
|
||||||
if (!isMulti) {
|
if (!isMulti) {
|
||||||
const singleValue = v as string;
|
const singleValue = v as string;
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export const MissionForm = () => {
|
|||||||
<form className="space-y-4">
|
<form className="space-y-4">
|
||||||
{/* Koorinaten Section */}
|
{/* Koorinaten Section */}
|
||||||
<div className="form-control">
|
<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">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -219,12 +219,12 @@ export const MissionForm = () => {
|
|||||||
|
|
||||||
{/* Adresse Section */}
|
{/* Adresse Section */}
|
||||||
<div className="form-control">
|
<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
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
{...form.register("addressStreet")}
|
{...form.register("addressStreet")}
|
||||||
placeholder="Straße"
|
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">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<input
|
<input
|
||||||
@@ -244,17 +244,16 @@ export const MissionForm = () => {
|
|||||||
type="text"
|
type="text"
|
||||||
{...form.register("addressAdditionalInfo")}
|
{...form.register("addressAdditionalInfo")}
|
||||||
placeholder="Zusätzliche Adressinformationen"
|
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>
|
</div>
|
||||||
{/* Rettungsmittel Section */}
|
{/* Rettungsmittel Section */}
|
||||||
<div className="form-control">
|
<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
|
<StationsSelect
|
||||||
isMulti
|
isMulti
|
||||||
selectedStations={form.watch("missionStationIds")}
|
selectedStations={form.watch("missionStationIds")}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
console.log("Selected stations:", v);
|
|
||||||
form.setValue("missionStationIds", v.selectedStationIds);
|
form.setValue("missionStationIds", v.selectedStationIds);
|
||||||
form.setValue("hpgAmbulanceState", v.hpgAmbulanceState);
|
form.setValue("hpgAmbulanceState", v.hpgAmbulanceState);
|
||||||
form.setValue("hpgFireEngineState", v.hpgFireEngineState);
|
form.setValue("hpgFireEngineState", v.hpgFireEngineState);
|
||||||
@@ -270,10 +269,10 @@ export const MissionForm = () => {
|
|||||||
|
|
||||||
{/* Einsatzdaten Section */}
|
{/* Einsatzdaten Section */}
|
||||||
<div className="form-control">
|
<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
|
<select
|
||||||
{...form.register("type")}
|
{...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) => {
|
onChange={(e) => {
|
||||||
form.setValue("type", e.target.value as missionType);
|
form.setValue("type", e.target.value as missionType);
|
||||||
if (e.target.value === "primary") {
|
if (e.target.value === "primary") {
|
||||||
@@ -295,7 +294,7 @@ export const MissionForm = () => {
|
|||||||
<>
|
<>
|
||||||
<select
|
<select
|
||||||
{...form.register("missionKeywordCategory")}
|
{...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) => {
|
onChange={(e) => {
|
||||||
form.setValue("missionKeywordCategory", e.target.value as string);
|
form.setValue("missionKeywordCategory", e.target.value as string);
|
||||||
form.setValue("missionKeywordName", null as any);
|
form.setValue("missionKeywordName", null as any);
|
||||||
@@ -316,13 +315,13 @@ export const MissionForm = () => {
|
|||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
{form.formState.errors.missionKeywordCategory && (
|
{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
|
<select
|
||||||
{...form.register("missionKeywordAbbreviation")}
|
{...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) => {
|
onChange={(e) => {
|
||||||
const keyword = keywords?.find((k) => k.abreviation === e.target.value);
|
const keyword = keywords?.find((k) => k.abreviation === e.target.value);
|
||||||
form.setValue("missionKeywordName", keyword?.name || (null as any));
|
form.setValue("missionKeywordName", keyword?.name || (null as any));
|
||||||
@@ -344,7 +343,7 @@ export const MissionForm = () => {
|
|||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
{form.formState.errors.missionKeywordAbbreviation && (
|
{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">
|
<div className="mb-4">
|
||||||
<select
|
<select
|
||||||
@@ -364,7 +363,7 @@ export const MissionForm = () => {
|
|||||||
form.setValue("missionAdditionalInfo", name || "");
|
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"}
|
value={form.watch("hpgMissionString") || "please_select"}
|
||||||
>
|
>
|
||||||
<option disabled value="please_select">
|
<option disabled value="please_select">
|
||||||
@@ -383,14 +382,14 @@ export const MissionForm = () => {
|
|||||||
})}
|
})}
|
||||||
</select>
|
</select>
|
||||||
{validationRequired && (
|
{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>
|
</div>
|
||||||
|
|
||||||
<textarea
|
<textarea
|
||||||
{...form.register("missionAdditionalInfo")}
|
{...form.register("missionAdditionalInfo")}
|
||||||
placeholder="Einsatzinformationen"
|
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" && (
|
{form.watch("type") === "sekundär" && (
|
||||||
<input
|
<input
|
||||||
@@ -402,7 +401,7 @@ export const MissionForm = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="form-control">
|
<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
|
<textarea
|
||||||
{...form.register("missionPatientInfo")}
|
{...form.register("missionPatientInfo")}
|
||||||
placeholder="Patienteninformationen"
|
placeholder="Patienteninformationen"
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ export default async function RootLayout({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!session) {
|
if (!session) {
|
||||||
console.log(session);
|
|
||||||
return redirect("/logout");
|
return redirect("/logout");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ export const useSounds = () => {
|
|||||||
const timeouts: NodeJS.Timeout[] = [];
|
const timeouts: NodeJS.Timeout[] = [];
|
||||||
|
|
||||||
if (page === "new-mission" && newMissionSound.current) {
|
if (page === "new-mission" && newMissionSound.current) {
|
||||||
console.log("new-mission", mission);
|
|
||||||
newMissionSound.current.currentTime = 0;
|
newMissionSound.current.currentTime = 0;
|
||||||
newMissionSound.current.play();
|
newMissionSound.current.play();
|
||||||
if (mission) {
|
if (mission) {
|
||||||
|
|||||||
@@ -183,7 +183,6 @@ export const ConnectionBtn = () => {
|
|||||||
const [logoffHours, logoffMinutes] =
|
const [logoffHours, logoffMinutes] =
|
||||||
form.logoffTime?.split(":").map(Number) || [];
|
form.logoffTime?.split(":").map(Number) || [];
|
||||||
|
|
||||||
console.log(logoffHours, logoffMinutes, form.logoffTime);
|
|
||||||
await aircraftMutation.mutateAsync({
|
await aircraftMutation.mutateAsync({
|
||||||
sessionId: connection.connectedAircraft.id,
|
sessionId: connection.connectedAircraft.id,
|
||||||
change: {
|
change: {
|
||||||
|
|||||||
@@ -530,7 +530,6 @@ const Rettungsmittel = ({ mission }: { mission: Mission }) => {
|
|||||||
className="min-w-[320px] flex-1"
|
className="min-w-[320px] flex-1"
|
||||||
isMulti={false}
|
isMulti={false}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
console.log("Selected station:", v);
|
|
||||||
setSelectedStation({
|
setSelectedStation({
|
||||||
selectedStationId: v?.selectedStationIds[0],
|
selectedStationId: v?.selectedStationIds[0],
|
||||||
hpgAmbulanceState: mission.hpgAmbulanceState || HpgState.NOT_REQUESTED,
|
hpgAmbulanceState: mission.hpgAmbulanceState || HpgState.NOT_REQUESTED,
|
||||||
|
|||||||
@@ -91,16 +91,16 @@ export const SettingsBtn = () => {
|
|||||||
modalRef.current?.showModal();
|
modalRef.current?.showModal();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GearIcon className="w-5 h-5" />
|
<GearIcon className="h-5 w-5" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<dialog ref={modalRef} className="modal">
|
<dialog ref={modalRef} className="modal">
|
||||||
<div className="modal-box">
|
<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
|
<SettingsIcon size={20} /> Einstellungen
|
||||||
</h3>
|
</h3>
|
||||||
<div className="flex flex-col items-center justify-center">
|
<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">
|
<label className="floating-label w-full text-base">
|
||||||
<span>Eingabegerät</span>
|
<span>Eingabegerät</span>
|
||||||
<select
|
<select
|
||||||
@@ -122,7 +122,7 @@ export const SettingsBtn = () => {
|
|||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</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
|
<Volume2 size={20} /> Eingabelautstärke
|
||||||
</p>
|
</p>
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
@@ -139,7 +139,7 @@ export const SettingsBtn = () => {
|
|||||||
value={settings.micVolume}
|
value={settings.micVolume}
|
||||||
className="range range-xs range-accent w-full"
|
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>0%</span>
|
||||||
<span>25%</span>
|
<span>25%</span>
|
||||||
<span>50%</span>
|
<span>50%</span>
|
||||||
@@ -155,24 +155,23 @@ export const SettingsBtn = () => {
|
|||||||
)}
|
)}
|
||||||
<div className="divider w-full" />
|
<div className="divider w-full" />
|
||||||
</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} /> Funk Lautstärke
|
<Volume2 size={20} /> Funk Lautstärke
|
||||||
</p>
|
</p>
|
||||||
<div className="w-full mb-2">
|
<div className="mb-2 w-full">
|
||||||
<input
|
<input
|
||||||
type="range"
|
type="range"
|
||||||
min={0}
|
min={0}
|
||||||
max={1}
|
max={1}
|
||||||
step={0.01}
|
step={0.01}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
console.log("Radio Volume", e.target.value);
|
|
||||||
const value = parseFloat(e.target.value);
|
const value = parseFloat(e.target.value);
|
||||||
setSettingsPartial({ radioVolume: value });
|
setSettingsPartial({ radioVolume: value });
|
||||||
}}
|
}}
|
||||||
value={settings.radioVolume}
|
value={settings.radioVolume}
|
||||||
className="range range-xs range-primary w-full"
|
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>0%</span>
|
||||||
<span>25%</span>
|
<span>25%</span>
|
||||||
<span>50%</span>
|
<span>50%</span>
|
||||||
@@ -181,7 +180,7 @@ export const SettingsBtn = () => {
|
|||||||
</div>
|
</div>
|
||||||
</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
|
<Volume2 size={20} /> Melder Lautstärke
|
||||||
</p>
|
</p>
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
@@ -200,7 +199,7 @@ export const SettingsBtn = () => {
|
|||||||
value={settings.dmeVolume}
|
value={settings.dmeVolume}
|
||||||
className="range range-xs range-primary w-full"
|
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>0%</span>
|
||||||
<span>25%</span>
|
<span>25%</span>
|
||||||
<span>50%</span>
|
<span>50%</span>
|
||||||
@@ -208,12 +207,12 @@ export const SettingsBtn = () => {
|
|||||||
<span>100%</span>
|
<span>100%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-center w-full">
|
<div className="flex w-full justify-center">
|
||||||
<div className="divider w-full" />
|
<div className="divider w-full" />
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<label className="floating-label 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
|
<Bell /> NTFY room
|
||||||
</span>
|
</span>
|
||||||
<input
|
<input
|
||||||
@@ -237,7 +236,7 @@ export const SettingsBtn = () => {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-between modal-action">
|
<div className="modal-action flex justify-between">
|
||||||
<button
|
<button
|
||||||
className="btn btn-soft"
|
className="btn btn-soft"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|||||||
@@ -171,12 +171,6 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
|||||||
deviceId: get().settings.micDeviceId ?? undefined,
|
deviceId: get().settings.micDeviceId ?? undefined,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(
|
|
||||||
"Connected to room",
|
|
||||||
roomName,
|
|
||||||
get().settings.micDeviceId,
|
|
||||||
get().settings.micVolume,
|
|
||||||
);
|
|
||||||
// Funk-Effekt anwenden
|
// Funk-Effekt anwenden
|
||||||
const radioStream = getRadioStream(inputStream, get().settings.micVolume);
|
const radioStream = getRadioStream(inputStream, get().settings.micVolume);
|
||||||
if (!radioStream) throw new Error("Konnte Funkstream nicht erzeugen");
|
if (!radioStream) throw new Error("Konnte Funkstream nicht erzeugen");
|
||||||
|
|||||||
@@ -116,14 +116,12 @@ dispatchSocket.on(
|
|||||||
"chat-message",
|
"chat-message",
|
||||||
({ userId, message }: { userId: string; message: ChatMessage }) => {
|
({ userId, message }: { userId: string; message: ChatMessage }) => {
|
||||||
const store = useLeftMenuStore.getState();
|
const store = useLeftMenuStore.getState();
|
||||||
console.log("chat-message", userId, message);
|
|
||||||
// Update the chat store with the new message
|
// Update the chat store with the new message
|
||||||
store.addMessage(userId, message);
|
store.addMessage(userId, message);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
pilotSocket.on("chat-message", ({ userId, message }: { userId: string; message: ChatMessage }) => {
|
pilotSocket.on("chat-message", ({ userId, message }: { userId: string; message: ChatMessage }) => {
|
||||||
const store = useLeftMenuStore.getState();
|
const store = useLeftMenuStore.getState();
|
||||||
console.log("chat-message", userId, message);
|
|
||||||
// Update the chat store with the new message
|
// Update the chat store with the new message
|
||||||
store.addMessage(userId, message);
|
store.addMessage(userId, message);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,14 +14,6 @@ const initTransporter = () => {
|
|||||||
if (!process.env.MAIL_USER) return console.error("MAIL_USER is not defined");
|
if (!process.env.MAIL_USER) return console.error("MAIL_USER is not defined");
|
||||||
if (!process.env.MAIL_PASSWORD) return console.error("MAIL_PASSWORD is not defined");
|
if (!process.env.MAIL_PASSWORD) return console.error("MAIL_PASSWORD is not defined");
|
||||||
|
|
||||||
console.log("Initializing mail transporter...", {
|
|
||||||
host: process.env.MAIL_SERVER,
|
|
||||||
port: process.env.MAIL_PORT,
|
|
||||||
user: process.env.MAIL_USER,
|
|
||||||
password: process.env.MAIL_PASSWORD,
|
|
||||||
secure: process.env.MAIL_SECURE === "true",
|
|
||||||
});
|
|
||||||
|
|
||||||
transporter = nodemailer.createTransport({
|
transporter = nodemailer.createTransport({
|
||||||
host: process.env.MAIL_SERVER,
|
host: process.env.MAIL_SERVER,
|
||||||
port: parseInt(process.env.MAIL_PORT),
|
port: parseInt(process.env.MAIL_PORT),
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export const AppointmentModal = ({
|
|||||||
const participantTableRef = useRef<PaginatedTableRef>(null);
|
const participantTableRef = useRef<PaginatedTableRef>(null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<dialog ref={ref} className="modal ">
|
<dialog ref={ref} className="modal">
|
||||||
<div className="modal-box min-w-[900px] min-h-[500px]">
|
<div className="modal-box min-h-[500px] min-w-[900px]">
|
||||||
<form method="dialog">
|
<form method="dialog">
|
||||||
{/* if there is a button in form, it will close the modal */}
|
{/* if there is a button in form, it will close the modal */}
|
||||||
<button
|
<button
|
||||||
@@ -55,8 +55,8 @@ export const AppointmentModal = ({
|
|||||||
})}
|
})}
|
||||||
className="flex flex-col"
|
className="flex flex-col"
|
||||||
>
|
>
|
||||||
<div className="flex justify-between mr-7">
|
<div className="mr-7 flex justify-between">
|
||||||
<h3 className="font-bold text-lg">Termin {appointmentForm.watch("id")}</h3>
|
<h3 className="text-lg font-bold">Termin {appointmentForm.watch("id")}</h3>
|
||||||
<DateInput
|
<DateInput
|
||||||
value={new Date(appointmentForm.watch("appointmentDate") || Date.now())}
|
value={new Date(appointmentForm.watch("appointmentDate") || Date.now())}
|
||||||
onChange={(date) => appointmentForm.setValue("appointmentDate", date)}
|
onChange={(date) => appointmentForm.setValue("appointmentDate", date)}
|
||||||
@@ -121,11 +121,6 @@ export const AppointmentModal = ({
|
|||||||
attended: true,
|
attended: true,
|
||||||
appointmentCancelled: false,
|
appointmentCancelled: false,
|
||||||
});
|
});
|
||||||
console.log(
|
|
||||||
"Participant attended",
|
|
||||||
event.finisherMoodleCourseId,
|
|
||||||
!event.finisherMoodleCourseId?.length,
|
|
||||||
);
|
|
||||||
if (!event.finisherMoodleCourseId?.length) {
|
if (!event.finisherMoodleCourseId?.length) {
|
||||||
toast(
|
toast(
|
||||||
"Teilnehmer hat das event abgeschlossen, workflow ausgeführt",
|
"Teilnehmer hat das event abgeschlossen, workflow ausgeführt",
|
||||||
|
|||||||
@@ -13,10 +13,8 @@ export default function Page() {
|
|||||||
|
|
||||||
const verifyCode = useCallback(
|
const verifyCode = useCallback(
|
||||||
async (code: string) => {
|
async (code: string) => {
|
||||||
console.log("Verifying code:", code);
|
|
||||||
if (!code) return;
|
if (!code) return;
|
||||||
const res = await checkEmailCode(code);
|
const res = await checkEmailCode(code);
|
||||||
console.log("Verification response:", res);
|
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
console.log("Verification error:", res.error);
|
console.log("Verification error:", res.error);
|
||||||
toast.error(res.error);
|
toast.error(res.error);
|
||||||
@@ -34,12 +32,12 @@ export default function Page() {
|
|||||||
}, [paramsCode, verifyCode]);
|
}, [paramsCode, verifyCode]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card bg-base-200 shadow-xl mb-4 ">
|
<div className="card bg-base-200 mb-4 shadow-xl">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<p className="text-2xl font-semibold text-left flex items-center gap-2">
|
<p className="flex items-center gap-2 text-left text-2xl font-semibold">
|
||||||
<Check className="w-5 h-5" /> E-Mail Bestätigung
|
<Check className="h-5 w-5" /> E-Mail Bestätigung
|
||||||
</p>
|
</p>
|
||||||
<div className="flex justify-center gap-3 w-full">
|
<div className="flex w-full justify-center gap-3">
|
||||||
<input
|
<input
|
||||||
className="input flex-1"
|
className="input flex-1"
|
||||||
placeholder="Bestätigungscode"
|
placeholder="Bestätigungscode"
|
||||||
|
|||||||
@@ -21,13 +21,8 @@ export const options: AuthOptions = {
|
|||||||
where: { email: credentials.email },
|
where: { email: credentials.email },
|
||||||
});
|
});
|
||||||
const v1User = (oldUser as OldUser[]).find((u) => u.email === credentials.email);
|
const v1User = (oldUser as OldUser[]).find((u) => u.email === credentials.email);
|
||||||
console.log("V1 User", v1User?.publicId);
|
|
||||||
if (!user && v1User) {
|
if (!user && v1User) {
|
||||||
if (bcrypt.compareSync(credentials.password, v1User.password)) {
|
if (bcrypt.compareSync(credentials.password, v1User.password)) {
|
||||||
console.log(
|
|
||||||
"v1 User Passwords match:",
|
|
||||||
bcrypt.compareSync(credentials.password, v1User.password),
|
|
||||||
);
|
|
||||||
const newUser = await createNewUserFromOld(v1User);
|
const newUser = await createNewUserFromOld(v1User);
|
||||||
await sendVerificationLink(newUser.id);
|
await sendVerificationLink(newUser.id);
|
||||||
return newUser;
|
return newUser;
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ export const getMoodleUserById = async (id: string) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
console.log("Moodle User", user);
|
|
||||||
const u = user[0];
|
const u = user[0];
|
||||||
return (
|
return (
|
||||||
(u as {
|
(u as {
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
export const generateUUID = (length: number) => {
|
export const generateUUID = (length: number) => {
|
||||||
// Base62-Version (a-z, A-Z, 0-9)
|
// Base62-Version (a-z, A-Z, 0-9)
|
||||||
const base62 =
|
const base62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
||||||
let string = "";
|
let string = "";
|
||||||
|
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
string += base62.charAt(Math.floor(Math.random() * base62.length));
|
string += base62.charAt(Math.floor(Math.random() * base62.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(string);
|
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user