Skip to content

Commit ce9bda6

Browse files
authored
388 dev cashflow kpis connecting to backend (#394)
* KPI top cards * Contact card spacing fix
1 parent 8bcc228 commit ce9bda6

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎frontend/src/main-page/cash-flow/CashFlowPage.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,33 @@ export const formatMoney = (amount: number) => {
2222
};
2323

2424
const CashFlowPage = observer(() => {
25-
const { costs, revenues } = ProcessCashflowData();
25+
const { costs, revenues, cashflowSettings } = ProcessCashflowData();
2626

2727
return (
2828
<div className="">
2929
<div className="grid grid-cols-4 grid-rows-[auto_auto_1fr] gap-4">
3030
{/* Row 1 */}
3131
<CashflowKPICard
3232
text="Current Cash"
33-
value="$50,000"
33+
value={formatMoney(cashflowSettings?.startingCash ?? 0)}
3434
logo={faDollarSign}
3535
className="text-blue"
3636
/>
3737
<CashflowKPICard
3838
text="Total Revenue"
39-
value="$50,000"
39+
value={formatMoney(revenues.reduce((accumulator, currentValue) => accumulator + currentValue.amount, 0))}
4040
logo={faArrowTrendUp}
4141
className="text-green"
4242
/>
4343
<CashflowKPICard
4444
text="Monthly Costs"
45-
value={formatMoney(costs.reduce((accumulator, currentValue) => accumulator + currentValue.amount, 0))}
45+
value={formatMoney(costs.reduce((accumulator, currentValue) => accumulator + currentValue.amount, 0)/12)}
4646
logo={faUserGroup}
4747
className="text-primary"
4848
/>
4949
<CashflowKPICard
5050
text="Annual Increases"
51-
value="Salary: 4.5% | Benefits: 4%"
51+
value={`Salary: ${cashflowSettings?.salaryIncrease}% | Benefits: ${cashflowSettings?.benefitsIncrease}%`}
5252
logo={faArrowTrendUp}
5353
className="text-green"
5454
size="small"

‎frontend/src/main-page/grants/grant-view/GrantView.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ const GrantItem: React.FC<GrantItemProps> = observer(({ grant }) => {
204204
{
205205
label: "Contacts",
206206
item: (
207-
<div className="grid grid-cols-1 xl:grid-cols-2 w-full h-full lg:w-[85%] gap-6">
207+
<div className="grid grid-cols-1 2xl:grid-cols-2 w-full h-full lg:w-[85%] gap-6">
208208
<ContactCard contact={grant.bcan_poc} type="BCAN" />
209209
<ContactCard
210210
contact={grant.grantmaker_poc}

0 commit comments

Comments
 (0)