Fix voucher usage limit usage

This commit is contained in:
Krzysztof Bialoglowicz 2019-09-10 18:51:38 +02:00
parent 4b4b7fbf20
commit 7530bdbfc2
2 changed files with 6 additions and 5 deletions

View file

@ -85,7 +85,9 @@ export const VoucherDetails: React.StatelessComponent = () => {
formData.discountType.toString() === "SHIPPING" formData.discountType.toString() === "SHIPPING"
? VoucherTypeEnum.ENTIRE_ORDER ? VoucherTypeEnum.ENTIRE_ORDER
: formData.type, : formData.type,
usageLimit: parseInt(formData.usageLimit, 10) usageLimit: formData.hasUsageLimit
? parseInt(formData.usageLimit, 10)
: 0
} }
} }
}) })

View file

@ -361,10 +361,9 @@ export const VoucherDetails: React.StatelessComponent<VoucherDetailsProps> = ({
"SHIPPING" "SHIPPING"
? VoucherTypeEnum.SHIPPING ? VoucherTypeEnum.SHIPPING
: formData.type, : formData.type,
usageLimit: parseInt( usageLimit: formData.hasUsageLimit
formData.usageLimit, ? parseInt(formData.usageLimit, 10)
10 : 0
)
} }
} }
}) })