Skip to content
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

Add ability to write math expression in amount field #184

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

parthokunda
Copy link
Contributor

@parthokunda parthokunda commented Jul 27, 2024

When creating new expenses, currently there is no support to write mathematical expressions.
My solution includes a package math-expression-evaluator.
On change in the amount field, it tries to evaluate the string and shows the evaluated value if correct and 'Invalid expression' otherwise.
The evaluated amount is shown below the input box.
'This is a reimbursement' is renamed to 'Reimbursement' and shifted to the right side of the total value field.

Fixes #183

When Invalid expression in amount field was submitted, it would throw an
error. It has been wrapped in try block.
@parthokunda
Copy link
Contributor Author

I have updated the formatting issues that was failing the Prettier check.

@parthokunda parthokunda marked this pull request as draft August 9, 2024 07:29
@parthokunda parthokunda marked this pull request as ready for review August 9, 2024 08:16
@parthokunda
Copy link
Contributor Author

parthokunda commented Aug 9, 2024

@scastiel hello, I have fixed the merge problems as well. Can you check if you are free? My PR is a complete mess btw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request | Ability to write math expressions as Expenses.
1 participant