+

@@ -117,9 +44,11 @@ const Card = ({ id, title, image, budget, status }: CardProps) => {
{`${title}`}
{budget}
-
+
+
+
-
+
);
};
diff --git a/src/app/portfolio/[slug]/page.tsx b/src/app/portfolio/[slug]/page.tsx
index 4e2d1541..40ee1a1d 100644
--- a/src/app/portfolio/[slug]/page.tsx
+++ b/src/app/portfolio/[slug]/page.tsx
@@ -3,8 +3,16 @@ import AddNew from "../../components/portfolio/AddNew";
import { formatNumber } from "@/app/utils";
import Link from "next/link";
import { SearchData } from "@/types/epc";
+import { ArrowRightCircleIcon } from "@heroicons/react/20/solid";
+import { Badge } from "@/app/shadcn_components/ui/badge";
+import { PortfolioStage } from "@/types/portfolio";
+import StatusBadge from "@/app/components/StatusBadge";
-function generateProperties(value: number, suffix: string) {
+function generateProperties(
+ value: number,
+ suffix: string,
+ status: PortfolioStage
+) {
const length = Math.ceil(value / 30000);
return Array.from({ length }, (_, index) => ({
@@ -15,6 +23,7 @@ function generateProperties(value: number, suffix: string) {
cost: 30000,
co2Reduction: 9 / 5,
targetEpcRating: "C",
+ status: status,
}));
}
@@ -26,6 +35,7 @@ type Property = {
co2Reduction: number;
lmkKey: string;
targetEpcRating: string;
+ status: PortfolioStage;
};
function EmptyPropertyState() {
@@ -54,27 +64,41 @@ function Propertycards({
{properties.map((property) => (
-
+
-
{property.address}
-
{property.postcode}
+
+ {property.address}
+
+
+ {property.postcode}
+
+
+
+
+ Cost: £{formatNumber(property.cost)}
+
-
Cost: £{formatNumber(property.cost)}
- Co2 Savings (t): {property.co2Reduction}
+
+ Co2 Savings (t): {property.co2Reduction}
+
+
+
+
- Go to Plan
+
))}
@@ -101,7 +125,7 @@ export default async function Page({
id: "d290f1ee-6c54-4b01-90e6-d701748f0851",
title: "Portfolio 1",
budget: 500000,
- properties: generateProperties(500000, "1") as Property[],
+ properties: generateProperties(500000, "1", "scoping") as Property[],
co2Reduction: 5.4,
totalWorksHours: 45,
totalValueIncrease: 500000 * 1.2,
@@ -116,7 +140,7 @@ export default async function Page({
totalWorksHours: 30,
totalValueIncrease: 150000 * 1.2,
rentalYieldIncrease: 150000 * 0.002,
- properties: generateProperties(150000, "2") as Property[],
+ properties: generateProperties(150000, "2", "assessment") as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0853",
@@ -127,7 +151,7 @@ export default async function Page({
totalWorksHours: 100,
totalValueIncrease: 1000000 * 1.2,
rentalYieldIncrease: 1000000 * 0.002,
- properties: generateProperties(1000000, "3") as Property[],
+ properties: generateProperties(1000000, "3", "tendering") as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0854",
@@ -138,7 +162,7 @@ export default async function Page({
totalWorksHours: 150,
totalValueIncrease: 2000000 * 1.2,
rentalYieldIncrease: 2000000 * 0.002,
- properties: generateProperties(2000000, "4") as Property[],
+ properties: generateProperties(2000000, "4", "tendering") as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0855",
@@ -149,7 +173,11 @@ export default async function Page({
totalWorksHours: 15,
totalValueIncrease: 250000 * 1.2,
rentalYieldIncrease: 250000 * 0.002,
- properties: generateProperties(250000, "5") as Property[],
+ properties: generateProperties(
+ 250000,
+ "5",
+ "project underway"
+ ) as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0856",
@@ -160,7 +188,11 @@ export default async function Page({
totalWorksHours: 10,
totalValueIncrease: 410000 * 1.2,
rentalYieldIncrease: 410000 * 0.002,
- properties: generateProperties(410000, "6") as Property[],
+ properties: generateProperties(
+ 410000,
+ "6",
+ "completion; status 'on track'"
+ ) as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0857",
@@ -171,7 +203,11 @@ export default async function Page({
totalWorksHours: 25,
totalValueIncrease: 233000 * 1.2,
rentalYieldIncrease: 233000 * 0.002,
- properties: generateProperties(233000, "7") as Property[],
+ properties: generateProperties(
+ 233000,
+ "7",
+ "completion; status 'delayed'"
+ ) as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0858",
@@ -182,7 +218,11 @@ export default async function Page({
totalWorksHours: 65,
totalValueIncrease: 670000 * 1.2,
rentalYieldIncrease: 670000 * 0.002,
- properties: generateProperties(670000, "8") as Property[],
+ properties: generateProperties(
+ 670000,
+ "8",
+ "completion; status 'at risk'"
+ ) as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0859",
@@ -193,7 +233,11 @@ export default async function Page({
totalWorksHours: 40,
totalValueIncrease: 240000 * 1.2,
rentalYieldIncrease: 240000 * 0.002,
- properties: generateProperties(240000, "9") as Property[],
+ properties: generateProperties(
+ 240000,
+ "9",
+ "completion; status 'completed'"
+ ) as Property[],
},
{
id: "d290f1ee-6c54-4b01-90e6-d701748f0860",
@@ -204,7 +248,7 @@ export default async function Page({
totalWorksHours: 18,
totalValueIncrease: 93000 * 1.2,
rentalYieldIncrease: 93000 * 0.002,
- properties: generateProperties(93000, "10") as Property[],
+ properties: generateProperties(93000, "10", "needs review") as Property[],
},
];
const demo_id = "f290f1ee-6c54-4b01-90e6-d701748f0851";