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(types,utils): added promotion create with rules and application target rules #5957

Merged
merged 10 commits into from
Jan 3, 2024

Conversation

riqwan
Copy link
Contributor

@riqwan riqwan commented Dec 22, 2023

what:

Adds support for creating prommotions along with rules for promotion and rules for application

RESOLVES CORE-1593
RESOLVES CORE-1594

Copy link

vercel bot commented Dec 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 9:48pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 9:48pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 9:48pm

Copy link

changeset-bot bot commented Dec 22, 2023

🦋 Changeset detected

Latest commit: eb6be8e

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

This PR includes changesets to release 2 packages
Name Type
@medusajs/types Patch
@medusajs/utils 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

@riqwan riqwan force-pushed the feat/promotion-rules branch from ffdf94e to 20166a4 Compare December 22, 2023 10:16
@riqwan riqwan changed the title feat(types,utils): added promotion create with rules feat(types,utils): added promotion create with rules and application target rules Dec 26, 2023
@riqwan riqwan marked this pull request as ready for review January 2, 2024 09:00
@riqwan riqwan requested a review from a team as a code owner January 2, 2024 09:00
@riqwan riqwan requested review from adrien2p and olivermrbl January 2, 2024 09:00
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.

Strong work @riqwan. Have added a couple of comments and todos.

On the model ID prefix, we should probably (re)establish a convention:

  • Single words i.e. no - or _
  • Keep them short
  • Include some "ref" to module (if the concept is likely to live elsewhere) e.g. pro or pric. For readability purposes

This might need to be applied to the pricing module too, if we agree.

packages/promotion/src/models/promotion-rule-value.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/application-method.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/promotion-rule.ts Outdated Show resolved Hide resolved
packages/utils/src/promotion/index.ts Show resolved Hide resolved
packages/types/src/promotion/common/promotion-rule.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/promotion-rule-value.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/promotion-rule.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/promotion-rule.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/promotion-rule.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/promotion-rule.ts Outdated Show resolved Hide resolved
packages/promotion/src/models/promotion-rule.ts Outdated Show resolved Hide resolved
@riqwan riqwan requested review from adrien2p and olivermrbl January 2, 2024 13:08
Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

LGTM, very nice work :) I like what the promotion engine will become ❤️

@riqwan
Copy link
Contributor Author

riqwan commented Jan 2, 2024

@olivermrbl good to merge this one?

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 💪

@riqwan riqwan merged commit 42cc8ae into develop Jan 3, 2024
15 checks passed
@riqwan riqwan deleted the feat/promotion-rules branch January 3, 2024 08:55
This was referenced Jan 3, 2024
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.

3 participants