From 33a42fce29b4677d0859d7b4ba626a2066ff9e18 Mon Sep 17 00:00:00 2001 From: Vlad-Stefan Harbuz Date: Tue, 27 Aug 2024 17:10:27 +0100 Subject: [PATCH] Rename paymentsToProjects to payments --- contrib/example-schema.json | 4 ++-- src/content/config.ts | 2 +- src/member_util.ts | 4 ++-- src/pages/members/[id].astro | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/example-schema.json b/contrib/example-schema.json index f8d6f02d..2f5b83bc 100644 --- a/contrib/example-schema.json +++ b/contrib/example-schema.json @@ -9,7 +9,7 @@ "url": "https://example.com/blog/2", "dateYearEnding": "2023-12-31", "averageNumberOfDevs": 135, - "paymentsToProjects": 500000, + "payments": 500000, "monetaryValueOfTime": 100000, "monetaryValueOfMaterials": 500000 }, @@ -17,7 +17,7 @@ "url": "https://example.com/blog/1", "dateYearEnding": "2022-12-31", "averageNumberOfDevs": 100, - "paymentsToProjects": 400000, + "payments": 400000, "monetaryValueOfTime": 10000, "monetaryValueOfMaterials": 50000 } diff --git a/src/content/config.ts b/src/content/config.ts index 6933dfdb..eafa0ad4 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -14,7 +14,7 @@ const memberReport = z.object({ url: z.string().url(), dateYearEnding: z.string().date(), averageNumberOfDevs: z.number().nonnegative(), - paymentsToProjects: z.number().nonnegative(), + payments: z.number().nonnegative(), monetaryValueOfTime: z.number().nonnegative().default(0), monetaryValueOfMaterials: z.number().nonnegative().default(0), }); diff --git a/src/member_util.ts b/src/member_util.ts index 31211687..3262f4e4 100644 --- a/src/member_util.ts +++ b/src/member_util.ts @@ -34,11 +34,11 @@ export async function getMembers(): Promise { } export function getReportFullTotal(report: MemberReport) { - return report.paymentsToProjects + report.monetaryValueOfTime + report.monetaryValueOfMaterials; + return report.payments + report.monetaryValueOfTime + report.monetaryValueOfMaterials; } export function getDollarsPerDev(report: MemberReport) { - return report.paymentsToProjects / report.averageNumberOfDevs; + return report.payments / report.averageNumberOfDevs; } export function fmtCurrency(num: number) { diff --git a/src/pages/members/[id].astro b/src/pages/members/[id].astro index 9731e3db..a7769824 100644 --- a/src/pages/members/[id].astro +++ b/src/pages/members/[id].astro @@ -49,7 +49,7 @@ export async function getStaticPaths() { Payments to Projects - {fmtCurrency(report.paymentsToProjects)} + {fmtCurrency(report.payments)}