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

--- Comment #10 from ChloĆ© Zermatten <[email protected]> ---
Created attachment 208166
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208166&action=edit
Bug 39756: refactor: extract to plain js module

Split the js logic used by the circulation triggers UI
between a store and a plain js module, based on
whether methods do or do not affect state.

The test plan here is the same as for "Bug 39756:
feat(staff-UI): manage long overdue rules", because
this is a pure refactore with no functionality change.
The intent is code maintainability.

Test plan:

1. Apply the patch, ensure you rebuild and reload the JS code.
2. Go to Administration > Circulation triggers, and notice four new
   columns: Set Lost Value, Charge Replacement Cost, Mark as returned,
   Forgive overdue fine.
3. Add a trigger for the default context with a delay, and set:
    - lost value to 'Lost'
    - charge replacement cost to 'Yes'
    - mark as returned to 'No'
    - forgive overdue fine to 'Yes'
   Save, and notice the trigger shows those four values.
4. Select a specific library, and notice the values are shown as
   inherited from the default rule (fallback styling).
5. Edit the trigger for that library and set lost value to 'Missing'.
   Save, and notice the library shows 'Missing' while the default
   still shows 'Lost'.
6. Edit it again and set lost value to 'No lost value'. Save, and
   notice the library shows no lost value rather than 'Lost'.
7. Reset the library's rule set, and notice the impact preview lists
   the four rules among the values being removed. Confirm, and notice
   the library falls back to the default's values again.
8. Click delete on the default trigger, and notice the deletion preview
   lists the four values.

Sponsored-by: Black Hills Library Consortium- http://www.rcgov.org/Library/
Assisted-by: Claude Opus 5 (Anthropic)

-- 
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