-
Notifications
You must be signed in to change notification settings - Fork 71
fix(MM2-1953): add vendor promotions rule attribute options middleware and update related validation logic #254
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
base: development
Are you sure you want to change the base?
Conversation
…e and update related validation logic
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ...buildFilters(attribute?.id, store), | ||
| promotion_type: promotionType, | ||
| application_method_type: applicationMethodType, | ||
| } as VendorPromotionRuleValueParams, |
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.
Shouldn't we set VendorPromotionRuleValueParams as the type of the query param in usePromotionRuleValues instead of type-casting it here?
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.
you are right
…ions in promotions API hooks
|
|
||
| const PROMOTIONS_QUERY_KEY = 'promotions' as const; | ||
|
|
||
| export type VendorPromotionRuleValueParams = HttpTypes.AdminGetPromotionsRuleValueParams & { |
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.
Should this be here? don't we have a separate file for types? vendor-panel/src/types
This PR is related to backend PR -> mercurjs/mercur#532