Skip to content

Commit

Permalink
Merge pull request #1076 from Shelf-nu/1069-bug-cannot-asset-to-an-un…
Browse files Browse the repository at this point in the history
…available-kit-although-the-kit-is-available

Fixing issue with adding assets to a kit that is part of booking
  • Loading branch information
DonKoko authored Jun 19, 2024
2 parents 65fd37d + 4c9dddf commit 71f6a7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/routes/_layout+/kits.$kitId.manage-assets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ export async function action({ context, request, params }: ActionFunctionArgs) {
const disallowedBookingStatus: BookingStatus[] = [
BookingStatus.ONGOING,
BookingStatus.OVERDUE,
BookingStatus.RESERVED,
];
const kitBookings =
kit.assets.find((a) => a.bookings.length > 0)?.bookings ?? [];
Expand Down
12 changes: 11 additions & 1 deletion app/routes/_layout+/kits.$kitId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,17 @@ export default function KitDetails() {
)
: kit.status === "AVAILABLE";

const canManageAssets = kitIsAvailable && !isSelfService;
const kitBookings =
kit.assets.find((a) => a.bookings.length > 0)?.bookings ?? [];

const canManageAssets =
kitIsAvailable &&
!isSelfService &&
!kitBookings.some((b) =>
(
[BookingStatus.ONGOING, BookingStatus.OVERDUE] as BookingStatus[]
).includes(b.status)
);

return (
<>
Expand Down
4 changes: 2 additions & 2 deletions docs/sso/providers/google-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This is a very important step. Click on _DOWNLOAD METADATA_ and save the file th

![step-4](../../img/google-workspace-step-4.png)

It's very important to send this file to your support contact at Supabase to complete the SSO setup process. If you're not sure where to send this file, you can always reach us at [[email protected]](mailto:[email protected]).
It's very important to send this file to your support contact at Shelf to complete the SSO setup process. If you're not sure where to send this file, you can always reach us at [[email protected]](mailto:[email protected]).

> [!IMPORTANT]
> Make sure the certificate as shown on screen has at least 1 year before it expires. Mark down this date in your calendar so you will be reminded that you need to update the certificate without any downtime for your users.
Expand Down Expand Up @@ -61,7 +61,7 @@ This information needs to be entered into Shelf before SSO is activated end-to-e

Wait for confirmation that this information has successfully been added to Shelf. It usually takes us 1 business day to configure this information for you.

In the meantime, you can continue with the next steps that will show you how to setup your
In the meantime, you can continue with the next steps that will show you how to setup your groups and users.

## Step 8: Create groups and assign users [#](#step-8-create-groups-and-assign-users)

Expand Down

0 comments on commit 71f6a7a

Please sign in to comment.