Heliport Search, Station connection history table, reworked mission close functionality
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
Station,
|
||||
User,
|
||||
} from "@repo/db";
|
||||
import { useRef, useState } from "react";
|
||||
import { useRef } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import {
|
||||
deleteDispoHistory,
|
||||
@@ -84,11 +84,11 @@ export const ProfileForm: React.FC<ProfileFormProps> = ({ user }: ProfileFormPro
|
||||
})}
|
||||
>
|
||||
<h2 className="card-title">
|
||||
<MixerHorizontalIcon className="w-5 h-5" /> User bearbeiten
|
||||
<MixerHorizontalIcon className="h-5 w-5" /> User bearbeiten
|
||||
</h2>
|
||||
<div className="text-left">
|
||||
<label className="floating-label w-full mb-5 mt-5">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mb-5 mt-5 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<PersonIcon /> Vorname
|
||||
</span>
|
||||
<input
|
||||
@@ -102,8 +102,8 @@ export const ProfileForm: React.FC<ProfileFormProps> = ({ user }: ProfileFormPro
|
||||
{form.formState.errors.firstname && (
|
||||
<p className="text-error">{form.formState.errors.firstname.message}</p>
|
||||
)}
|
||||
<label className="floating-label w-full mb-5">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<label className="floating-label mb-5 w-full">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<PersonIcon /> Nachname
|
||||
</span>
|
||||
<input
|
||||
@@ -120,13 +120,13 @@ export const ProfileForm: React.FC<ProfileFormProps> = ({ user }: ProfileFormPro
|
||||
{session.data?.user.permissions.includes("ADMIN_USER_ADVANCED") && (
|
||||
<>
|
||||
<label className="floating-label w-full">
|
||||
<span className="text-lg flex items-center gap-2">
|
||||
<span className="flex items-center gap-2 text-lg">
|
||||
<EnvelopeClosedIcon /> E-Mail
|
||||
</span>
|
||||
<input
|
||||
{...form.register("email")}
|
||||
type="text"
|
||||
className="input input-bordered w-full mb-2"
|
||||
className="input input-bordered mb-2 w-full"
|
||||
defaultValue={user?.email}
|
||||
placeholder="E-Mail"
|
||||
/>
|
||||
@@ -166,7 +166,7 @@ export const ProfileForm: React.FC<ProfileFormProps> = ({ user }: ProfileFormPro
|
||||
{session.data?.user.permissions.includes("ADMIN_USER_ADVANCED") && (
|
||||
<div className="mt-2 space-y-1">
|
||||
<p className="text-gray-400">Berechtigung Schnellauswahl</p>
|
||||
<div className="flex gap-2 justify-evenly">
|
||||
<div className="flex justify-evenly gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-sm btn-outline"
|
||||
@@ -251,7 +251,7 @@ export const ConnectionHistory: React.FC<{ user: User }> = ({ user }: { user: Us
|
||||
<div className="card-body flex-row flex-wrap">
|
||||
<div className="flex-1">
|
||||
<h2 className="card-title">
|
||||
<MixerHorizontalIcon className="w-5 h-5" /> Dispo-Verbindungs Historie
|
||||
<MixerHorizontalIcon className="h-5 w-5" /> Dispo-Verbindungs Historie
|
||||
</h2>
|
||||
<PaginatedTable
|
||||
ref={dispoTableRef}
|
||||
@@ -313,7 +313,7 @@ export const ConnectionHistory: React.FC<{ user: User }> = ({ user }: { user: Us
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h2 className="card-title">
|
||||
<PlaneIcon className="w-5 h-5" /> Pilot-Verbindungs Historie
|
||||
<PlaneIcon className="h-5 w-5" /> Pilot-Verbindungs Historie
|
||||
</h2>
|
||||
<PaginatedTable
|
||||
ref={dispoTableRef}
|
||||
@@ -396,7 +396,7 @@ export const UserPenalties = ({ user }: { user: User }) => {
|
||||
<div className="card-body">
|
||||
<h2 className="card-title flex justify-between">
|
||||
<span className="flex items-center gap-2">
|
||||
<ExclamationTriangleIcon className="w-5 h-5" /> Audit-log
|
||||
<ExclamationTriangleIcon className="h-5 w-5" /> Audit-log
|
||||
</span>
|
||||
<div className="flex gap-2">
|
||||
<PenaltyDropdown
|
||||
@@ -478,7 +478,7 @@ export const UserReports = ({ user }: { user: User }) => {
|
||||
return (
|
||||
<div className="card-body">
|
||||
<h2 className="card-title">
|
||||
<ExclamationTriangleIcon className="w-5 h-5" /> Nutzer Reports
|
||||
<ExclamationTriangleIcon className="h-5 w-5" /> Nutzer Reports
|
||||
</h2>
|
||||
<PaginatedTable
|
||||
prismaModel="report"
|
||||
@@ -528,10 +528,10 @@ export const AdminForm = ({
|
||||
return (
|
||||
<div className="card-body">
|
||||
<h2 className="card-title">
|
||||
<LightningBoltIcon className="w-5 h-5" /> Administration
|
||||
<LightningBoltIcon className="h-5 w-5" /> Administration
|
||||
</h2>
|
||||
<div className="text-left">
|
||||
<div className="card-actions pt-6 flex flex-wrap gap-2">
|
||||
<div className="card-actions flex flex-wrap gap-2 pt-6">
|
||||
<Button
|
||||
onClick={async () => {
|
||||
const { password } = await resetPassword(user.id);
|
||||
@@ -547,13 +547,13 @@ export const AdminForm = ({
|
||||
},
|
||||
);
|
||||
}}
|
||||
className="btn-sm flex-1 min-w-[250px] btn-outline btn-success"
|
||||
className="btn-sm btn-outline btn-success min-w-[250px] flex-1"
|
||||
>
|
||||
<LockOpen1Icon /> Passwort zurücksetzen
|
||||
</Button>
|
||||
{session?.user.permissions.includes("ADMIN_USER_ADVANCED") && (
|
||||
<div
|
||||
className="tooltip flex-1 min-w-[250px] tooltip-warning"
|
||||
className="tooltip tooltip-warning min-w-[250px] flex-1"
|
||||
data-tip="Dies löscht den Nutzer sofort, außerdem alle Reports, Verbindungs-Verlauf und Chat-Nachrichten"
|
||||
>
|
||||
<Button
|
||||
@@ -581,14 +581,14 @@ export const AdminForm = ({
|
||||
router.refresh();
|
||||
}}
|
||||
role="submit"
|
||||
className="btn-sm flex-1 min-w-[250px] btn-outline btn-warning"
|
||||
className="btn-sm btn-outline btn-warning min-w-[250px] flex-1"
|
||||
>
|
||||
<HobbyKnifeIcon /> Account entsperren
|
||||
</Button>
|
||||
)}
|
||||
{discordAccount && (
|
||||
<div
|
||||
className="tooltip flex-1 min-w-[250px]"
|
||||
className="tooltip min-w-[250px] flex-1"
|
||||
data-tip={`Name: ${discordAccount.username}`}
|
||||
>
|
||||
<Button
|
||||
@@ -604,7 +604,7 @@ export const AdminForm = ({
|
||||
},
|
||||
});
|
||||
}}
|
||||
className="btn-sm w-full btn-outline btn-info"
|
||||
className="btn-sm btn-outline btn-info w-full"
|
||||
>
|
||||
<DiscordLogoIcon /> Name und Berechtigungen setzen
|
||||
</Button>
|
||||
@@ -613,12 +613,12 @@ export const AdminForm = ({
|
||||
</div>
|
||||
</div>
|
||||
<h2 className="card-title">
|
||||
<ChartBarBigIcon className="w-5 h-5" /> Aktivität
|
||||
<ChartBarBigIcon className="h-5 w-5" /> Aktivität
|
||||
</h2>
|
||||
<div className="stats flex">
|
||||
<div className="stat">
|
||||
<div className="stat-figure text-primary">
|
||||
<LightningBoltIcon className="w-8 h-8" />
|
||||
<LightningBoltIcon className="h-8 w-8" />
|
||||
</div>
|
||||
<div className="stat-value text-primary">
|
||||
{dispoTime.hours}h {dispoTime.minutes}min
|
||||
@@ -630,7 +630,7 @@ export const AdminForm = ({
|
||||
</div>
|
||||
<div className="stat">
|
||||
<div className="stat-figure text-primary">
|
||||
<PlaneIcon className="w-8 h-8" />
|
||||
<PlaneIcon className="h-8 w-8" />
|
||||
</div>
|
||||
<div className="stat-value text-primary">
|
||||
{pilotTime.hours}h {pilotTime.minutes}min
|
||||
@@ -642,12 +642,12 @@ export const AdminForm = ({
|
||||
</div>
|
||||
</div>
|
||||
<h2 className="card-title">
|
||||
<ExclamationTriangleIcon className="w-5 h-5" /> Reports
|
||||
<ExclamationTriangleIcon className="h-5 w-5" /> Reports
|
||||
</h2>
|
||||
<div className="stats flex">
|
||||
<div className="stat">
|
||||
<div className="stat-figure text-primary">
|
||||
<ExclamationTriangleIcon className="w-8 h-8" />
|
||||
<ExclamationTriangleIcon className="h-8 w-8" />
|
||||
</div>
|
||||
<div className={cn("stat-value text-primary", reports.open && "text-warning")}>
|
||||
{reports.open}
|
||||
@@ -656,7 +656,7 @@ export const AdminForm = ({
|
||||
</div>
|
||||
<div className="stat">
|
||||
<div className="stat-figure text-primary">
|
||||
<Timer className="w-8 h-8" />
|
||||
<Timer className="h-8 w-8" />
|
||||
</div>
|
||||
<div className="stat-value text-primary">{reports.total60Days}</div>
|
||||
<div className="stat-title">in den letzten 60 Tagen</div>
|
||||
|
||||
Reference in New Issue
Block a user