Skip to content

Commit

Permalink
chore: configuring new finance year and adding latest data (#2624)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Feb 3, 2024
1 parent fc59449 commit fb43292
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/FinancialSummary/BarChartComponent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect, useRef } from 'react';
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
import ExpensesLink from '../../config/finance/json-data/2023/ExpensesLink.json';
import Expenses from '../../config/finance/json-data/2023/Expenses.json';
import ExpensesLink from '../../config/finance/json-data/2024/ExpensesLink.json';
import Expenses from '../../config/finance/json-data/2024/Expenses.json';
import { getUniqueCategories } from '../../lib/getUniqueCategories';
/**
* CustomTooltip component for the bar chart. Displays additional information on hover.
Expand Down
2 changes: 1 addition & 1 deletion config/finance/2023/Expenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ December:
- Category: Swag Store
Amount: '1415.90'
- Category: Bounty Program
Amount: '201.10'
Amount: '813.10'
14 changes: 14 additions & 0 deletions config/finance/2024/Expenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
January:
- Category: JSON Schema Sponsorship
Amount: '250.00'
- Category: Swag Store
Amount: '678.26'
- Category: Bounty Program
Amount: '1800.00'
- Category: Community Manager
Amount: '2000.00'
- Category: AsyncAPI Conf on Tour 2023
Amount: '318.98'
February:
- Category: JSON Schema Sponsorship
Amount: '250.00'
29 changes: 29 additions & 0 deletions config/finance/2024/ExpensesLink.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- category: "Ambassador Program"
link: "https://github.com/orgs/asyncapi/discussions/425"

- category: "Google Season of Docs 2023"
link: "https://github.com/orgs/asyncapi/discussions/961"

- category: "Swag Store"
link: "https://github.com/orgs/asyncapi/discussions/710"

- category: "Bounty Program"
link: "https://github.com/orgs/asyncapi/discussions/541"

- category: "3rd Party Services"
link: "https://github.com/orgs/asyncapi/discussions/295"

- category: "Community Manager"
link: "https://github.com/orgs/asyncapi/discussions/515"

- category: "AsyncAPI Conf on Tour 2023"
link: "https://github.com/orgs/asyncapi/discussions/598"

- category: "AsyncAPI Conf on Tour 2024"
link: "https://github.com/orgs/asyncapi/discussions/1018"

- category: "Mentorship Program 2023"
link: "https://github.com/orgs/asyncapi/discussions/689"

- category: "JSON Schema Sponsorship"
link: "https://github.com/orgs/asyncapi/discussions/1017"
2 changes: 1 addition & 1 deletion lib/getUniqueCategories.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @returns {string[]} An array of unique expense categories.
*/

import Expenses from '../config/finance/json-data/2023/Expenses.json';
import Expenses from '../config/finance/json-data/2024/Expenses.json';

export const getUniqueCategories = () => {
const allCategories = [];
Expand Down
6 changes: 3 additions & 3 deletions scripts/finance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module.exports = async function buildFinanceInfoList() {
try {
const currentDir = resolve(__dirname, '../../');

const expensesPath = resolve(currentDir, 'config', 'finance', '2023', 'Expenses.yml');
const expensesLinkPath = resolve(currentDir, 'config', 'finance', '2023', 'ExpensesLink.yml');
const expensesPath = resolve(currentDir, 'config', 'finance', '2024', 'Expenses.yml');
const expensesLinkPath = resolve(currentDir, 'config', 'finance', '2024', 'ExpensesLink.yml');

const ExpensesContent = await readFile(expensesPath, 'utf-8');
const ExpensesLinkContent = await readFile(expensesLinkPath, 'utf-8');
Expand All @@ -16,7 +16,7 @@ module.exports = async function buildFinanceInfoList() {
const ExpensesLink = convertToJson(ExpensesLinkContent);

// Ensure the directory exists before writing the files
const jsonDirectory = resolve(currentDir, 'config', 'finance', 'json-data', '2023');
const jsonDirectory = resolve(currentDir, 'config', 'finance', 'json-data', '2024');
await mkdir(jsonDirectory, { recursive: true });

// Write Expenses to a JSON files
Expand Down

0 comments on commit fb43292

Please sign in to comment.