perf: improve get bookings performance (#16303)
* refactor: improve get bookings performance * feat: use map to optimise * chore: save * chore: add authorization * chore: remove condition * chore: improvements * chore * chore: remove return * chore: use Promise.all --------- Co-authored-by: Syed Ali Shahbaz <[email protected]>
This commit is contained in:
1 parent
cd06141816
commit
4497c4ce0b
3 files changed
+105
-65
No files matched your search
@@ -598,9 +598,7 @@ function BookingListItem(booking: BookingItemProps) {
|
||||
<td className="flex w-full flex-col flex-wrap items-end justify-end space-x-2 space-y-2 py-4 pl-4 text-right text-sm font-medium ltr:pr-4 rtl:pl-4 sm:flex-row sm:flex-nowrap sm:items-start sm:space-y-0 sm:pl-0">
|
||||
{isUpcoming && !isCancelled ? (
|
||||
<>
|
||||
{isPending && (userId === booking.user?.id || booking.isUserTeamAdminOrOwner) && (
|
||||
<TableActions actions={pendingActions} />
|
||||
)}
|
||||
{isPending && <TableActions actions={pendingActions} />}
|
||||
{isConfirmed && <TableActions actions={bookedActions} />}
|
||||
{isRejected && <div className="text-subtle text-sm">{t("rejected")}</div>}
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user