-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(core-flows): revisit fulfillment flow reservations and support inventory kit #11790
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
7 Skipped Deployments
|
🦋 Changeset detectedLatest commit: 84b16a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 66 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
689f4f6
to
9722c21
Compare
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.
Nice work @fPolic. No major comments, I'll let you decide if we merge now or after addressing the nits/suggestions.
// find order item | ||
const orderItem = order.items!.find((i) => i.id === lineItemId) | ||
// find inventory items | ||
const iitems = (orderItem as any)!.variant?.inventory_items |
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.
nit: I've seen (orderItem as any).variant
a few times in this PR, would it make sense to update the type to reference it?
@@ -199,6 +286,9 @@ export const cancelOrderFulfillmentWorkflow = createWorkflow( | |||
"id", | |||
"status", | |||
"items.*", |
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.
question: Can we remote items.*
in favor of specific properties?
).data.order | ||
}) | ||
|
||
it("should correctly manage reservations when canceling a fulfillment (with inventory kit)", async () => { |
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.
suggestion: This is great, but we could probably cover a few additional cases, e.g. the ones we expect to throw
What
CLOSES CMRC-981