-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
refactor: update financial data for current year #2687
refactor: update financial data for current year #2687
Conversation
✅ Deploy Preview for asyncapi-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on undefined |
@anshgoyalevil can you please review the PR? |
@akshatnema @derberg Done! Please review. Here's the summary of the changes
|
cc : @akshatnema @derberg |
@akshatnema Done! Please Review |
@akshatnema reminder for this PR |
@akshatnema gentle reminder |
@JeelRajodiya please resolve the merge conflicts |
/update |
@JeelRajodiya please resolve the conflicts |
Yes I will update it, Need some time |
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.
LGTM !!
import(`../../config/finance/json-data/${currentYear}/ExpensesLink.json`).then((data) => | ||
setExpensesLinkData(data.default) | ||
); | ||
getUniqueCategories().then((data) => setCategories(data)); | ||
import(`../../config/finance/json-data/${currentYear}/Expenses.json`).then((data) => setExpensesData(data.default)); |
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.
What if Expenses Files of current are not present? In that case this import will lead to error and a deadlock situation will be created. Provide some fallback for these imports.
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.
I have added some logic for checking whether we have any financial data or not, please view scripts/index.js. If we do not have any financial data, it will throw an error on the build. Also, I have moved those imports on the top level now.
We are now using a different approach. When the project is built, the @akshatnema PTAL |
@akshatnema ptal |
/rtm |
Description
When the year changes, we create a folder for that particular year, and along with that, we need to change the year in some files (scripts/finance/index.js , lib/getUniqueCategories.js and components/FinancialSummary/BarChartComponent.js) to update the bar chart. However, what we can do is write logic to automatically detect the current year and modify the year in those files when we create a folder for the year in the finance section.
Closes #2686