TJK: Document upload in putaway flow#4
Open
deeonwuli wants to merge 4 commits into
Open
Conversation
- Implemented a new controller `CustomPutawayDocumentController` to handle document listing and uploading for putaways. - Added routes in `UrlMappings.groovy` for document upload and retrieval. - Created `CustomPutawayDocumentService` to manage document-related business logic. - Updated `PutawayService` to validate document requirements during putaway completion. - Introduced a new React component `SupportingDocumentsPanel` for handling document uploads in the UI. - Added tests for the `SupportingDocumentsPanel` to ensure proper functionality and error handling. - Updated internationalization files to include messages related to document requirements and errors. - Refactored existing API utility functions to support the new document handling logic.
gqcorneby
approved these changes
May 21, 2026
gqcorneby
left a comment
There was a problem hiding this comment.
Nice, thanks @deeonwuli! Works great! Just one minor thing, non-blocking.
src/js/custom/stockTransferDocuments/components is now used in stock transfers and putaways. Maybe we can rename the folder to just supportingDocuments.
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.
📌 References
📝 Implementation
StockTransferDocumentsPanel.jsx→SupportingDocumentsPanel.jsx(component, SCSS file, BLOCK class, test all renamed).entityId(replacesstockTransferId),apiBasePath,requiredWarning, panel is now entity-agnostic.utils/api.js) parameterised by base path instead of hardcoding /api/custom/stockTransfers.org.pih.warehouse.custom.putawayDocuments.*:CustomPutawayDocumentService— thin wrapper that resolves Putaway.id → Order.get(id) and delegates to the already-generic CustomStockTransferDocumentServiceCustomPutawayDocumentControllerexposingGET /api/custom/putaways/{id}/documentsandPOST /api/custom/putaways/{id}/documents(multipart), mirroring the stock-transfer controller.grails-app/controllers/org/pih/warehouse/UrlMappings.groovy.SupportingDocumentsPaneladded on putaway completion page✨ Description of Change
Add a "Supporting documents" panel to the Putaway completion step that requires at least one document attached before "Complete Putaway" is allowed, gated by the existing
REQUIRE_TRANSFER_IN_DOCUMENTactivity code on the destination warehouse. Reuses the panel, service, and document storage (Order.documents) introduced by the stock-transfer-documents feature.📷 Screenshots & Recordings (optional)
Screen.Recording.2026-05-19.at.19.08.10.mov
🔥 Notes to the tester
To run
#869dbr57h