mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
split out epc summary card
This commit is contained in:
parent
a653e157e0
commit
fbefb31dd5
2 changed files with 30 additions and 13 deletions
|
|
@ -12,6 +12,7 @@ import { sapToEpc } from "@/app/utils";
|
|||
import { useState } from "react";
|
||||
import { sumRecommendationMetricMap } from "@/app/portfolio/[slug]/building-passport/[propertyId]/recommendations/utils";
|
||||
import { RecommendationMetricMap } from "@/types/recommendations";
|
||||
import RecommendationEpcSummaryCard from "./RecommendationEpcSummaryCard";
|
||||
|
||||
interface RecommendationContainerProps {
|
||||
recommendations: Recommendation;
|
||||
|
|
@ -70,19 +71,10 @@ export default function RecommendationContainer({
|
|||
totalSapPoints={totalSapPoints}
|
||||
/>
|
||||
|
||||
<table className="text-left bg-green-700 rounded-md text-gray-100">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="font-medium pl-4 py-2">Current EPC Rating:</td>
|
||||
<td className="font-bold pr-2">{currentEpcRating}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td className="font-medium pl-4 py-2">Expected EPC Rating:</td>
|
||||
<td className="font-bold pr-2">{expectedEpcRating}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<RecommendationEpcSummaryCard
|
||||
currentEpcRating={currentEpcRating}
|
||||
expectedEpcRating={expectedEpcRating}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Separator className="mb-4" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
interface RecommendationEpcSummaryCardProps {
|
||||
currentEpcRating: string;
|
||||
expectedEpcRating: string;
|
||||
}
|
||||
|
||||
export default function RecommendationEpcSummaryCard({
|
||||
currentEpcRating,
|
||||
expectedEpcRating,
|
||||
}: RecommendationEpcSummaryCardProps) {
|
||||
return (
|
||||
<table className="text-left bg-green-700 rounded-md text-gray-100">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="font-medium pl-4 py-2">Current EPC Rating:</td>
|
||||
<td className="font-bold pr-2">{currentEpcRating}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td className="font-medium pl-4 py-2">Expected EPC Rating:</td>
|
||||
<td className="font-bold pr-2">{expectedEpcRating}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue