fixed extimatedLoggoff time
This commit is contained in:
@@ -45,15 +45,10 @@ export const handleConnectDispatch =
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const [logoffHours, logoffMinutes] = logoffTime.split(":").map(Number);
|
|
||||||
|
|
||||||
const connectedDispatcherEntry = await prisma.connectedDispatcher.create({
|
const connectedDispatcherEntry = await prisma.connectedDispatcher.create({
|
||||||
data: {
|
data: {
|
||||||
publicUser: getPublicUser(user) as any,
|
publicUser: getPublicUser(user) as any,
|
||||||
esimatedLogoutTime:
|
esimatedLogoutTime: logoffTime,
|
||||||
logoffHours !== undefined && logoffMinutes !== undefined
|
|
||||||
? getNextDateWithTime(logoffHours, logoffMinutes)
|
|
||||||
: null,
|
|
||||||
lastHeartbeat: new Date().toISOString(),
|
lastHeartbeat: new Date().toISOString(),
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
zone: selectedZone,
|
zone: selectedZone,
|
||||||
|
|||||||
@@ -73,15 +73,11 @@ export const handleConnectPilot =
|
|||||||
}
|
}
|
||||||
|
|
||||||
const randomPos = debug ? getRandomGermanPosition() : undefined;
|
const randomPos = debug ? getRandomGermanPosition() : undefined;
|
||||||
const [logoffHours, logoffMinutes] = logoffTime.split(":").map(Number);
|
|
||||||
|
|
||||||
const connectedAircraftEntry = await prisma.connectedAircraft.create({
|
const connectedAircraftEntry = await prisma.connectedAircraft.create({
|
||||||
data: {
|
data: {
|
||||||
publicUser: getPublicUser(user) as any,
|
publicUser: getPublicUser(user) as any,
|
||||||
esimatedLogoutTime:
|
esimatedLogoutTime: logoffTime,
|
||||||
logoffHours !== undefined && logoffMinutes !== undefined
|
|
||||||
? getNextDateWithTime(logoffHours, logoffMinutes)
|
|
||||||
: null,
|
|
||||||
userId: userId,
|
userId: userId,
|
||||||
stationId: parseInt(stationId),
|
stationId: parseInt(stationId),
|
||||||
lastHeartbeat: debug ? nowPlus2h.toISOString() : undefined,
|
lastHeartbeat: debug ? nowPlus2h.toISOString() : undefined,
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ export const ConnectionBtn = () => {
|
|||||||
|
|
||||||
if (!uid) return null;
|
if (!uid) return null;
|
||||||
return (
|
return (
|
||||||
<div className="rounded-box bg-base-200 flex justify-center items-center gap-2 p-1">
|
<div className="rounded-box bg-base-200 flex items-center justify-center gap-2 p-1">
|
||||||
{connection.message.length > 0 && (
|
{connection.message.length > 0 && (
|
||||||
<span className="mx-2 text-error">{connection.message}</span>
|
<span className="text-error mx-2">{connection.message}</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{connection.status == "connected" ? (
|
{connection.status == "connected" ? (
|
||||||
@@ -63,11 +63,11 @@ export const ConnectionBtn = () => {
|
|||||||
<dialog ref={modalRef} className="modal">
|
<dialog ref={modalRef} className="modal">
|
||||||
<div className="modal-box flex flex-col items-center justify-center">
|
<div className="modal-box flex flex-col items-center justify-center">
|
||||||
{connection.status == "connected" ? (
|
{connection.status == "connected" ? (
|
||||||
<h3 className="text-lg font-bold mb-5">
|
<h3 className="mb-5 text-lg font-bold">
|
||||||
Verbunden als <span className="text-info"><{connection.selectedZone}></span>
|
Verbunden als <span className="text-info"><{connection.selectedZone}></span>
|
||||||
</h3>
|
</h3>
|
||||||
) : (
|
) : (
|
||||||
<h3 className="text-lg font-bold mb-5">Als Disponent anmelden</h3>
|
<h3 className="mb-5 text-lg font-bold">Als Disponent anmelden</h3>
|
||||||
)}
|
)}
|
||||||
<fieldset className="fieldset w-full">
|
<fieldset className="fieldset w-full">
|
||||||
<label className="floating-label w-full text-base">
|
<label className="floating-label w-full text-base">
|
||||||
@@ -89,8 +89,8 @@ export const ConnectionBtn = () => {
|
|||||||
<p className="fieldset-label">Du kannst diese Zeit später noch anpassen.</p>
|
<p className="fieldset-label">Du kannst diese Zeit später noch anpassen.</p>
|
||||||
)}
|
)}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div className="modal-action flex justify-between w-full">
|
<div className="modal-action flex w-full justify-between">
|
||||||
<form method="dialog" className="w-full flex justify-between">
|
<form method="dialog" className="flex w-full justify-between">
|
||||||
<button className="btn btn-soft">Zurück</button>
|
<button className="btn btn-soft">Zurück</button>
|
||||||
{connection.status == "connected" ? (
|
{connection.status == "connected" ? (
|
||||||
<>
|
<>
|
||||||
@@ -130,7 +130,15 @@ export const ConnectionBtn = () => {
|
|||||||
type="submit"
|
type="submit"
|
||||||
onSubmit={() => false}
|
onSubmit={() => false}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
connection.connect(uid, form.selectedZone, form.logoffTime);
|
const [logoffHours, logoffMinutes] =
|
||||||
|
form.logoffTime?.split(":").map(Number) || [];
|
||||||
|
connection.connect(
|
||||||
|
uid,
|
||||||
|
form.selectedZone,
|
||||||
|
form.logoffTime && logoffHours !== undefined && logoffMinutes !== undefined
|
||||||
|
? getNextDateWithTime(logoffHours, logoffMinutes).toISOString()
|
||||||
|
: "",
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
className="btn btn-soft btn-info"
|
className="btn btn-soft btn-info"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ export const ConnectionBtn = () => {
|
|||||||
const uid = session.data?.user?.id;
|
const uid = session.data?.user?.id;
|
||||||
if (!uid) return null;
|
if (!uid) return null;
|
||||||
return (
|
return (
|
||||||
<div className="rounded-box bg-base-200 flex justify-center items-center gap-2 p-1">
|
<div className="rounded-box bg-base-200 flex items-center justify-center gap-2 p-1">
|
||||||
{connection.message.length > 0 && (
|
{connection.message.length > 0 && (
|
||||||
<span className="mx-2 text-error">{connection.message}</span>
|
<span className="text-error mx-2">{connection.message}</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{connection.status == "connected" ? (
|
{connection.status == "connected" ? (
|
||||||
@@ -95,12 +95,12 @@ export const ConnectionBtn = () => {
|
|||||||
<dialog ref={modalRef} className="modal">
|
<dialog ref={modalRef} className="modal">
|
||||||
<div className="modal-box flex flex-col items-center justify-center">
|
<div className="modal-box flex flex-col items-center justify-center">
|
||||||
{connection.status == "connected" ? (
|
{connection.status == "connected" ? (
|
||||||
<h3 className="text-lg font-bold mb-5">
|
<h3 className="mb-5 text-lg font-bold">
|
||||||
Verbunden als{" "}
|
Verbunden als{" "}
|
||||||
<span className="text-info"><{connection.selectedStation?.bosCallsign}></span>
|
<span className="text-info"><{connection.selectedStation?.bosCallsign}></span>
|
||||||
</h3>
|
</h3>
|
||||||
) : (
|
) : (
|
||||||
<h3 className="text-lg font-bold mb-5">Als Pilot anmelden</h3>
|
<h3 className="mb-5 text-lg font-bold">Als Pilot anmelden</h3>
|
||||||
)}
|
)}
|
||||||
{connection.status !== "connected" && (
|
{connection.status !== "connected" && (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
@@ -135,7 +135,7 @@ export const ConnectionBtn = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<fieldset className="fieldset w-full mt-2">
|
<fieldset className="fieldset mt-2 w-full">
|
||||||
<label className="floating-label w-full text-base">
|
<label className="floating-label w-full text-base">
|
||||||
<span>Logoff Zeit (LCL)</span>
|
<span>Logoff Zeit (LCL)</span>
|
||||||
<input
|
<input
|
||||||
@@ -171,8 +171,8 @@ export const ConnectionBtn = () => {
|
|||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
)}
|
)}
|
||||||
<div className="modal-action flex justify-between w-full">
|
<div className="modal-action flex w-full justify-between">
|
||||||
<form method="dialog" className="w-full flex justify-between">
|
<form method="dialog" className="flex w-full justify-between">
|
||||||
<button className="btn btn-soft">Zurück</button>
|
<button className="btn btn-soft">Zurück</button>
|
||||||
{connection.status == "connected" ? (
|
{connection.status == "connected" ? (
|
||||||
<>
|
<>
|
||||||
@@ -220,10 +220,15 @@ export const ConnectionBtn = () => {
|
|||||||
station.id === parseInt(form.selectedStationId?.toString() || ""),
|
station.id === parseInt(form.selectedStationId?.toString() || ""),
|
||||||
);
|
);
|
||||||
if (selectedStation) {
|
if (selectedStation) {
|
||||||
|
const [logoffHours, logoffMinutes] =
|
||||||
|
form.logoffTime?.split(":").map(Number) || [];
|
||||||
|
|
||||||
await connection.connect(
|
await connection.connect(
|
||||||
uid,
|
uid,
|
||||||
form.selectedStationId?.toString() || "",
|
form.selectedStationId?.toString() || "",
|
||||||
form.logoffTime || "",
|
form.logoffTime && logoffHours !== undefined && logoffMinutes !== undefined
|
||||||
|
? getNextDateWithTime(logoffHours, logoffMinutes).toISOString()
|
||||||
|
: "",
|
||||||
selectedStation,
|
selectedStation,
|
||||||
session.data!.user,
|
session.data!.user,
|
||||||
form.debugPosition,
|
form.debugPosition,
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ export const BugReport = () => {
|
|||||||
<div className="indicator">
|
<div className="indicator">
|
||||||
<a
|
<a
|
||||||
className="btn btn-soft btn-sm btn-warning tooltip tooltip-right"
|
className="btn btn-soft btn-sm btn-warning tooltip tooltip-right"
|
||||||
data-tip="Fehler Melden"
|
data-tip="Fehler melden"
|
||||||
href="https://discord.com/channels/1077269395019141140/1395892524404576367"
|
href="https://discord.com/channels/1077269395019141140/1395892524404576367"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<Bug className="w-4 h-4" />
|
<Bug className="h-4 w-4" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ const FMSStatusHistory = ({
|
|||||||
return (
|
return (
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
<ul className="text-base-content font-semibold">
|
<ul className="text-base-content font-semibold">
|
||||||
<li className="flex items-center gap-2 mb-1">
|
<li className="mb-1 flex items-center gap-2">
|
||||||
<p className="flex items-center gap-2 flex-1">
|
<p className="flex flex-1 items-center gap-2">
|
||||||
<PersonIcon className="w-5 h-5" /> {aircraftUser.fullName} ({aircraftUser.publicId}){" "}
|
<PersonIcon className="h-5 w-5" /> {aircraftUser.fullName} ({aircraftUser.publicId}){" "}
|
||||||
{(() => {
|
{(() => {
|
||||||
const badges = aircraftUser.badges
|
const badges = aircraftUser.badges
|
||||||
.filter((b) => b.startsWith("P") && b.length == 2)
|
.filter((b) => b.startsWith("P") && b.length == 2)
|
||||||
@@ -96,12 +96,12 @@ const FMSStatusHistory = ({
|
|||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div className="divider mt-0 mb-0" />
|
<div className="divider mb-0 mt-0" />
|
||||||
<ul className="space-y-2">
|
<ul className="space-y-2">
|
||||||
{log.map((entry, index) => (
|
{log.map((entry, index) => (
|
||||||
<li key={index} className="flex items-center gap-2">
|
<li key={index} className="flex items-center gap-2">
|
||||||
<span
|
<span
|
||||||
className="font-bold text-base"
|
className="text-base font-bold"
|
||||||
style={{
|
style={{
|
||||||
color: FMS_STATUS_TEXT_COLORS[entry.data.newFMSstatus],
|
color: FMS_STATUS_TEXT_COLORS[entry.data.newFMSstatus],
|
||||||
}}
|
}}
|
||||||
@@ -145,8 +145,8 @@ const FMSStatusSelector = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-2 mt-2 p-4 text-base-content">
|
<div className="text-base-content mt-2 flex flex-col gap-2 p-4">
|
||||||
<div className="flex gap-2 justify-center items-center h-full">
|
<div className="flex h-full items-center justify-center gap-2">
|
||||||
{Array.from({ length: 9 }, (_, i) => (i + 1).toString())
|
{Array.from({ length: 9 }, (_, i) => (i + 1).toString())
|
||||||
.filter((status) => status !== "5") // Exclude status 5
|
.filter((status) => status !== "5") // Exclude status 5
|
||||||
.map((status) => (
|
.map((status) => (
|
||||||
@@ -154,7 +154,7 @@ const FMSStatusSelector = ({
|
|||||||
disabled={!dispatcherConnected}
|
disabled={!dispatcherConnected}
|
||||||
key={status}
|
key={status}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex justify-center items-center min-w-13 min-h-13 cursor-pointer text-4xl font-bold",
|
"min-w-13 min-h-13 flex cursor-pointer items-center justify-center text-4xl font-bold",
|
||||||
!dispatcherConnected && "cursor-not-allowed",
|
!dispatcherConnected && "cursor-not-allowed",
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
@@ -187,13 +187,13 @@ const FMSStatusSelector = ({
|
|||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-1 p-2 justify-center items-center">
|
<div className="flex items-center justify-center gap-1 p-2">
|
||||||
{["E", "C", "F", "J", "L", "c", "d", "h", "o", "u"].map((status) => (
|
{["E", "C", "F", "J", "L", "c", "d", "h", "o", "u"].map((status) => (
|
||||||
<button
|
<button
|
||||||
disabled={!dispatcherConnected}
|
disabled={!dispatcherConnected}
|
||||||
key={status}
|
key={status}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex justify-center items-center min-w-10 min-h-10 cursor-pointer text-lg font-bold",
|
"flex min-h-10 min-w-10 cursor-pointer items-center justify-center text-lg font-bold",
|
||||||
!dispatcherConnected && "cursor-not-allowed",
|
!dispatcherConnected && "cursor-not-allowed",
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
@@ -253,17 +253,17 @@ const StationTab = ({ aircraft }: { aircraft: ConnectedAircraft & { Station: Sta
|
|||||||
}, [aircraft.posLng, aircraft.posLat, station.bosRadioArea]);
|
}, [aircraft.posLng, aircraft.posLat, station.bosRadioArea]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-4 text-base-content">
|
<div className="text-base-content p-4">
|
||||||
<ul className="text-base-content font-semibold">
|
<ul className="text-base-content font-semibold">
|
||||||
<li className="flex items-center gap-2 mb-1">
|
<li className="mb-1 flex items-center gap-2">
|
||||||
<Component size={16} /> Aktuelle Rufgruppe: {livekitUser?.roomName || "Nicht verbunden"}
|
<Component size={16} /> Aktuelle Rufgruppe: {livekitUser?.roomName || "Nicht verbunden"}
|
||||||
</li>
|
</li>
|
||||||
<li className="flex items-center gap-2 mb-1">
|
<li className="mb-1 flex items-center gap-2">
|
||||||
<RadioTower size={16} /> Leitstellenbereich: {lstName || station.bosRadioArea}
|
<RadioTower size={16} /> Leitstellenbereich: {lstName || station.bosRadioArea}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div className="divider mt-0 mb-0" />
|
<div className="divider mb-0 mt-0" />
|
||||||
<div className="flex items-center text-sm font-semibold justify-between pr-2 mt-2 mb-2">
|
<div className="mb-2 mt-2 flex items-center justify-between pr-2 text-sm font-semibold">
|
||||||
<span className="flex items-center gap-2">
|
<span className="flex items-center gap-2">
|
||||||
<Clock size={16} /> {station.is24h ? "24h Betrieb" : "Tagbetrieb"}
|
<Clock size={16} /> {station.is24h ? "24h Betrieb" : "Tagbetrieb"}
|
||||||
</span>
|
</span>
|
||||||
@@ -277,8 +277,8 @@ const StationTab = ({ aircraft }: { aircraft: ConnectedAircraft & { Station: Sta
|
|||||||
<TextSearch size={16} /> {station.aircraftRegistration}
|
<TextSearch size={16} /> {station.aircraftRegistration}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="divider mt-0 mb-0" />
|
<div className="divider mb-0 mt-0" />
|
||||||
<div className="flex items-center text-sm font-semibold justify-between pr-2 mt-2">
|
<div className="mt-2 flex items-center justify-between pr-2 text-sm font-semibold">
|
||||||
<span className="flex items-center gap-2">
|
<span className="flex items-center gap-2">
|
||||||
<CompassIcon size={16} /> HDG: {aircraft.posHeading}°
|
<CompassIcon size={16} /> HDG: {aircraft.posHeading}°
|
||||||
</span>
|
</span>
|
||||||
@@ -289,7 +289,7 @@ const StationTab = ({ aircraft }: { aircraft: ConnectedAircraft & { Station: Sta
|
|||||||
<CircleGaugeIcon size={16} /> ALT: {aircraft.posAlt} ft
|
<CircleGaugeIcon size={16} /> ALT: {aircraft.posAlt} ft
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center text-sm font-semibold justify-between pr-2 mt-2">
|
<div className="mt-2 flex items-center justify-between pr-2 text-sm font-semibold">
|
||||||
<span className="flex items-center gap-2">
|
<span className="flex items-center gap-2">
|
||||||
<Lollipop size={16} />{" "}
|
<Lollipop size={16} />{" "}
|
||||||
<span className={cn(aircraft.posH145active && "text-green-500")}>
|
<span className={cn(aircraft.posH145active && "text-green-500")}>
|
||||||
@@ -303,22 +303,22 @@ const StationTab = ({ aircraft }: { aircraft: ConnectedAircraft & { Station: Sta
|
|||||||
|
|
||||||
const MissionTab = ({ mission }: { mission: Mission }) => {
|
const MissionTab = ({ mission }: { mission: Mission }) => {
|
||||||
return (
|
return (
|
||||||
<div className="p-4 text-base-content">
|
<div className="text-base-content p-4">
|
||||||
<ul className="text-base-content font-semibold">
|
<ul className="text-base-content font-semibold">
|
||||||
<li className="flex items-center gap-2 mb-1">
|
<li className="mb-1 flex items-center gap-2">
|
||||||
<BellRing size={16} /> {mission.missionKeywordCategory}
|
<BellRing size={16} /> {mission.missionKeywordCategory}
|
||||||
</li>
|
</li>
|
||||||
<li className="flex items-center gap-2 mb-1">
|
<li className="mb-1 flex items-center gap-2">
|
||||||
<ListCollapse size={16} />
|
<ListCollapse size={16} />
|
||||||
{mission.missionKeywordName}
|
{mission.missionKeywordName}
|
||||||
</li>
|
</li>
|
||||||
<li className="flex items-center gap-2 mt-3">
|
<li className="mt-3 flex items-center gap-2">
|
||||||
<Hash size={16} />
|
<Hash size={16} />
|
||||||
__{new Date().toISOString().slice(0, 10).replace(/-/g, "")}
|
__{new Date().toISOString().slice(0, 10).replace(/-/g, "")}
|
||||||
{mission.id}
|
{mission.id}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div className="divider mt-0 mb-0" />
|
<div className="divider mb-0 mt-0" />
|
||||||
<div className="text-sm font-semibold">
|
<div className="text-sm font-semibold">
|
||||||
<p className="flex items-center gap-2">
|
<p className="flex items-center gap-2">
|
||||||
<MapPin size={16} /> {mission.addressLat} {mission.addressLng}
|
<MapPin size={16} /> {mission.addressLat} {mission.addressLng}
|
||||||
@@ -416,7 +416,7 @@ const SDSTab = ({
|
|||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
{!isChatOpen ? (
|
{!isChatOpen ? (
|
||||||
<button
|
<button
|
||||||
className="text-base-content text-base cursor-pointer"
|
className="text-base-content cursor-pointer text-base"
|
||||||
onClick={() => setIsChatOpen(true)}
|
onClick={() => setIsChatOpen(true)}
|
||||||
>
|
>
|
||||||
<span className="flex items-center gap-2">
|
<span className="flex items-center gap-2">
|
||||||
@@ -424,7 +424,7 @@ const SDSTab = ({
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex items-center gap-2 w-full">
|
<div className="flex w-full items-center gap-2">
|
||||||
<input
|
<input
|
||||||
autoFocus
|
autoFocus
|
||||||
type="text"
|
type="text"
|
||||||
@@ -463,7 +463,7 @@ const SDSTab = ({
|
|||||||
<div className="divider m-0" />
|
<div className="divider m-0" />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<ul className="space-y-2 max-h-[300px] overflow-y-auto overflow-x-auto">
|
<ul className="max-h-[300px] space-y-2 overflow-x-auto overflow-y-auto">
|
||||||
{log.map((entry, index) => {
|
{log.map((entry, index) => {
|
||||||
const sdsEntry = entry as MissionSdsLog;
|
const sdsEntry = entry as MissionSdsLog;
|
||||||
return (
|
return (
|
||||||
@@ -475,7 +475,7 @@ const SDSTab = ({
|
|||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
className="font-bold text-base"
|
className="text-base font-bold"
|
||||||
style={{
|
style={{
|
||||||
color: FMS_STATUS_TEXT_COLORS[6],
|
color: FMS_STATUS_TEXT_COLORS[6],
|
||||||
}}
|
}}
|
||||||
@@ -488,7 +488,7 @@ const SDSTab = ({
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{!log.length && (
|
{!log.length && (
|
||||||
<p className="text-gray-500 w-full text-center my-10 font-semibold">
|
<p className="my-10 w-full text-center font-semibold text-gray-500">
|
||||||
Kein SDS-Verlauf verfügbar
|
Kein SDS-Verlauf verfügbar
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -25,9 +25,6 @@ export const handleTrackSubscribed = (
|
|||||||
useAudioStore.getState().addSpeakingParticipant(participant);
|
useAudioStore.getState().addSpeakingParticipant(participant);
|
||||||
element.volume = useAudioStore.getState().settings.radioVolume;
|
element.volume = useAudioStore.getState().settings.radioVolume;
|
||||||
});
|
});
|
||||||
track.on("unmuted", () => {
|
|
||||||
useAudioStore.getState().addSpeakingParticipant(participant);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
track.on("muted", () => {
|
track.on("muted", () => {
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
|||||||
) {
|
) {
|
||||||
const { room, disconnect, connect } = get();
|
const { room, disconnect, connect } = get();
|
||||||
const role = room?.localParticipant.attributes.role;
|
const role = room?.localParticipant.attributes.role;
|
||||||
console.log(role);
|
|
||||||
if (room?.name || role) {
|
if (room?.name || role) {
|
||||||
disconnect();
|
disconnect();
|
||||||
connect(room?.name || "", role || "user");
|
connect(room?.name || "", role || "user");
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
"use client";
|
||||||
import { set, isBefore, addDays } from "date-fns";
|
import { set, isBefore, addDays } from "date-fns";
|
||||||
|
|
||||||
export function getNextDateWithTime(targetHour: number, targetMinute: number): Date {
|
export function getNextDateWithTime(targetHour: number, targetMinute: number): Date {
|
||||||
|
|||||||
Reference in New Issue
Block a user