-
Notifications
You must be signed in to change notification settings - Fork 94
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
Incorrect restriction in withdrawls edit form #1709
Conversation
…podkrepi-bg#1703) * Remove unused import and translations * Remove unused translations, added EN translations for bank transactions * Remove unused translations from campaigns.json * Remove unused translations from campaign.json * Add missing EN trnlations in campaigns.json * Add missing translations for common.json * Fix lint error --------- Co-authored-by: ani-kalpachka <[email protected]>
Co-authored-by: ani-kalpachka <[email protected]>
* Update translations * Update tranlations * Update translations --------- Co-authored-by: ani-kalpachka <[email protected]>
* Add missing EN translations * Update translations for support.json and reccurong-donation.json * Update translations for validation.json and transfer.json * Update translations --------- Co-authored-by: ani-kalpachka <[email protected]>
* components/commmon: Gallery component improvements - Improved logic to render the Gallery Component more efficiently - Expanded the size of the images, when FullScreen is toggled - Added a button to minimize fullscreen slider * common/Gallery: Fix component crash when child is a single image In some situations, only a single image is uploaded, and in that case child.props.children is an object rather, than an array to map it over. * common/ImageSlider: Hide backdrop on FullScreenImageSlider Avoid minimizing gallery due to accidental touches
…be limited to integers only.
❌ Not all tests have run for this PR. Please add the |
If I remember correctly ,we save the amount of a withdrawal record in stotinki as an integer, and conversions to decimals are only done on the front end for data visualization. |
this is handled in:
Actually we can save the form, but we cannot edit it later. It should be the same logic. |
@ani-kalpachka Can you please review this since Diana requested it urgently? |
@@ -47,7 +47,7 @@ const validationSchema: yup.SchemaOf<WithdrawalData> = yup | |||
.defined() | |||
.shape({ | |||
status: yup.string().trim().min(1).max(10).required(), | |||
amount: yup.number().positive().integer().required(), | |||
amount: yup.number().positive().required(), |
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.
Not that it is an issue considering the amount field can't be edited in EditForm, but maybe for consistency reason we should at least have the number().positive(), rules for amount validation.
The amount of the withdrawals can be a decimal number.
It should not be limited to integers only.
Before: