futher booking stuff
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user