Merge pull request #206 from Hestia-Homes/main
Some checks failed
Next.js Build Check / build (push) Has been cancelled

Fix for cooridnation numbre being wrong when things have finsihed
This commit is contained in:
Jun-te Kim 2026-03-19 17:14:36 +00:00 committed by GitHub
commit c8351c835f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,7 @@ const STAGE_ID_MAP: Record<string, string> = {
"2769407184": "Queries", //[Ops] Talk to client, Needs Heating Upgrade (Pre EPR C)
"2702650617": "AFTER_ASSESSMENT", //[Design] Ready for Design
"2473886962": "AFTER_ASSESSMENT", //[Design] Design in progress
"1668803774": "AFTER_ASSESSMENT", //[Ops] post-ERF / completed coordination stage
};
// -----------------------------------------------------------------------
@ -94,7 +95,7 @@ function resolveAfterAssessmentStage(
// Maps dealstage ID + coordinationStatus + designStatus -> DisplayStage
// -----------------------------------------------------------------------
export function resolveDisplayStage(deal: HubspotDeal): DisplayStage {
const raw = STAGE_ID_MAP[deal.dealstage ?? ""] ?? "Unknown Stage";
const raw = STAGE_ID_MAP[deal.dealstage ?? ""] ?? "AFTER_ASSESSMENT";
if (raw === "AFTER_ASSESSMENT") {
return resolveAfterAssessmentStage(