fixed marker position beeing updated on Validation
This commit is contained in:
@@ -241,9 +241,6 @@ router.post("/:id/hpg-validation-result", async (req, res) => {
|
||||
const newMission = await prisma.mission.update({
|
||||
where: { id: Number(missionId) },
|
||||
data: {
|
||||
// save position of new mission
|
||||
addressLat: result.state === "POSITION_AMANDED" ? result.lat : undefined,
|
||||
addressLng: result.state === "POSITION_AMANDED" ? result.lng : undefined,
|
||||
hpgLocationLat: result.lat,
|
||||
hpgLocationLng: result.lng,
|
||||
hpgValidationState: result.state,
|
||||
|
||||
@@ -20,6 +20,7 @@ import axios from "axios";
|
||||
import { useDispatchConnectionStore } from "_store/dispatch/connectionStore";
|
||||
import { changeDispatcherAPI } from "_querys/dispatcher";
|
||||
import { getRadioStream } from "_helpers/radioEffect";
|
||||
import { usePilotConnectionStore } from "_store/pilot/connectionStore";
|
||||
|
||||
let interval: NodeJS.Timeout;
|
||||
|
||||
@@ -132,6 +133,19 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const { status: DispatcherConnectionStatus } = useDispatchConnectionStore.getState();
|
||||
const { status: PilotConnectionStatus } = usePilotConnectionStore.getState();
|
||||
if (
|
||||
!isTalking &&
|
||||
!(DispatcherConnectionStatus === "connected" || PilotConnectionStatus === "connected")
|
||||
) {
|
||||
useAudioStore.setState({
|
||||
message: "Keine Verbindung",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
room.localParticipant.setMicrophoneEnabled(!isTalking);
|
||||
|
||||
set((state) => ({ isTalking: !state.isTalking, transmitBlocked: false }));
|
||||
@@ -253,6 +267,17 @@ const handlePTT = (data: PTTData) => {
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { status: DispatcherConnectionStatus } = useDispatchConnectionStore.getState();
|
||||
const { status: PilotConnectionStatus } = usePilotConnectionStore.getState();
|
||||
if (
|
||||
shouldTransmit &&
|
||||
!(DispatcherConnectionStatus === "connected" || PilotConnectionStatus === "connected")
|
||||
) {
|
||||
useAudioStore.setState({
|
||||
message: "Keine Verbindung",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
useAudioStore.setState({
|
||||
isTalking: shouldTransmit,
|
||||
|
||||
@@ -114,8 +114,23 @@ export const ProfileForm: React.FC<ProfileFormProps> = ({ user }: ProfileFormPro
|
||||
placeholder="Nachname"
|
||||
/>
|
||||
</label>
|
||||
{form.formState.errors.lastname && (
|
||||
<p className="text-error">{form.formState.errors.lastname?.message}</p>
|
||||
<label className="floating-label mb-5 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<PersonIcon /> Moodle ID
|
||||
</span>
|
||||
<input
|
||||
{...form.register("moodleId", {
|
||||
valueAsNumber: true,
|
||||
value: null,
|
||||
})}
|
||||
type="text"
|
||||
className="input input-bordered w-full"
|
||||
defaultValue={user?.moodleId || ""}
|
||||
placeholder="Moodle ID"
|
||||
/>
|
||||
</label>
|
||||
{form.formState.errors.moodleId && (
|
||||
<p className="text-error">{form.formState.errors.moodleId?.message}</p>
|
||||
)}
|
||||
{session.data?.user.permissions.includes("ADMIN_USER_ADVANCED") && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user