https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790

--- Comment #3 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 201557
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201557&action=edit
Bug 42790: Unify booking actions and display across patron and biblio tables

The patron bookings tab (moremember/circulation) and the biblio
bookings page previously offered different actions and rendered
status, item and action cells with duplicated, subtly different code.

This patch introduces a shared rendering helper
(js/bookings/common.js) used by both tables, delivering:

* A unified action set gated on booking status and the logged in
  user's permissions:
    - new:    Edit + Cancel (manage_bookings), Checkout (circulate)
    - issued: no edit/cancel actions (Extend follows in a later patch)
    - completed/cancelled: no actions
* "Transform to checkout" on the biblio bookings page is renamed
  "Checkout" and the same shortcut is now offered from the patron
  bookings tab, posting the patron, barcode and booking end date
  through to the checkout screen
* The patron bookings tab gains the Edit action, opening the same
  place booking modal used elsewhere (the modal markup and assets are
  now included on moremember and circulation pages)
* For issued bookings, the Item column now also shows the checkout
  due date and a link to the checkout record (via the item.checkout
  embed, newly allowed on the biblio bookings endpoint)
* New bookings whose collection window has opened are highlighted
  with table-info; new bookings whose window has passed without
  collection are highlighted with table-warning

Both pages now expose their booking permissions through
Koha.addPermissions rather than bare globals.

Test plan:
1) yarn api:bundle && restart_all
2) Create a booking; confirm the patron bookings tab (patron details
   and checkout pages) shows Edit, Cancel and Checkout actions, and
   that the biblio bookings page shows the same
3) Confirm Edit opens the booking modal pre-populated on all pages
4) Click Checkout and confirm the checkout screen is pre-populated
   with the patron and item, and the due date defaults to the
   booking end date
5) Check out a booked item; confirm the Item column shows the due
   date and a link to the checkout on both displays
6) Create bookings with past start/end dates; confirm the row
   highlights appear on both displays

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to