website icon indicating copy to clipboard operation
website copied to clipboard

refactor: update financial data for current year

Open JeelRajodiya opened this issue 1 year ago • 8 comments

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.

Related issue(s) #2686

JeelRajodiya avatar Feb 22 '24 16:02 JeelRajodiya

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
Latest commit 474cdebddcfdd6f047b2a4a6519f795c85277fcc
Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/6607041a7293ec0008643558
Deploy Preview https://deploy-preview-2687--asyncapi-website.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Feb 22 '24 16:02 netlify[bot]

I know using require with the import statements is a bad practice. but I couldn't think of any other way to solve this issue. If you have any other method to solve this. I am open to suggestions

image

JeelRajodiya avatar Feb 24 '24 14:02 JeelRajodiya

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 33
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-2687--asyncapi-website.netlify.app/

asyncapi-bot avatar Feb 24 '24 14:02 asyncapi-bot

@anshgoyalevil can you please review the PR?

JeelRajodiya avatar Feb 25 '24 06:02 JeelRajodiya

@akshatnema @derberg Done! Please review.

Here's the summary of the changes

  • Used dynamic imports to import the current year's data files
  • Card and ExpensesCard components now take values of Expenses and ExpensesLinks as props
  • getUniqueCategory takes Expense as parameter ( previously we were importing the Expenses )

JeelRajodiya avatar Feb 27 '24 18:02 JeelRajodiya

cc : @akshatnema @derberg

sambhavgupta0705 avatar Mar 29 '24 17:03 sambhavgupta0705

@akshatnema Done! Please Review

JeelRajodiya avatar Mar 29 '24 18:03 JeelRajodiya

@akshatnema reminder for this PR

sambhavgupta0705 avatar Apr 18 '24 05:04 sambhavgupta0705