Merge pull request #271 from mirumee/fix/voucher-limit
Fix voucher limit
This commit is contained in:
commit
01b6193b3e
3 changed files with 5 additions and 6 deletions
|
@ -14,6 +14,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
|||
- Improve mobile appearance - #240 by @benekex2 and @dominik-zeglen
|
||||
- Use searches as hooks instead of components - #262 by @dominik-zeglen
|
||||
- Add navigator - #267 by @dominik-zeglen
|
||||
- Fix voucher limit - #271 by @dominik-zeglen
|
||||
|
||||
## 2.0.0
|
||||
|
||||
|
|
|
@ -220,11 +220,9 @@ const VoucherList: React.FC<VoucherListProps> = props => {
|
|||
)}
|
||||
</TableCell>
|
||||
<TableCell className={classes.colUses}>
|
||||
{voucher && voucher.usageLimit ? (
|
||||
voucher.usageLimit
|
||||
) : voucher && voucher.usageLimit === null ? (
|
||||
"-"
|
||||
) : (
|
||||
{maybe<React.ReactNode>(
|
||||
() =>
|
||||
voucher.usageLimit === null ? "-" : voucher.usageLimit,
|
||||
<Skeleton />
|
||||
)}
|
||||
</TableCell>
|
||||
|
|
|
@ -381,7 +381,7 @@ export const VoucherDetails: React.FC<VoucherDetailsProps> = ({
|
|||
: formData.type,
|
||||
usageLimit: formData.hasUsageLimit
|
||||
? parseInt(formData.usageLimit, 10)
|
||||
: 0
|
||||
: null
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue