Skip to content

Commit

Permalink
Rename paymentsToProjects to payments
Browse files Browse the repository at this point in the history
  • Loading branch information
vladh committed Aug 27, 2024
1 parent e1a30ac commit 33a42fc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contrib/example-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"url": "https://example.com/blog/2",
"dateYearEnding": "2023-12-31",
"averageNumberOfDevs": 135,
"paymentsToProjects": 500000,
"payments": 500000,
"monetaryValueOfTime": 100000,
"monetaryValueOfMaterials": 500000
},
{
"url": "https://example.com/blog/1",
"dateYearEnding": "2022-12-31",
"averageNumberOfDevs": 100,
"paymentsToProjects": 400000,
"payments": 400000,
"monetaryValueOfTime": 10000,
"monetaryValueOfMaterials": 50000
}
Expand Down
2 changes: 1 addition & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
Expand Down
4 changes: 2 additions & 2 deletions src/member_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export async function getMembers(): Promise<MemberWithId[]> {
}

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) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/members/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function getStaticPaths() {
</tr>
<tr>
<td>Payments to Projects</td>
<td class="text-right">{fmtCurrency(report.paymentsToProjects)}</td>
<td class="text-right">{fmtCurrency(report.payments)}</td>
</tr>
<tr>
<td></td>
Expand Down

0 comments on commit 33a42fc

Please sign in to comment.