Initial commit: Velocity-OS migration

This commit is contained in:
2026-05-01 12:32:19 +05:30
commit 407af828d4
283 changed files with 207782 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { useQuery } from '@tanstack/react-query';
import { api } from '@/shared/lib/apiClient';
/**
* useKanban — Pipeline Pillar kanban board data
* Returns leads grouped by stage.
*/
export function useKanban() {
const query = useQuery({
queryKey: ['kanban'],
queryFn: () => api.get<KanbanStage[]>('/crm/pipeline/kanban'),
staleTime: 30_000,
refetchInterval: 60_000,
});
return { stages: query.data ?? [], isLoading: query.isLoading };
}
export interface KanbanStage {
id: string;
label: string;
emoji: string;
leads: KanbanLead[];
}
export interface KanbanLead {
id: string;
name: string;
location?: string;
qdScore: number;
qdDelta?: number;
lastContactRelative: string;
lastContactChannel: string;
isVaultActive?: boolean;
}