[SSF-129] add tracking link and shipping cost to order#95
[SSF-129] add tracking link and shipping cost to order#95
Conversation
dburkhart07
left a comment
There was a problem hiding this comment.
Few small things. Can you update the frontend type for Order too while you're at it?
dburkhart07
left a comment
There was a problem hiding this comment.
Approving for now with a question for @Yurika-Kan and @sam-schu.
Perhaps, in the service function, do we want to make sure that we are not putting a tracking link and shipping cost on a pending order? I imagine the flow is that we would never want to call this endpoint on a pending order (if its going from pending to shipped, id imagine we would first call updateStatus and then this one, to which we could still implement this).
Yurika-Kan
left a comment
There was a problem hiding this comment.
initial comments! side note github actions looking good >o<
| .createQueryBuilder() | ||
| .update(Order) | ||
| .set({ | ||
| trackingLink: dto.trackingLink, |
There was a problem hiding this comment.
note (for future): missing service tests for updateTrackingAndCost - for later (or soon...) rewriting tests with new structure
this is a good catch - i agree. i'm thinking we could approach this in 2 design ways:
edit: A works with our UI design i believe because we are prompted to upload tracking link in the complete required actions modal when order status changes or some criteria do we want tracking link & cost to be a one time entry that is set & cannot be changed? - if so then my comments will be in pending... buffering... |
I think option A is good, I just added a check to make sure the status is shipped before setting them |
ℹ️ Issue
Closes SSF-129
📝 Description
✔️ Verification
Verified endpoint on Postman and data changes in pgAdmin
🏕️ (Optional) Future Work / Notes
Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!