diff --git a/src/components/organisms/YearOverview/index.tsx b/src/components/organisms/YearOverview/index.tsx index 7484ada..1a9859f 100644 --- a/src/components/organisms/YearOverview/index.tsx +++ b/src/components/organisms/YearOverview/index.tsx @@ -26,12 +26,16 @@ export const YearOverview: FC = async ({ year, heading }) => { const planned = gifts.filter((gift) => gift.status === 'planned'); const decided = gifts.filter((gift) => gift.status === 'decided'); const bought = gifts.filter((gift) => gift.status === 'bought'); + const ready = gifts.filter((gift) => gift.status === 'ready'); const wrapped = gifts.filter((gift) => gift.status === 'wrapped'); const totalCost = gifts.reduce((acc, gift) => acc + gift.cost, 0); const totalCostPlanned = planned.reduce((acc, gift) => acc + gift.cost, 0) + decided.reduce((acc, gift) => acc + gift.cost, 0); - const totalCostBought = bought.reduce((acc, gift) => acc + gift.cost, 0); + const totalCostBought = + bought.reduce((acc, gift) => acc + gift.cost, 0) + + ready.reduce((acc, gift) => acc + gift.cost, 0) + + wrapped.reduce((acc, gift) => acc + gift.cost, 0); const remainingBudget = data.budgetLimit - totalCostBought; @@ -42,7 +46,7 @@ export const YearOverview: FC = async ({ year, heading }) => { - +