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

--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 203676
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203676&action=edit
Bug 43306: Migrate catalogue/detail.tt to use api-client.js for bundled items

This patch replaces raw jQuery.ajax() DELETE calls for unbundling
items with the api-client.js pattern.

Changes:
- Add bundled_items.remove method to ItemAPIClient (accepts params
  for return_response override)
- Replace inline table unlink button DELETE call
- Replace modal-based remove-from-bundle DELETE call, preserving
  the detailed error handling (409/404 status checks) by using
  return_response: true to get the raw Response object

Test plan:
1. Apply patch
2. Go to a record with bundled items
3. Click the unlink button on a bundled item in the items table
=> SUCCESS: Item removed from bundle
4. Open the "Remove from bundle" modal, scan a barcode
=> SUCCESS: Item removed, success message shown
5. Test error cases (checked out bundle, non-existent barcode)
=> SUCCESS: Appropriate error messages displayed
6. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to