mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Highlighted row
This commit is contained in:
parent
4ceb39c833
commit
c2c50335f9
3 changed files with 17 additions and 3 deletions
|
|
@ -139,7 +139,7 @@ export async function GET(
|
|||
},
|
||||
{
|
||||
title:
|
||||
"Potential valuation return on investment - highlight indicative EPC effect",
|
||||
"Potential valuation return on investment - highlight indicative EPC effect*",
|
||||
scenarios: [
|
||||
{
|
||||
scenarioName: portfolioName,
|
||||
|
|
|
|||
|
|
@ -55,6 +55,13 @@ export const useFetchPortfolioSummary = ({
|
|||
});
|
||||
};
|
||||
|
||||
const shouldHighlightRow = (title: string) => {
|
||||
return [
|
||||
"Potential valuation improvement/unit - highlight indicative EPC effect*",
|
||||
"Potential valuation return on investment - highlight indicative EPC effect*",
|
||||
].includes(title);
|
||||
};
|
||||
|
||||
const SummaryTable = ({
|
||||
data,
|
||||
userPortfolios,
|
||||
|
|
@ -193,7 +200,14 @@ const SummaryTable = ({
|
|||
</TableHeader>
|
||||
<TableBody>
|
||||
{table.getRowModel().rows.map((row) => (
|
||||
<TableRow key={row.id}>
|
||||
<TableRow
|
||||
key={row.id}
|
||||
style={
|
||||
shouldHighlightRow(row.original.title)
|
||||
? { background: "#fbf8f8" }
|
||||
: {}
|
||||
}
|
||||
>
|
||||
{row.getVisibleCells().map((cell) => (
|
||||
<TableCell key={cell.id} className="px-6 py-4">
|
||||
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ export async function getOverviewPortfolioData(
|
|||
},
|
||||
{
|
||||
title:
|
||||
"Potential valuation return on investment - highlight indicative EPC effect",
|
||||
"Potential valuation return on investment - highlight indicative EPC effect*",
|
||||
scenarios: [
|
||||
{ scenarioName: "Today", data: "" },
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue