fixes
This commit is contained in:
@@ -48,7 +48,7 @@ export const KursItem = ({
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<div className="flex col-span-2 justify-end">
|
||||
{event.finishedBadges.map((b) => {
|
||||
return <Badge name={b} key={b} />;
|
||||
})}
|
||||
|
||||
@@ -94,22 +94,21 @@ const ModalBtn = ({
|
||||
date.id === selectAppointmentForm.watch("eventAppointmentId") ||
|
||||
selectedAppointment?.id,
|
||||
);
|
||||
const ownIndexInParticipantList =
|
||||
(selectedDate as any)?.Participants?.findIndex(
|
||||
(p: Participant) => p.userId === user.id,
|
||||
) || (selectedDate as any)?.Participants?.length + 1;
|
||||
const ownIndexInParticipantList = (
|
||||
selectedDate as any
|
||||
)?.Participants?.findIndex((p: Participant) => p.userId === user.id);
|
||||
|
||||
const ownPlaceInParticipantList =
|
||||
ownIndexInParticipantList === -1
|
||||
? (selectedDate as any)?.Participants?.length + 1
|
||||
: ownIndexInParticipantList + 1;
|
||||
|
||||
console.log(
|
||||
console.log({
|
||||
selectedDate,
|
||||
ownPlaceInParticipantList > event.maxParticipants!,
|
||||
ownPlaceInParticipantList,
|
||||
event.maxParticipants,
|
||||
);
|
||||
ownIndexInParticipantList,
|
||||
maxParticipants: event.maxParticipants,
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user