-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
6752: Add support for shipment containers r=jmcameron a=jmcameron Adds support for breaking up a shipment into containers. Each container could hold one or more shipment items. This PR also adds predefined container types, based on feedback from a current project. This PR also adds documentation about containers to the shipments documentation. **DESIGN GOALS** - You should be able to create shipments like in the past with no containers. - If you add a container, all shipment items not assigned to a container will be assigned to it - If you have already created a container, all new shipment items will be added to the last container created. - If you create a new shipment and add container(s) to it and then abandon it, no containers are created in the database **NOTES** - The shipment document has not been updated for containers yet. That will be done in a future PR. - Although the container types seem comprehensive, new types can be added by SQL updates. If we decide that we need the ability to create new container types by users, we can implement that later. - I have not tested this PR for migrations **HOW TO USE CONTAINERS** ![container](https://user-images.githubusercontent.com/62145/180396208-31e73fb5-987d-4ff7-aff1-2bd29beaa532.png) There are 4 new controls available in the shipments interface 1. [+ New Container] button -- Creates a new container (with a modal) 2. [Containers] button -- A drop-down menu of operations that can be performed on the containers for this shipment. Note that this button will not be shown if there are no containers. The operations available are **Edit**, **Assign items**, and **Delete** ![container-ops](https://user-images.githubusercontent.com/62145/180396556-35740b41-c1e1-4831-a85b-4749210b7ca8.png) 4. Container choice - This shows which container is selected for the shipment item. (Not visible if there are no containers) 5. Multiple item select checkbox - You can assign any shipment items (lots) by using this checkbox and then using the "Assign Lots" option for the desired container in the container operations menu. Closes #6740 Closes #6753 **TESTING SUGGESTIONS** - Use bhima_test - Download the attached SQL test file (and rename from .sql.txt to .sql) to use during testing to verify that the correct items are being created in the database during the testing operations - Try creating a shipment without a container. It should work as it did before. -Try various sequences of adding containers and items - Create a new shipment, add item(s), then create a container. note that the the previous items are automatically added to the container. Click [Submit] to save the shipment. - Try the attached `shiptest.sql` file to verify that the container is created as expected. - Create a new shipment, create a container, then add items. the new items should be added to the last container created. Save the new shipment - Try the attached `shiptest.sql` file to verify that the new shipment and container is created as expected. - Try creating a shipment with items and containers. Then abort (press the [Clear] button at the bottom of the form. - Try the attached `shiptest.sql` file to verify that no new shipments or containers were created - Edit an existing shipment and try the various container operations. [shiptest.sql.txt](https://github.com/IMA-WorldHealth/bhima/files/9166077/shiptest.sql.txt) Co-authored-by: Jonathan Cameron <jmcameron@gmail.com>
- Loading branch information
Showing
31 changed files
with
1,179 additions
and
132 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.