Skip to content
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/add discount condition batch #2430

Merged
merged 12 commits into from
Oct 13, 2022
Merged

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Oct 12, 2022

What

  • Add support to add item batch to a discount condition.
  • Add support of the batch to medusa-js and medusa-react
  • Cleanup the discount/condition end points and handler
    • Apply transformer middleware and create a new guard middleware to take care of the condition belonging to a discount check
  • Cleanup discount integration tests by removing all catch and log which should not be there as well as moving the common header to a const to be used all along

Tests

  • Add new integration tests to validate that multiple items can be added to a discount conditions
  • Add new tests to validate the medusa-react hook

FIXES CORE-608

@changeset-bot
Copy link

changeset-bot bot commented Oct 12, 2022

🦋 Changeset detected

Latest commit: 939af44

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@medusajs/medusa-js Patch
medusa-react Patch
@medusajs/medusa Patch

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

@adrien2p adrien2p force-pushed the feat/add-discount-condition-batch branch from 7021b62 to fe784e4 Compare October 12, 2022 13:12
@adrien2p adrien2p marked this pull request as ready for review October 12, 2022 14:35
@adrien2p adrien2p requested a review from a team as a code owner October 12, 2022 14:35
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. I have added a couple of comments here and there 💪

@adrien2p adrien2p requested a review from olivermrbl October 13, 2022 09:26
@adrien2p adrien2p force-pushed the feat/add-discount-condition-batch branch from 676b52e to 939af44 Compare October 13, 2022 12:44
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@adrien2p adrien2p merged commit 765a2cc into develop Oct 13, 2022
ymaheshwari1 pushed a commit to ymaheshwari1/medusa that referenced this pull request Oct 26, 2022
* feat(medusa): Allow to add items to a discount condition by batch + cleanup of discounts and discount conditions end points

* style(medusa): cleanup catch and log

* feat(medusa-react, medusa-js): Add support to add item batch to discount condition

* cleanup

* cleanup

* rename items to resources

* fix(medusa-js): url

* Create fast-suns-repair.md

* update naming

* tests(integration): Update tests to reflect API changes

* feat(medusa): Delete a condition should be idempotent on discount and condition

* revert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants