Skip to content

Commit

Permalink
finished kitchen outcomes social enterprise averages
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesjin123 committed Jan 8, 2025
1 parent 5e22c26 commit cbd80e9
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions client/src/Visualizations/KitchenOutcomeViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,13 @@ function KitchenOutcomesVisualization() {
'foodCostPercentage',
'mealReimbursement',
'hungerReliefsMealsServed',
'grossRevenueCafe',
'grossRevenueRestaurant',
'grossRevenueCatering',
'grossRevenueFoodTruck',
'grossRevenueWholesale',
'grossRevenueFoodSubscription',
'retailSocialEnterpriseRevenue',
];

const averages: { [key: string]: number | null } = {};
Expand Down Expand Up @@ -1175,26 +1182,35 @@ function KitchenOutcomesVisualization() {

<Grid container spacing={3}>
{[
{ label: 'Cafe', value: surveyData?.grossRevenueCafe },
{
label: 'Cafe',
value: surveyData?.grossRevenueCafe,
avg: networkAverages?.grossRevenueCafe,
},
{
label: 'Restaurant',
value: surveyData?.grossRevenueRestaurant,
avg: networkAverages?.grossRevenueRestaurant,
},
{
label: 'Catering',
value: surveyData?.grossRevenueCatering,
avg: networkAverages?.grossRevenueCatering,
},
{
label: 'Food Truck',
value: surveyData?.grossRevenueFoodTruck,
avg: networkAverages?.grossRevenueFoodTruck,
},
{
label: 'Wholesale',
value: surveyData?.grossRevenueWholesale,
avg: networkAverages?.grossRevenueWholesale,
},
{
label: 'Food Subscription',
value: surveyData?.grossRevenueFoodSubscription,
avg: networkAverages?.grossRevenueFoodSubscription,
},
].map((enterprise) => (
<Grid item xs={12} sm={6} md={4} key={enterprise.label}>
Expand Down Expand Up @@ -1226,7 +1242,7 @@ function KitchenOutcomesVisualization() {
{enterprise.label}
</Typography>
<Typography
variant="h6"
variant="h5"
color={
enterprise.value === 'No Enterprise'
? 'text.secondary'
Expand All @@ -1236,6 +1252,9 @@ function KitchenOutcomesVisualization() {
>
{enterprise.value || 'N/A'}
</Typography>
<Typography sx={{ mt: 0.5 }}>
Network Avg: {enterprise.avg?.toFixed(2)}
</Typography>
</Card>
</Grid>
))}
Expand Down Expand Up @@ -1272,6 +1291,10 @@ function KitchenOutcomesVisualization() {
{surveyData?.retailSocialEnterpriseRevenue?.toLocaleString() ||
'N/A'}
</Typography>
<Typography align="center" sx={{ mt: 0.5 }}>
Network Avg: $
{networkAverages?.retailSocialEnterpriseRevenue?.toFixed(2)}
</Typography>
</Card>
</Grid>
</Grid>
Expand Down

0 comments on commit cbd80e9

Please sign in to comment.