-
Notifications
You must be signed in to change notification settings - Fork 35
Adding default_currency variable in UI #87
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
Open
Manas23601
wants to merge
29
commits into
opencost:main
Choose a base branch
from
Manas23601:default_currency
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for opencost-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
3cd2afa
to
ee1f0ef
Compare
@ameijer, can you review this? |
a60c3d7
to
62abdc8
Compare
Ready for review |
58f41e2
to
441e157
Compare
…provided in the API Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: vishy <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
for default currency it would start as 1.0 Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Ishaan Mittal <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Ishaan Mittal <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Alex Meijer <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Alex Meijer <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Alex Meijer <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Bumps [tspascoal/get-user-teams-membership](https://github.com/tspascoal/get-user-teams-membership) from 2 to 3. - [Release notes](https://github.com/tspascoal/get-user-teams-membership/releases) - [Commits](tspascoal/get-user-teams-membership@v2...v3) --- updated-dependencies: - dependency-name: tspascoal/get-user-teams-membership dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Bumps [@date-io/core](https://github.com/dmtrKovalenko/date-io) from 1.3.13 to 3.2.0. - [Release notes](https://github.com/dmtrKovalenko/date-io/releases) - [Commits](dmtrKovalenko/date-io@v1.3.13...v3.2.0) --- updated-dependencies: - dependency-name: "@date-io/core" dependency-version: 3.2.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.26.8 to 7.28.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.28.0/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-version: 7.28.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Andreas Resch <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: VANSH SHARMA <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Christian Petersen <[email protected]> Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
Signed-off-by: Manas Sivakumar <[email protected]>
441e157
to
e23b8db
Compare
@Manas23601 would you consider doing this calculation on the backend? we merged a bunch of currency conversion stuff in there |
Sure, I can do it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR change?
DEFAULT_CURRENCY
constant that can be set as any currency during deployment.Code Workflow
The changes are as follows.
conversionRate
. This variable, when changed calls another side effect, that calls the functionapplyConversionRate
to multiply all the allocation resource values inallocationData
with the conversion rate.allocationData
is changed callingsetTotalData
to update theTotalCost
row.Does this PR relate to any other PRs?
I'm running the app using the demo API and I'm neither sure the aggregation API is rightly invoked nor the response data is valid. Since I need someone else to verify the data, I'm going to ignore it for now.
I got this with the new changes locally
I was expecting as is like the deployed demo
Note: The allocation item names do not match. "folding-at-home" is unfound
How will this PR impact users?
DEFAULT_CURRENCY
as part of the setup during the build & deployment. Every time, a request is made without a currency parameter, it will use theDEFAULT_CURRENCY
. The codebase ships with "USD" as default.Does this PR address any GitHub or Zendesk issues?
How was this PR tested?
I set the default currency to "AED" in this deployment
Apply Rate Text Box and Button
Apply Rate in Action
Does this PR require changes to documentation?
DEFAULT_CURRENCY
field can be set, which is insrc/constants/defaults.js
Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?