Bugfix/opt in booking shown on attendee booking page (#2026)

This commit is contained in:
Joe Au-Yeung 2022-03-04 05:04:05 -05:00 committed by GitHub
parent 6687544e66
commit b77923fc65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -170,7 +170,9 @@ function BookingListItem(booking: BookingItem) {
<td className="whitespace-nowrap py-4 text-right text-sm font-medium ltr:pr-4 rtl:pl-4">
{isUpcoming && !isCancelled ? (
<>
{!booking.confirmed && !booking.rejected && <TableActions actions={pendingActions} />}
{!booking.confirmed && !booking.rejected && user!.id === booking.user!.id && (
<TableActions actions={pendingActions} />
)}
{booking.confirmed && !booking.rejected && <TableActions actions={bookedActions} />}
{!booking.confirmed && booking.rejected && (
<div className="text-sm text-gray-500">{t("rejected")}</div>

View File

@ -386,6 +386,11 @@ const loggedInViewerRouter = createProtectedRouter()
},
status: true,
paid: true,
user: {
select: {
id: true,
},
},
},
orderBy,
take: take + 1,