futher booking stuff

This commit is contained in:
PxlLoewe
2025-09-20 22:16:23 +02:00
parent ba027957ce
commit cf199150fe
8 changed files with 50 additions and 58 deletions

View File

@@ -86,18 +86,15 @@ export const BookingTimelineModal = ({
// Check if user can delete a booking
const canDeleteBooking = (bookingUserPublicId: string) => {
if (!currentUser) return false;
if (currentUser.permissions.includes("ADMIN_BOOKING")) return true;
// User can delete their own bookings if they meet basic requirements
if (
bookingUserPublicId === currentUser.publicId &&
currentUser.emailVerified &&
!currentUser.isBanned
) {
if (bookingUserPublicId === currentUser.publicId) {
return true;
}
// Admins can delete any booking
return currentUser.permissions.includes("ADMIN_KICK");
return false;
};
const navigate = (direction: "prev" | "next") => {
@@ -240,6 +237,8 @@ export const BookingTimelineModal = ({
const groupedBookings = groupBookingsByResource();
console.log("Grouped Bookings:", groupedBookings);
return (
<div className="modal modal-open">
<div className="modal-box flex max-h-[83vh] w-11/12 max-w-7xl flex-col">