Commit graph

1077 commits

Author SHA1 Message Date
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
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
cadf15af54 corrected migration files 2026-05-06 15:21:02 +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
278f2af758 revert unpushed migration 2026-05-06 14:30:14 +00:00
Khalim Conn-Kowlessar
bf85787936 re-designing UI for PM' 2026-05-06 14:23:54 +00:00
Daniel Roth
64b7c27878 correct casing 2026-05-06 14:13:59 +00:00
Daniel Roth
92eefd4ab4 migration files 2026-05-06 14:03:20 +00:00
Daniel Roth
09697884eb add postcode to plan 2026-05-06 14:03:00 +00:00
Daniel Roth
6ad0d069ee revert migration 2026-05-06 14:02:28 +00:00
Daniel Roth
dbbaedd6cd migration files 2026-05-06 13:59:48 +00:00
Daniel Roth
a1b086f18e indent 2026-05-06 13:58:51 +00:00
Daniel Roth
19df0e2cd5 indent 2026-05-06 13:58:12 +00:00
Daniel Roth
9f6eb888d9 correct casing 2026-05-06 13:57:49 +00:00
Daniel Roth
e85eabf89d correct column name in window 2026-05-06 13:56:54 +00:00
Daniel Roth
855cf2a10b change door width to mm 2026-05-06 13:56:46 +00:00
Daniel Roth
dd02b7f85d indent 2026-05-06 13:55:02 +00:00
Daniel Roth
d63cfe6828 rename magic plan plan plan_name to name 2026-05-06 13:54:29 +00:00
Daniel Roth
a8c5e7e923 add magicplan tables 2026-05-06 13:52:55 +00:00
Khalim Conn-Kowlessar
a754f9a7a3 moving location of timeline 2026-05-06 12:10:30 +00:00
Khalim Conn-Kowlessar
dda2980cac redesigning ui for tracking page 2026-05-06 11:56:26 +00:00
Khalim Conn-Kowlessar
4734eeed07 updating live tracking new features UI 2026-05-05 20:43:19 +00:00
Khalim Conn-Kowlessar
1767733441 add vitest unit tests for pibi-selection service
Covers: happy path (tx committed, HubSpot called with
measures_for_pibi_ordered, pushed_at stamped), empty selection,
no approval rows touched, DB failure (ok=false, no HubSpot call),
HubSpot failure (pushed_at null), correct property name assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 19:15:05 +00:00
Khalim Conn-Kowlessar
240b633928 add PIBI measure selector to property drawer
Adds PibiMeasureSelector component (issue #254) inside the drawer's
PIBI section. Approvers see a checkbox multi-select listing proposed +
instructed measures; approved measures are pre-ticked. Non-approvers
retain the existing read-only chip list. Saves via POST
/api/portfolio/[portfolioId]/pibi-measures and invalidates the query
cache on success.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 19:14:33 +00:00
Khalim Conn-Kowlessar
1e5eb09c3e add pibi-measures route
Adds POST /api/portfolio/[portfolioId]/pibi-measures (approver-gated)
that accepts { dealId, measureNames[] } and delegates to
selectPibiMeasures. Also adds a GET handler that returns the current
pibi_ordered selection, approved measures, and instructed measures for
a deal — used by the drawer's PIBI selector to pre-populate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 19:14:20 +00:00
Khalim Conn-Kowlessar
091388692e add pibi-selection service
Implements selectPibiMeasures (issue #254): replaces all pibi_ordered
rows for a deal, then pushes the new list to HubSpot under
measures_for_pibi_ordered via syncMeasuresFieldToHubSpot. Mirrors the
instruct-measure service; no approval rows touched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 19:14:12 +00:00
Khalim Conn-Kowlessar
c5083cbc78 add instruct-measure drawer form
Approver-only catalogue dropdown + submit button at the bottom of the
Measures section with optimistic chip rendering, error surfacing, and
the out-of-order soft warning when technical-approved measures already
exist on the deal.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:58:01 +00:00
Khalim Conn-Kowlessar
7de92cf5ea add instruct-measure service, route and soft-warning helper
Approver-only flow that records an instructed measure in
user_defined_deal_measures, auto-creates a deal_measure_approvals row +
event in a single tx, then pushes the instructed list to HubSpot under
instructed_measures. When the deal has no proposed measures and no prior
approvals, also pushes the new measure as proposed_measures so the deal
has a coherent starting point. Soft-warning helper surfaces the
out-of-order case for the drawer (and later slices).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:56:48 +00:00
Khalim Conn-Kowlessar
4181af6d15 add syncMeasuresFieldToHubSpot helper
Generic push for multi-value HubSpot deal properties (semicolon-separated)
with the same ECONNRESET retry pattern as pushDealPropertiesToHubSpot.
Returns a discriminated ok result so callers can stamp pushed_at only on
success. Slice 4 (PIBI selections) will reuse the same helper.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:56:19 +00:00
Khalim Conn-Kowlessar
54e093891d add user_defined_deal_measures table migration and schema
Track instructed and pibi-ordered measures locally with a source enum,
created-by user, and HubSpot sync timestamps so issue #253 can persist
approver instructions and slice 4 can reuse the table for PIBI selections.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:56:09 +00:00
Khalim Conn-Kowlessar
a69dac1fca add editable domna survey section and cypress spec
Replaces the read-only Domna InfoRow block with a DomnaEditor that lets
approvers set a free-text survey type and a survey date with optimistic
update + error surfacing, mirroring the halted-state editor. Non-approvers
keep the read-only InfoRow view. Cypress spec covers the approver flow
end-to-end with a reload-persistence check.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:38:17 +00:00
Khalim Conn-Kowlessar
1336d90c8d add domna survey fields to deal-properties registry
Plug `domna_survey_type` and `domna_survey_date` into
DEAL_PROPERTY_FIELDS, gated on the approver capability and reusing the
shared string-or-null + ISO date schemas. Drops the now-unused boolean
column types from the field registry. Vitest cases cover validation,
capability gating, HubSpot mapping, independent setting and clear-to-null.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:37:57 +00:00
Khalim Conn-Kowlessar
73a365468a migrate domna_survey_required -> domna_survey_type
Drops the too-coarse boolean column and adds a free-text
`domna_survey_type` column on hubspot_deal_data so an approver can record
the survey kind directly. Updates the Drizzle schema, the HubspotDeal
type, and the live-tracking page mapping to expose the new column.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:37:38 +00:00
Khalim Conn-Kowlessar
3070f2c763 add editable halted state section and cypress spec
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:26:18 +00:00
Khalim Conn-Kowlessar
e020b3fd83 add halted state fields and approver capability gate
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 18:24:43 +00:00