Skip to content

Commit 3698479

Browse files
author
JasmeetLuthra
committed
Added min_product_mrp param in get free products coupon notice api call
1 parent 7c9006c commit 3698479

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

forms/Coupon.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class CouponForm extends React.Component {
174174

175175
onSubmit = async (fields) => {
176176
if (fields.amount)
177-
if( !(await this.getProductsWithMrpLessThanDiscount(fields)) )
177+
if( !(await this.freeProductsNotice(fields)) )
178178
return
179179

180180
if (this.props.data.isEditMode) {
@@ -184,14 +184,15 @@ class CouponForm extends React.Component {
184184
}
185185
}
186186

187-
getProductsWithMrpLessThanDiscount = async (formValues) => {
187+
freeProductsNotice = async (formValues) => {
188188
try {
189189
const payload = {
190190
amount: formValues.amount,
191191
product_ids: await this.getCouponProductIds(),
192192
category: formValues.category,
193193
sub_category_id: formValues.sub_category_id,
194-
mode: formValues.mode
194+
mode: formValues.mode,
195+
min_product_mrp: formValues.min_product_mrp
195196
}
196197
const response = await controller.getProductsWithMrpLessThanDiscount(payload)
197198
if (!response.data.length) {

0 commit comments

Comments
 (0)