Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: Create booking via asset page #851

Closed
jurrejansen opened this issue Mar 18, 2024 · 5 comments · Fixed by #1168
Closed

[Feature request]: Create booking via asset page #851

jurrejansen opened this issue Mar 18, 2024 · 5 comments · Fixed by #1168
Assignees
Labels
Priority: Medium Issues that are with medium priority User requested feature

Comments

@jurrejansen
Copy link

Contact Details

[email protected]

Is your feature request related to a problem? Please describe?

This was requested by Leonardo from Laerdal Medical.

The ability to book an asset from “within” the asset. (i.e. I open an asset page and I can directly create a booking with that asset from there, without having to open the booking page and create a new booking with that particular asset)

@DonKoko we discussed this briefly via Discord.

Describe the solution you'd like

SCENARIO
https://www.figma.com/file/ykvc0MhPeNLsrJ4tJsKosQ/Shelf-%7C-UX-Scenarios?type=design&node-id=4478-29320&mode=design

This feature should work for both Administrators and Self-service users. Of course Self-service user can only select themselves as Custodian.

  • Add a Book button on the asset page
  • Clicking the Book button opens a Create booking modal
  • User fills Name, Booking period and Custodian
  • User clicks Create booking
  • User gets redirected to the newly created Draft booking with Name, Booking period and Custodian fields filled
  • Also the asset is already added to the booking (if warning labels shows it indicates the asset is already booked during booking period or in custody)

From there they can further configure the booking if needed

  • The Book button should be hidden on asset page when is marked as 'Unavailable for bookings'

Describe alternatives you've considered

No response

Additional context

No response

@carlosvirreira
Copy link
Contributor

An alternative for this could be to enable scanning of tags on the booking create flow?

@DonKoko DonKoko added the Priority: Medium Issues that are with medium priority label Mar 27, 2024
@DonKoko
Copy link
Contributor

DonKoko commented Jul 12, 2024

In terms of technical implementation:

  1. Clicking on Book button will lead to bookings.new
  2. We sent some search params with the assetId.
  3. In the booking.new loader, we parse those search params and use the assetId if present when creating the booking to already link it to assets. Note: This should support an array of assetIds. That way we can also use it in bulk actions.

@Bhavyajain21
Copy link
Contributor

@DonKoko , I'd like to work on this. Please assign!

@DonKoko DonKoko assigned Bhavyajain21 and unassigned DonKoko Jul 12, 2024
@DonKoko DonKoko linked a pull request Jul 15, 2024 that will close this issue
@carlosvirreira
Copy link
Contributor

Nice release. Functionality works great. Only concern I have that I did not voice earlier is the focus on booking as a primary action on the page. At some point I might request to move the book cat under actions. But, not relevant for now.

@DonKoko
Copy link
Contributor

DonKoko commented Jul 17, 2024

@carlosvirreira @jurrejansen btw I added it also for kits. So it works there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Issues that are with medium priority User requested feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants