-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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): Use remote link methods to dismiss all links related to inventory item #6737
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
I think we can rename that file and the step to refer to deletion as well, because in theory you can still have a place where you just want to call a detach and that would be your current step. |
Should we also check that the link configurations include the cascade option? |
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.
Do we have tests to validate the deletions of the links with multiple levels or links?
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.
one suggestion, but lgtm!
Modules.INVENTORY, | ||
"inventory_item_id" | ||
) | ||
await remoteLink.delete({ |
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.
oh cool, didn't know this does a soft delete. Would be good to have a test that checks this.
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: don't have to do this now, but I wonder if we can do a generic deleteLinkStep()
that accepts an object. Something like this:
deleteLinkStep({
[Modules.INVENTORY]: { inventory_item_id: data.ids },
})
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.
if needed you can bring this one to the PR
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!
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.
@carlos-r-l-rodrigues very nice!
Yeah, I think so. But I'm not sure if we have one yet. Maybe the link between product variant and inventory item? |
Yeah something like that, or cart -> sales_channel -> fulfillment too |
What
remoteLink.delete
to dismiss all connections toinventory_item_id