feat: client pipeline view + notes tab + stage badges
- Pipeline/kanban view on Clients page (toggle grid/pipeline) - Pipeline summary bar showing client distribution across stages - Stage badge on client cards and detail page (click to cycle) - Notes tab on ClientDetailPage with add/edit/pin/delete - StageBadge component with color-coded labels - Stage selector in ClientForm - API client methods for notes CRUD
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Profile, Client, ClientCreate, Event, EventCreate, Email, EmailGenerate, User, Invite, ActivityItem, InsightsData, ImportPreview, ImportResult, NetworkMatch, NetworkStats } from '@/types';
|
||||
import type { Profile, Client, ClientCreate, ClientNote, Event, EventCreate, Email, EmailGenerate, User, Invite, ActivityItem, InsightsData, ImportPreview, ImportResult, NetworkMatch, NetworkStats } from '@/types';
|
||||
|
||||
const API_BASE = import.meta.env.PROD
|
||||
? 'https://api.thenetwork.donovankelly.xyz/api'
|
||||
@@ -404,6 +404,29 @@ class ApiClient {
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
// Client Notes
|
||||
async getClientNotes(clientId: string): Promise<ClientNote[]> {
|
||||
return this.fetch(`/clients/${clientId}/notes`);
|
||||
}
|
||||
|
||||
async createClientNote(clientId: string, content: string): Promise<ClientNote> {
|
||||
return this.fetch(`/clients/${clientId}/notes`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ content }),
|
||||
});
|
||||
}
|
||||
|
||||
async updateClientNote(clientId: string, noteId: string, data: { content?: string; pinned?: boolean }): Promise<ClientNote> {
|
||||
return this.fetch(`/clients/${clientId}/notes/${noteId}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
}
|
||||
|
||||
async deleteClientNote(clientId: string, noteId: string): Promise<void> {
|
||||
await this.fetch(`/clients/${clientId}/notes/${noteId}`, { method: 'DELETE' });
|
||||
}
|
||||
|
||||
// Reports & Analytics
|
||||
async getReportsOverview(): Promise<any> {
|
||||
return this.fetch('/reports/overview');
|
||||
|
||||
Reference in New Issue
Block a user