Finished Hub ESLINT rule enforcement

This commit is contained in:
PxlLoewe
2025-07-09 23:26:09 -07:00
parent 98ed0cb5ca
commit eec72a51b8
26 changed files with 199 additions and 195 deletions

View File

@@ -1,5 +1,5 @@
import { Event, Participant } from "@repo/db";
import { EventAppointmentOptionalDefaults } from "@repo/db/zod";
import { EventAppointmentOptionalDefaults, InputJsonValueType } from "@repo/db/zod";
import { ColumnDef } from "@tanstack/react-table";
import { useSession } from "next-auth/react";
import { RefObject, useRef } from "react";
@@ -45,7 +45,7 @@ export const AppointmentModal = ({
</button>
</form>
<h3 className="font-bold text-lg">Termin {appointmentForm.watch("id")}</h3>
<form
onSubmit={appointmentForm.handleSubmit(async (values) => {
if (!event) return;
@@ -55,13 +55,13 @@ export const AppointmentModal = ({
})}
className="flex flex-col"
>
<DateInput
control={appointmentForm.control}
name="appointmentDate"
showTimeInput
timeCaption="Uhrzeit"
showTimeCaption
/>
<div className="flex justify-between mr-7">
<h3 className="font-bold text-lg">Termin {appointmentForm.watch("id")}</h3>
<DateInput
value={new Date(appointmentForm.watch("appointmentDate") || Date.now())}
onChange={(date) => appointmentForm.setValue("appointmentDate", date)}
/>
</div>
<div>
<PaginatedTable
hide={appointmentForm.watch("id") === undefined}
@@ -150,7 +150,7 @@ export const AppointmentModal = ({
attended: false,
appointmentCancelled: true,
statusLog: [
...(row.original.statusLog as any),
...(row.original.statusLog as InputJsonValueType[]),
{
event: "Gefehlt an Event",
timestamp: new Date().toISOString(),
@@ -169,7 +169,7 @@ export const AppointmentModal = ({
);
},
},
] as ColumnDef<Participant, any>[]
] as ColumnDef<Participant>[]
}
prismaModel={"participant"}
filter={{

View File

@@ -59,9 +59,7 @@ export const ParticipantModal = ({ participantForm, ref }: ParticipantModalProps
if (!participantForm.watch("id")) return;
const participant = participantForm.getValues();
await handleParticipantFinished(participant.id.toString()).catch((e) => {
const error = e as AxiosError;
});
await handleParticipantFinished(participant.id.toString()).catch(() => {});
toast.success("Workflow erfolgreich ausgeführt");
router.refresh();
@@ -119,10 +117,10 @@ export const ParticipantModal = ({ participantForm, ref }: ParticipantModalProps
<div className="flex flex-col">
<h3 className="text-xl">Verlauf</h3>
{(participantForm.watch("statusLog") as unknown as ParticipantLog[])?.map((s) => (
<div className="flex justify-between" key={(s as any).timestamp}>
<div className="flex justify-between" key={s.timestamp.toString()}>
<p>{s.event}</p>
<p>{s.user}</p>
<p>{new Date((s as any).timestamp).toLocaleString()}</p>
<p>{new Date(s.timestamp).toLocaleString()}</p>
</div>
))}
</div>