Scan Item Missing Pieces Angular Port

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

Bug Description

Evergreen 3.5 / Wishlist

LP for porting the "Scan Item As Missing Pieces" interface to Angular.

[ I'm working on some local additions, so I thought I'd port it to Angular first so I don't have to repeat the changes. ]

The code in progress expands a bit on the existing interface in that it shows title/author/callnum of the item in question (in addition to scanned barcode) as part of the staff confirmation, before proceeding with the missing pieces call.

Note the Scan As Missing Pieces API uses action/trigger templates for generating the optional slips and letters, so no changes are required to the print templates for the Angular port.

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

The Code:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1865898-item-missing-pieces-angular

Note the code includes a new standalone Angular <eg-patron-penalty-dialog /> component for applying penalties/messages to patrons.

tags: added: pullrequest
Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Bill Erickson (berick)
Changed in evergreen:
milestone: 3.next → 3.6-beta
Revision history for this message
Mike Rylander (mrylander) wrote :

I'm getting the following in the dev console when putting this atop master:

ERROR Error: Uncaught (in promise): Error: Cannot find module '@eg/staff/cat/item/item.module'
Error: Cannot find module '@eg/staff/cat/item/item.module'
    at $_lazy_route_resource lazy namespace object:31
    at ZoneDelegate.invoke (zone-evergreen.js:364)
    at Object.onInvoke (core.js:27148)
    at ZoneDelegate.invoke (zone-evergreen.js:363)
    at Zone.run (zone-evergreen.js:123)
    at zone-evergreen.js:857
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:27136)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at drainMicroTaskQueue (zone-evergreen.js:569)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484)
    at invokeTask (zone-evergreen.js:1621)
    at HTMLAnchorElement.globalZoneAwareCallback (zone-evergreen.js:1647)
    at resolvePromise (zone-evergreen.js:798)
    at resolvePromise (zone-evergreen.js:750)
    at zone-evergreen.js:860
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:27136)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at drainMicroTaskQueue (zone-evergreen.js:569)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484)
    at invokeTask (zone-evergreen.js:1621)
    at HTMLAnchorElement.globalZoneAwareCallback (zone-evergreen.js:1647)
defaultErrorLogger @ core.js:4197
handleError @ core.js:4245
next @ core.js:27699
schedulerFn @ core.js:24537
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.js:24527
(anonymous) @ core.js:27171
invoke @ zone-evergreen.js:364
run @ zone-evergreen.js:123
runOutsideAngular @ core.js:27075
onHandleError @ core.js:27171
handleError @ zone-evergreen.js:368
runGuarded @ zone-evergreen.js:136
api.microtaskDrainDone @ zone-evergreen.js:670
drainMicroTaskQueue @ zone-evergreen.js:576
invokeTask @ zone-evergreen.js:484
invokeTask @ zone-evergreen.js:1621
globalZoneAwareCallback @ zone-evergreen.js:1647

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

Thanks, Mike. This one badly needs a rebase. Rebasing...

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

This does seem happy now. Thanks, Bill!

Changed in evergreen:
milestone: 3.6-beta → 3.next
Revision history for this message
Mike Risher (mrisher) wrote :

I tested this and compared it with the old interface. I see the new UI displays more info before letting you confirm you want to mark item as missing pieces. The old interface seems to have a flaw where the item status is still "checked out" afterwards. The new UI changes the status to "Damaged", so that looks like an improvement.

Once you finish, if you want to want to mark a second item as damaged, and you select Circulation > Scan Item as Missing Pieces, the new UI doesn't clear the barcode. The old UI does clear it. Seems like a minor issue that i'm not sure will interfere with workflow.

I've tested and consent to signing off with my name Mike Risher and my email <email address hidden>

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

Thanks, Mike.

Here's a rebased branch which address the multi-use scenario.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1865898-item-missing-pieces-angular-v3

Specifcially, from the commit:

After an item is marked as missing pieces, select/focus the barcode input so another item can easily be marked as missing pieces without having to manually clear the form / reload the page.

Tweaks the "Cancel" button to use the text "Reset Form" once the current item has been processed, since it can no longer be canceled, but the form can be forceably cleared if desired.

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

Removing 'signedoff' tag since a new commit was added.

Revision history for this message
Mike Risher (mrisher) wrote :

I loaded the new commit onto my test server and tried out the "Reset Form" button. I was able to mark multiple items as "missing pieces" without having to reload the page.

My tests were successful so I consent to sign off on this with my name Mike Risher and email address <email address hidden>

tags: added: signedoff
Michele Morgan (mmorgan)
Changed in evergreen:
milestone: 3.next → 3.7-beta
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master for inclusion in 3.7. Thanks, Bill and Mike!

Noting that this will probably need a big of tweaking when bug 1846354 is merged.

Changed in evergreen:
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.