fix: Disable redeem button when points exceed available limit
This commit is contained in:
parent
9dc3edb40e
commit
4e64d0b24e
2 changed files with 3 additions and 2 deletions
|
@ -48,6 +48,7 @@ function RedeemPointsModal({ config }) {
|
|||
{predefinedPoints.map(point => (
|
||||
<IconButton
|
||||
variant='outlined'
|
||||
disabled={points + point > config.available}
|
||||
sx={{ borderRadius: '50%' }}
|
||||
key={point}
|
||||
onClick={() => {
|
||||
|
@ -69,7 +70,7 @@ function RedeemPointsModal({ config }) {
|
|||
<Button
|
||||
onClick={() =>
|
||||
config.onSave({
|
||||
points,
|
||||
points: Number(points),
|
||||
userId: config.user.userId,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ const TaskInput = ({ autoFocus, onChoreUpdate }) => {
|
|||
},
|
||||
{
|
||||
frequencyType: 'daily',
|
||||
regex: /(every day|daily)$/i,
|
||||
regex: /(every day|daily|everyday)$/i,
|
||||
name: 'Every day',
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue