-
Notifications
You must be signed in to change notification settings - Fork 477
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
Support 2-Decimal Formatting & customizable decimal separator #192
Conversation
The maintainers of this repository would appreciate it if you could provide more information. |
@DarkSmile92: This is not finished yet, right? |
@hql287 No I am adding the two settings right now and implement the display of currency sign before / after the amount. Will commit to PR and let you know once I'm done. |
@DarkSmile92 No pressure, Robin. I just added a [WIP] tag to the title, feel free to remove it once you're done with the PR. Thanks! |
Thanks @hql287 ! |
@DarkSmile92 Will do. Thanks! |
@DarkSmile92 Robin, I just tested out your PR and this is pretty cool. Everything seems to be working as expected. I really like the currency sign placement setting. Nice touch! 👍 There're still some issues though:
|
@DarkSmile92 Thanks, bro! 👍 |
|
app/actions/settings.jsx
Outdated
@@ -17,3 +17,9 @@ export const saveSettings = createAction( | |||
ACTION_TYPES.SETTINGS_SAVE, | |||
data => data | |||
); | |||
|
|||
// Notify user about invalid decimal fractions | |||
export const notifyInvalidDecimalFractions = createAction( |
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.
Please use dialog
for validation message. I would like to user to acknowledge this before moving on.
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.
Changed :)
@hql287 Already checked, you should be able to push to my PR Hung 👍 |
It’s too big at the moment
@DarkSmile92 I just added some new definitions to facilitate the changes in this PR. Can you do the translation for those term on Crowdin (I would like to add German support with this PR)? Thanks! |
@hql287 Sure, translation on Crowdin done :) |
Currency settings now hold these 4 settings as default: - Currency (code) - Separator (thousand & decimal) - Sign placement - Decimal fraction Refactored FormReducer, Invoice & Currency component (in Settings page) with these changes
+ All operations related to constructing a new invoice has been moved to form helper. This makes sencse since most of them are already here and testing will be easier, too.
Also changed name to formatNumber
+ Invoices Container: + Invoice (Invoices Page) : display currency correctly + Settings Reducer: removed unnecessary selectors
Almost done.
@DarkSmile92: If you can review the changes, that would be great! 👍 |
+ Validate negative fraction, tax amount and item quantity + Added test cases
@hql287 sorry for not responding, something came up at work that needed my full attention. I reviewed the changes. I really like that you made currency an object with decimal and placement properties. This makes it extensible. All changes look good to me to I agree. Can't approve them via git review so take this as review succeeded and approved:) |
@DarkSmile92 Thanks, bro 👍 |
Shows 2 fractions on decimals and makes the decimal separator region aware.
Close #190, Closes #173