Angular copy location selector component

Bug #1850555 reported by Bill Erickson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Evergreen 3.4

I propose a dedicated <eg-copy-location-select /> component with custom handling similar to the Dojo AutoFieldWidget copy select logic.

It would be built upon eg-combobox and provide options for filtering the location set by e.g. owning lib (explicitly or via permission check) and will display the owning lib shortname along with each value so users can differentiate.

Other features, suggestions welcome.

Revision history for this message
Galen Charlton (gmc) wrote :

Have a look at eg-multi-select, whose current sole use is for selecting a set of item locations in the carousels admin page. Obviously, a dedicated eg-copy-location-select (or should it be called eg-item-location-select nowadays?) would be for selecting exactly one item location, but hopefully there can be a bit of cross-pollination. At the very least, we should make sure that styling is consistent.

Also, I note that on account of config.circ_matrix_matchpoint and the like that it should be possible to use the component to set the item location to null.

Revision history for this message
Jane Sandberg (sandbergja) wrote :

To Galen's point about consistent terminology, the official term from bug 1538691 is "Shelving Location". :-)

Revision history for this message
Bill Erickson (berick) wrote :

Thanks for the input, all. Looking at this now.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Revision history for this message
Bill Erickson (berick) wrote :

Component code pushed:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp850555-item-loc-select

The input is <eg-item-location-select /> and it uses "Shelving Location..." for its placeholder.

It's built atop a combobox, so it's possible to set the value to null. The caveat there is that taking focus off of an empty combobox by clicking elsewhere clears the value, while tabbing away selects the first value in the list. This will be the target of a separate combobox-specific LP.

tags: added: pullrequest
Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
milestone: none → 3.5-alpha
Revision history for this message
Bill Erickson (berick) wrote :

Note the above code includes a sandbox page example.

Revision history for this message
Galen Charlton (gmc) wrote :

Thanks, Bill. Here's my feedback:

* If the permissions filter returns no working OUs, the acpl search fails with an error.
* The above was noted in the sandbox when testing with a non-superuser; the CREATE_WORKSTATION permission doesn't exist
* REGISTER_WORKSTATION does, of course, but UPDATE_COPY might be better for the purpose of the sandbox, as it more clearly shows differences between locations available to a circulator (who has UPDATE_COPY at the branch level by default) vs. those available to a cataloger (who has it at the system level)
* However, there's yet another glitch there: if the location is currently set to a value that the user doesn't have permission to access, the selector displays a blank selected value. The current value should always be display. "Stacks" is a great example here.
* It would be good if the location selector displayed the org unit (short)name after the location name for the selected location, not just the list entries.
* It might be nice to have an explicit option in the selection list for setting the location to null; this presumably would need a corresponding eg-item-location-select option to control whether to allow null in the first place.
* typo in a comment: "owneed"

tags: added: needsrepatch
Revision history for this message
Bill Erickson (berick) wrote :

removing pullrequest pending repatch.

tags: removed: pullrequest
Michele Morgan (mmorgan)
Changed in evergreen:
milestone: 3.5-beta → 3.next
Bill Erickson (berick)
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Revision history for this message
Bill Erickson (berick) wrote :

Thanks for the feedback, Galen!

I've pushed a new branch to address all of the noted issues and to rebase to current master:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp850555-item-loc-select-1

tags: added: pullrequest
removed: needsrepatch
Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Bill Erickson (berick)
Changed in evergreen:
milestone: 3.next → 3.6-beta
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thank you, Bill and Galen. It works well for me, and I think we'll be able to build some cool stuff with this component. Pushed to master for inclusion in 3.6

Changed in evergreen:
assignee: Jane Sandberg (sandbej) → nobody
importance: Undecided → Wishlist
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.