-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
B-21569-INT 2 #14577
B-21569-INT 2 #14577
Conversation
Instead of inserting them as we encounter them in the proc, collect them into a temp table, sort them, and then insert.
from just "International UB".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I like this approach of adjusting the stored proc for a UI ordering issue.
I know we do have the sort
value in the re_service_items
table that would fix this issue if we can leverage that in the UI. Can you take a look at that approach and passing that sort
value to the service item payload that's being used in the MTO tab?
Another option would be to add a variable that we can use to handle sorting based on shipment type and market code.
Feel free to share your thoughts! Not trying to derail your PR, but I do think we can use existing data we have and/or create a UI variable we can use for sorting.
I looked at it as if the data being inserted out of order was the underlying issue. I am using the re_service_items.sort value now in the proc, but if that's not ideal I'll look into bringing that into the UI layer. |
Would you mind looking into bringing that value into the UI as an alternate approach? I would much prefer that - let me know if it gets too wild or something and I'll reconsider! Thank you! |
Include the sort field in listMTOServiceItems operation. Update the sorting logic in ServiceItemsTable.jsx. Remove my changes to the stored procedure. Move testing from shipment_approver to the service and UI tests.
Updated Edit: Happo is showing some errors with my sort comparison. I'll see what's happening. |
added test and ensure nulls are sorted After those with sort values.
Add logic in model_to_payload to match on ShipmentType and MarketCode. Update test to use matching shipment info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! Thanks for going with this approach! Just one little test and the rest looks good!
@stevengleason-caci there is a guide for getting away from these "legacy" directories. Frontend File Layout Guide. I see there is a |
The files in src/utils/ all seem pretty specific. Should I make a new one, strings.js or stringUtils.js or something? |
Sounds good to me. |
additional test in model_to_payload_test, no need to compare to blank strings because those are non-null DB enums, fix the multiple joins on the MTOServiceItem query, remove the unneeded UUID generation in mto_service_items_test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might want to update your main B-21569 branch with the latest from main because I was running your latest changes with a fresh merge from main on my branch (B-21659) and I get a crash when I approve the requested shipment as a TOO.
ERROR ghcapi/mto_shipment.go:531 ghcapi.ApproveShipmentHandler {"git_branch": "MAIN-B-21659_Display_estimated_prices_UB", "git_commit": "3f08f4a4ee05e5d6ac8672256c000b565d868ef2", "host": "officelocal:3000", "milmove_trace_id": "87d79eac-ffe8-4f6a-8292-782605d236d5", "session_id": "ioprjFRnZx9Nk4vnAC3D5VEbWRmpS5BJMQC-Qq6r1lo", "error": "error creating approved service items: pq: Error creating POEFSC service item for shipment 8c948d8b-7c73-49c9-8e68-050e7f36dcbd: Service item already exists for service_id f75758d8-2fcd-40ba-9432-3ff3032a71d1 and shipment_id 8c948d8b-7c73-49c9-8e68-050e7f36dcbd"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working well for me. Thanks for all the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding that test!
ccdf409
into
integrationTesting
B-21569 INT Part 2
B-21569
Summary
Fix the order of the service items. I did this by retrieving the sort column and using that in the jsx code.
I also changed "International UB" to "International UB price."
Previous PR: #14491
Verification Steps for the Author
These are to be checked by the author.
Verification Steps for Reviewers
These are to be checked by a reviewer.
Setup to Run the Code
How to test
a. International UB price
b. International POD Fuel Surcharge
c. International UB pack
d. International UB unpack
a. International UB price
b. International UB pack
c. International UB unpack
Frontend
officeApp
class or custommin-width
styling is used to hide any states the would not be visible to the user.Backend
Database
Any new migrations/schema changes:
Screenshots
CONUS-OCONUS with POE FSC
OCONUS-CONUS with POD FSC
OCONUS-OCONUS (no FSC)