refactor: move PipelineItems from Zustand to Provider→Service→React Query

PipelineItems are domain data and must not live in Zustand. Moves the
full stack to the correct layer: MockupPipelineProvider (localStorage
persistence + seed fallback) → pipelineService → usePipeline hooks
(useQuery for reads, useMutation for writes with cache invalidation).

pipelineStore is now UI-only: dialogOpen, pendingItem, openSavedDialog,
closeSavedDialog. All consumers updated to use the new hooks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-24 12:32:57 +02:00
parent 0582031930
commit 723f553939
12 changed files with 303 additions and 115 deletions
+14
View File
@@ -24,3 +24,17 @@ export interface PipelineItem {
notes?: string
assignedTo?: string
}
export interface PendingPipelineItem {
resultId: string
resultType: PipelineItem['resultType']
title: string
location?: string
matchScore: number
propertyId?: string
unitId?: string
propertyAddress?: string
areaLabel?: string
rentLabel?: string
availabilityLabel?: string
}