save without background color

This commit is contained in:
Jun-te Kim 2025-11-03 12:26:54 +00:00
parent b8caeca263
commit 895b6e2e72
3 changed files with 15 additions and 16 deletions

View file

@ -9,6 +9,7 @@ export async function POST(req: Request) {
const { dealName, pipelineId, dealStageId, propertyId, portfolioId } =
await req.json();
// 1⃣ Create HubSpot deal
const hsRes = await fetch("https://api.hubapi.com/crm/v3/objects/deals", {
method: "POST",

View file

@ -12,7 +12,20 @@ interface ReportsProps {
const MAJOR_CONDITION_STAGE_ID = "3061261536";
export default function LiveTracker({ deals }: ReportsProps) {
const groupedDeals = deals.reduce((acc, deal) => {
const project = deal.projectCode || "Unknown Project";
(acc[project] ||= []).push(deal);
return acc;
}, {} as Record<string, any[]>);
const [openTable, setOpenTable] = useState<{ stage: string; data: any[] } | null>(null);
const projectCodes = Object.keys(groupedDeals);
const [currentProjectCode, setCurrentProjectCode] = useState(projectCodes[0]);
const currentDeals = groupedDeals[currentProjectCode];
const totalProperties = deals.length;
const majorConditionDeals = deals.filter(d => d.dealstage === MAJOR_CONDITION_STAGE_ID);
const majorIssues = majorConditionDeals.length;
const majorPercent = ((majorIssues / totalProperties) * 100).toFixed(1);
const handleOpenTable = (stage: string, filteredDeals: any[]) => {
setOpenTable({ stage, data: filteredDeals });
@ -26,21 +39,6 @@ export default function LiveTracker({ deals }: ReportsProps) {
);
}
const groupedDeals = deals.reduce((acc, deal) => {
const project = deal.projectCode || "Unknown Project";
(acc[project] ||= []).push(deal);
return acc;
}, {} as Record<string, any[]>);
const projectCodes = Object.keys(groupedDeals);
const [currentProjectCode, setCurrentProjectCode] = useState(projectCodes[0]);
const currentDeals = groupedDeals[currentProjectCode];
const totalProperties = deals.length;
const majorConditionDeals = deals.filter(d => d.dealstage === MAJOR_CONDITION_STAGE_ID);
const majorIssues = majorConditionDeals.length;
const majorPercent = ((majorIssues / totalProperties) * 100).toFixed(1);
return (
<div className="p-6 space-y-10">
{/* 🌍 Global Portfolio Overview */}

View file

@ -54,7 +54,7 @@ export default async function Demo(props: {
return (
<main className="relative min-h-screen overflow-hidden">
{/* 🌊 Domna-inspired layered background */}
<div className="absolute inset-0 -z-10 bg-[linear-gradient(135deg,#14163d_0%,#2d348f_45%,#3943b7_70%,#eff6fc_100%)]" />
{/* <div className="absolute inset-0 -z-10 bg-[linear-gradient(135deg,#14163d_0%,#2d348f_45%,#3943b7_70%,#eff6fc_100%)]" /> */}
{/* ✨ Subtle translucent grid texture */}
<div className="absolute inset-0 -z-0 opacity-10 bg-[radial-gradient(circle_at_top_left,rgba(255,255,255,0.7)_1px,transparent_0)] bg-[length:40px_40px]" />