OBLS-940 Refresh putaway candidates and fix putaway location entry - #443
Open
olewandowski1 wants to merge 1 commit into
Open
OBLS-940 Refresh putaway candidates and fix putaway location entry#443olewandowski1 wants to merge 1 commit into
olewandowski1 wants to merge 1 commit into
Conversation
Putaway Candidates only fetched in componentDidMount, so returning from a completed putaway showed a stale list, and the filtered rows were held in state that a refresh never recomputed. Converted the screen to a function component so it refetches on focus and derives the visible list from the fetched data, which removes both stale paths. The unreachable "already in a pending putaway" alert is gone, since the READY filter already excludes every row that has an id. Putaway Item Detail could not complete a putaway at all. The scan field was rendered with editable false and the screen had no scan listener, so scannedPutawayLocation stayed empty and validatePutawayItem rejected every submission. It now uses ScannerInput for hardware scans, manual typing and the destination bin search, and Confirm is gated on a location being present instead of failing server side. The root cause of the dead search and Confirm buttons was the bare ScrollView, which defaults keyboardShouldPersistTaps to never, so the first tap was consumed dismissing the keyboard while the input held focus. Every sibling screen sets this prop; this one did not, and the previous non editable field hid it. Completing a putaway now drops the row immediately. The backend defers the product availability refresh, so the candidates response still reports the old quantity for a while after the transfer. An override keyed on bin, lot and product records the expected remaining quantity and is discarded once the server reports a quantity at or below it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Jira ticket: OBLS-940
Changes
useFocusEffect, matching the pattern inPutawayTaskListScreen.filteredPutawayCandidatesstate is gone. The visible list is auseMemoover the fetched candidates and the search term, so it cannot go stale.refreshingis cleared on request completion instead of on a Redux reference change.READYfilter already excludes every row that has an id.connectprop types with aPutawayCandidateinterface, so the screen is no longeranytyped throughout.ScannerInputfor hardware scans, manual typing via the keyboard toggle, and a destination bin search.searchTypeisdestinationBin, which excludesRECEIVE_STOCKbins and so lists only valid putaway destinations.