feat(uat-batch-9): milestone classifier + skip-ahead backfill controls
Two coordinated UX changes that finally make the rep's manual-stage- jump workflow legible: - Milestone phase classifier introduces a "stage-owning milestone" rule. When the rep manually advances the deal to Reservation+ but earlier sub-statuses are still un-signed, the current-stage milestone now stays marked `'current'` (no longer collapses into the past-strip / upcoming-accordion based on completion alone). Earlier-than-stage milestones bucket to `'past'` so the rep can backfill them; later slots stay `'future'`. The previous firstIncompleteKey-driven rule still applies in stages without an owning milestone (enquiry / qualified / nurturing). - Skip-ahead backfill control `<MilestoneBackfillButton>` lands in the past-milestones strip whenever a milestone's date column is null. Opens a DatePicker popover (today default, accepts any past date) and PATCHes the relevant date_* column directly via useInterestPatch — no stage transition fires. - `InterestPatchField` extended with the five milestone date keys; validator gains `dateDepositReceived` (was the only missing one). Together this means: a deal manually-advanced from EOI Sent → Deposit no longer hides Reservation under upcoming-milestones AND the rep can record the EOI/reservation signing dates without re-triggering the stage transition. tsc clean. 1419/1419 vitest pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,7 @@ export const createInterestSchema = z.object({
|
||||
dateEoiSent: z.coerce.date().nullable().optional(),
|
||||
dateEoiSigned: z.coerce.date().nullable().optional(),
|
||||
dateReservationSigned: z.coerce.date().nullable().optional(),
|
||||
dateDepositReceived: z.coerce.date().nullable().optional(),
|
||||
dateContractSent: z.coerce.date().nullable().optional(),
|
||||
dateContractSigned: z.coerce.date().nullable().optional(),
|
||||
pipelineStage: z.enum(PIPELINE_STAGES).default('enquiry'),
|
||||
|
||||
Reference in New Issue
Block a user