https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43522
Bug ID: 43522
Summary: Add locale-aware address display to PatronSelect
option rows
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Patrons
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
Depends on: 43518
Target Milestone: ---
Bug 43518 added a plain city/country summary to PatronSelect's matching-option
rows (patronToOption()'s _city/_country fields), deliberately simplified from
the legacy autocomplete's address display.
The legacy patron_autocomplete() dropdown (staff-global.js) shows a fully
formatted address via $format_address(), which is not a static function --
it is generated per-page by js-patron-format-address.inc, a Template-Toolkit
include that embeds a server-resolved authorised-values map
(AuthorisedValues.Get('ROADTYPE')) and picks between locale-specific address
formatters (US style, DE style, etc., driven by a syspref). Reproducing that
faithfully client-side needs either an additional client-side authorised-value
lookup or a duplicated set of locale-specific formatters -- a materially
bigger lift than the rest of bug 43518's parity work, so it was deferred
rather than descoped silently.
This bug tracks doing that properly, if/when there is a concrete need for it
in a PatronSelect-based screen:
1. Decide how road-type and other authorised-value-backed address fields get
resolved client-side (e.g. embed via the patron API response, or fetch
authorised values through the existing AVAPIClient).
2. Port (or share) the locale-specific address assembly rules from
js-patron-format-address.inc.
3. Extend patronToOption() with a richer _address field (or similar) and
update PatronSelect.vue's option row template.
Test plan:
1. Apply on top of bug 43518.
2. Configure at least two different address-format locales (e.g. via the
relevant syspref) and confirm PatronSelect's option rows render the
address the same way the legacy patron_autocomplete() dropdown does for
each.
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43518
[Bug 43518] Add a reusable PatronSelect Vue component with patron search
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/