mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
added additional columns to properties table
This commit is contained in:
parent
3fc53cd1fa
commit
580398b447
4 changed files with 68 additions and 0 deletions
|
|
@ -52,6 +52,10 @@ const COLUMN_LABELS: Record<string, string> = {
|
|||
approvedPackage: "Approved Package",
|
||||
actualMeasuresInstalled: "Installed Measures",
|
||||
preSapScore: "Pre-SAP",
|
||||
eiScore: "EI Score",
|
||||
eiScorePotential: "EI Score (Potential)",
|
||||
epcSapScore: "EPC SAP Score",
|
||||
epcSapScorePotential: "EPC SAP (Potential)",
|
||||
lodgementStatus: "Lodgement Status",
|
||||
designDate: "Design Date",
|
||||
fullLodgementDate: "Lodgement Date",
|
||||
|
|
@ -82,6 +86,10 @@ const CSV_FIELDS: { key: keyof ClassifiedDeal; label: string }[] = [
|
|||
{ key: "approvedPackage", label: "Approved Package" },
|
||||
{ key: "actualMeasuresInstalled", label: "Installed Measures" },
|
||||
{ key: "preSapScore", label: "Pre-SAP" },
|
||||
{ key: "eiScore", label: "EI Score" },
|
||||
{ key: "eiScorePotential", label: "EI Score (Potential)" },
|
||||
{ key: "epcSapScore", label: "EPC SAP Score" },
|
||||
{ key: "epcSapScorePotential", label: "EPC SAP (Potential)" },
|
||||
{ key: "lodgementStatus", label: "Lodgement Status" },
|
||||
{ key: "designDate", label: "Design Date" },
|
||||
{ key: "fullLodgementDate", label: "Lodgement Date" },
|
||||
|
|
@ -115,6 +123,10 @@ export default function PropertyTable({ data, onOpenDrawer, onOpenDetail, showDo
|
|||
approvedPackage: false,
|
||||
actualMeasuresInstalled: false,
|
||||
preSapScore: false,
|
||||
eiScore: false,
|
||||
eiScorePotential: false,
|
||||
epcSapScore: false,
|
||||
epcSapScorePotential: false,
|
||||
lodgementStatus: false,
|
||||
designDate: false,
|
||||
fullLodgementDate: false,
|
||||
|
|
|
|||
|
|
@ -240,6 +240,54 @@ export function createPropertyTableColumns(
|
|||
},
|
||||
|
||||
|
||||
// ── EI score ─────────────────────────────────────────────────────────
|
||||
{
|
||||
accessorKey: "eiScore",
|
||||
id: "eiScore",
|
||||
header: ({ column }) => <SortableHeader label="EI Score" column={column as any} />,
|
||||
cell: ({ row }) => (
|
||||
<span className="text-xs font-mono text-gray-600">
|
||||
{row.original.eiScore ?? <span className="text-gray-300">—</span>}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
// ── EI score (potential) ──────────────────────────────────────────────
|
||||
{
|
||||
accessorKey: "eiScorePotential",
|
||||
id: "eiScorePotential",
|
||||
header: ({ column }) => <SortableHeader label="EI Score (Potential)" column={column as any} />,
|
||||
cell: ({ row }) => (
|
||||
<span className="text-xs font-mono text-gray-600">
|
||||
{row.original.eiScorePotential ?? <span className="text-gray-300">—</span>}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
// ── EPC SAP score ─────────────────────────────────────────────────────
|
||||
{
|
||||
accessorKey: "epcSapScore",
|
||||
id: "epcSapScore",
|
||||
header: ({ column }) => <SortableHeader label="EPC SAP Score" column={column as any} />,
|
||||
cell: ({ row }) => (
|
||||
<span className="text-xs font-mono text-gray-600">
|
||||
{row.original.epcSapScore ?? <span className="text-gray-300">—</span>}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
// ── EPC SAP score (potential) ─────────────────────────────────────────
|
||||
{
|
||||
accessorKey: "epcSapScorePotential",
|
||||
id: "epcSapScorePotential",
|
||||
header: ({ column }) => <SortableHeader label="EPC SAP (Potential)" column={column as any} />,
|
||||
cell: ({ row }) => (
|
||||
<span className="text-xs font-mono text-gray-600">
|
||||
{row.original.epcSapScorePotential ?? <span className="text-gray-300">—</span>}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
// ── Lodgement status ─────────────────────────────────────────────────
|
||||
{
|
||||
accessorKey: "lodgementStatus",
|
||||
|
|
|
|||
|
|
@ -60,6 +60,10 @@ function mapDbRowToHubspotDeal(row: DbDeal): HubspotDeal {
|
|||
confirmedSurveyDate: row.confirmedSurveyDate,
|
||||
surveyedDate: row.surveyedDate,
|
||||
designType: row.dealType,
|
||||
eiScore: row.eiScore,
|
||||
eiScorePotential: row.eiScorePotential,
|
||||
epcSapScore: row.epcSapScore,
|
||||
epcSapScorePotential: row.epcSapScorePotential,
|
||||
createdAt: row.createdAt,
|
||||
updatedAt: row.updatedAt,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@ export type HubspotDeal = {
|
|||
confirmedSurveyDate: Date | null;
|
||||
surveyedDate: Date | null;
|
||||
designType: string | null;
|
||||
eiScore: string | null;
|
||||
eiScorePotential: string | null;
|
||||
epcSapScore: string | null;
|
||||
epcSapScorePotential: string | null;
|
||||
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue