Commit graph

1328 commits

Author SHA1 Message Date
Khalim Conn-Kowlessar
1345f36d8d Add test coverage for transforms.ts stage classification logic
Some checks failed
Test Suite / unit-tests (push) Has been cancelled
49 tests across all exported functions: resolveDisplayStage (STAGE_ID_MAP
lookups, AFTER_ASSESSMENT sub-classification, POST_DESIGN precedence chain,
RA ISSUE overrides), classifyDeals, computeDampMouldRisk, computeFunnelStages,
computeProjectProgress (Queries exclusion from percentages), computeOutcomeSlices,
and computeLiveTrackerData (__ALL__ synthetic project behaviour).
2026-05-12 13:29:00 +00:00
Khalim Conn-Kowlessar
7841e4a556 xtracted duplicated removal state logic into a shared module.
Created removalState.ts with two functions: deriveEffectiveRemovalState (single DB row → EffectiveRemovalState) and computeRemovalStatusByDeal (ordered rows → RemovalStatusByDeal map, owns deduplication).
Created removalState.test.ts with 11 tests covering all 6 (type, status) combinations and the map-building edge cases (empty input, deduplication, none entries excluded).
live/page.tsx: replaced a 14-line seen-set loop with a single computeRemovalStatusByDeal(removalRows) call.
live/[dealId]/page.tsx: replaced an if/else block with deriveEffectiveRemovalState(removalRows[0]).
2026-05-12 13:12:14 +00:00
Khalim Conn-Kowlessar
e52ab73e9f Remove unused WorkPhaseStats and consolidate deal mapping into shared module
Delete WorkPhaseStats type and its four computation blocks (coordination,
design, install, lodgement) from transforms.ts and types.ts — the computed
values were never read by any component.

Extract mapDbRowToHubspotDeal, DealRow, and the coordinator/designer aliases
into a new dealQuery.ts module, eliminating the verbatim duplication between
the live tracker page and the deal detail page.

Replace the inline doc status computation in [dealId]/page.tsx with calls
to the existing fetchDocsByDealId and computeDocStatusMap from docStatus.ts,
so both paths now share a single implementation.
2026-05-12 13:00:09 +00:00
Khalim Conn-Kowlessar
281f15c11e Move the DocStatusMap computation and document fetch logic out of the
server component into a dedicated docStatus.ts module. computeDocStatusMap
is now a pure function with full test coverage (8 tests). Also consolidates
the double user table lookup in page.tsx into a single query.
2026-05-12 12:16:57 +00:00
Khalim Conn-Kowlessar
166cea397b refactoring details drawer to orchestrator format 2026-05-12 11:24:08 +00:00
Khalim Conn-Kowlessar
f6b9f9f65c Updating UI for document upload to improve confusing categorisation
Some checks failed
Test Suite / unit-tests (push) Has been cancelled
2026-05-10 20:11:33 +00:00
Khalim Conn-Kowlessar
9654c2cfd7 remove uprn from page view 2026-05-09 08:58:49 +00:00
Khalim Conn-Kowlessar
d467a61c22 Adding bulk approve and instruct 2026-05-09 08:39:20 +00:00
Khalim Conn-Kowlessar
1620a9a65f move back to 7xl width 2026-05-08 17:36:30 +00:00
Khalim Conn-Kowlessar
7b6763934c increased width of layout to 8xl 2026-05-08 17:27:52 +00:00
Khalim Conn-Kowlessar
7bcac4f65a edited the pibi request ui 2026-05-08 12:53:35 +00:00
Khalim Conn-Kowlessar
3793a55b44 make other documents collapsible 2026-05-08 11:13:57 +00:00
Khalim Conn-Kowlessar
011c3ec2c1 collapsed measures section 2026-05-08 11:06:01 +00:00
Khalim Conn-Kowlessar
2bff0357c6 added missing approvedMeasures 2026-05-08 10:59:36 +00:00
Khalim Conn-Kowlessar
e2b7bc9d93 moving the documents ui to the deal page view 2026-05-08 10:45:40 +00:00
Khalim Conn-Kowlessar
5154b665ef added tests for pre sap ui with removed duplication 2026-05-08 09:02:21 +00:00
Khalim Conn-Kowlessar
1c764a77b4 fixed datetie for hs 2026-05-07 21:37:08 +00:00
Khalim Conn-Kowlessar
5eced11db1 reverse order of activity log 2026-05-07 21:09:28 +00:00
Khalim Conn-Kowlessar
43e3d0b8f3 making activity log scrollable 2026-05-07 21:05:55 +00:00
Khalim Conn-Kowlessar
49adf11a4e added stubbed activity log 2026-05-07 20:50:27 +00:00
Khalim Conn-Kowlessar
9118f9202b fixing multi company bug 2026-05-07 20:08:04 +00:00
Khalim Conn-Kowlessar
2468d3600b Merge branch 'main' of https://github.com/Hestia-Homes/assessment-model into feature/pm-ui-ux 2026-05-07 18:26:05 +00:00
KhalimCK
28735205fb
Merge pull request #264 from Hestia-Homes/feature/db-migrations-0197
adding index to allow multiple organidations to be mapped to a project
2026-05-07 19:20:49 +01:00
Khalim Conn-Kowlessar
4357ae9802 add schema files and migration 0198 for magic_plan_uid 2026-05-07 18:13:17 +00:00
Khalim Conn-Kowlessar
00e22a15e9 Merge branch 'main' of https://github.com/Hestia-Homes/assessment-model into feature/db-migrations-0197 2026-05-07 17:08:08 +00:00
Khalim Conn-Kowlessar
7b45aa669d adding index to allow multiple organidations to be mapped to a project 2026-05-07 17:06:40 +00:00
Khalim Conn-Kowlessar
5f0617b691 adding multi organisation connect 2026-05-07 12:32:20 +00:00
Khalim Conn-Kowlessar
49519a8d82 changing layout 2026-05-07 12:14:47 +00:00
Khalim Conn-Kowlessar
feae34ac15 changing layout 2026-05-07 12:11:34 +00:00
Khalim Conn-Kowlessar
456ca454a6 fixing layout 2026-05-07 12:07:46 +00:00
Khalim Conn-Kowlessar
191310ebc4 fixing build error 2026-05-07 11:48:12 +00:00
Khalim Conn-Kowlessar
2fc87d4dbf updated PIBI ui 2026-05-07 11:26:22 +00:00
Khalim Conn-Kowlessar
2df592d1ac Merge branch 'main' of https://github.com/Hestia-Homes/assessment-model into feature/pm-ui-ux 2026-05-07 10:40:04 +00:00
KhalimCK
4c5dd5c68c
Merge pull request #263 from Hestia-Homes/feature/db-migrations
adding migration files for pm changes
2026-05-07 11:39:06 +01:00
Khalim Conn-Kowlessar
efc4a3bb56 adding migration files for pm changes 2026-05-07 09:08:11 +00:00
Khalim Conn-Kowlessar
a046ed4a5c working on pibi ui 2026-05-06 23:04:45 +00:00
Khalim Conn-Kowlessar
b919fb1646 modifying halted + moved pibi + additional survey 2026-05-06 20:57:06 +00:00
Khalim Conn-Kowlessar
19139b6253 Updated survey request UI for Devon County Council 2026-05-06 20:37:30 +00:00
Khalim Conn-Kowlessar
70374d56f0 moved position of lodgmenet status 2026-05-06 19:38:09 +00:00
Khalim Conn-Kowlessar
93cdc7a3d9 showing approved measures 2026-05-06 19:29:46 +00:00
Khalim Conn-Kowlessar
2b05abb185 Adding tests for modified approvals route 2026-05-06 19:10:47 +00:00
Khalim Conn-Kowlessar
ffb2f8c7c3 simplify second modal 2026-05-06 18:27:28 +00:00
Khalim Conn-Kowlessar
e6e94176cd sdding modal close 2026-05-06 18:16:55 +00:00
Khalim Conn-Kowlessar
fccf4130c8 added instruct measures approval 2026-05-06 18:00:06 +00:00
Daniel Roth
0eec1d8499
Merge pull request #262 from Hestia-Homes/feature/magicplan-tables
Magicplan tables - migration
2026-05-06 16:26:45 +01:00
Daniel Roth
cadf15af54 corrected migration files 2026-05-06 15:21:02 +00:00
Daniel Roth
2cf0985503 Merge branch 'main' into feature/magicplan-tables 2026-05-06 14:36:42 +00:00
KhalimCK
a456be3c54
Merge pull request #248 from Hestia-Homes/feature/additional-db-columns
added hubspot user table
2026-05-06 15:35:31 +01:00
Daniel Roth
e5fdea1608
Merge pull request #261 from Hestia-Homes/revert-unpushed-migration
revert unpushed migration
2026-05-06 15:34:17 +01:00
Daniel Roth
278f2af758 revert unpushed migration 2026-05-06 14:30:14 +00:00