From 30ca58471be37ea6d1636824ce3d4be16d26f9f1 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 18 Oct 2024 13:53:04 +0100 Subject: [PATCH] testing adding valuation and funding components --- .../api/property-meta/[propertyId]/route.ts | 1 + src/app/components/Buttons.tsx | 10 ++- .../RecommendationContainer.tsx | 10 +++ .../ValuationImpactComponent.tsx | 62 +++++++++++++++++++ src/app/db/schema/property.ts | 1 + .../[propertyId]/plans/[planId]/page.tsx | 4 +- .../building-passport/[propertyId]/utils.ts | 15 ++++- tailwind.config.js | 2 + 8 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 src/app/components/building-passport/ValuationImpactComponent.tsx diff --git a/src/app/api/property-meta/[propertyId]/route.ts b/src/app/api/property-meta/[propertyId]/route.ts index 11f001b..6996cff 100644 --- a/src/app/api/property-meta/[propertyId]/route.ts +++ b/src/app/api/property-meta/[propertyId]/route.ts @@ -29,6 +29,7 @@ export async function GET( currentEpcRating: true, currentSapPoints: true, updatedAt: true, + currentValuation: true, }, where: eq(property.id, BigInt(propertyId)), with: { diff --git a/src/app/components/Buttons.tsx b/src/app/components/Buttons.tsx index 9d2d87d..962e9cf 100644 --- a/src/app/components/Buttons.tsx +++ b/src/app/components/Buttons.tsx @@ -26,19 +26,25 @@ export function BrandButton({ }: { label: string; onClick: Dispatch>; - backgroundColor: "brandblue" | "brandgold"; // Restrict backgroundColor to these two options + backgroundColor: + | "brandblue" + | "brandgold" + | "brandmidblue" + | "brandlightblue"; // Restrict backgroundColor to these two options }) { // Dictionary to map background colors to hover colors const hoverColors = { brandblue: "hover:bg-hoverblue", brandgold: "hover:bg-hovergold", + brandmidblue: "hover:bg-hoverblue", + brandlightblue: "hover:bg-brandmidblue", }; return (