feat: implement relational lead origins with team assignments
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m51s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m51s
- Dropped simple origins table in favor of origin_groups and origin_items to match the Funnels architecture. - Added origin_group_id to teams table to assign specific origins to specific teams. - Updated /admin/origins page to support creating origin groups, adding origin items to them, and assigning teams to groups. - Updated Dashboard and UserDetail pages to dynamically load the exact origin items belonging to the active team/user.
This commit is contained in:
16
types.ts
16
types.ts
@@ -23,6 +23,20 @@ export interface FunnelDef {
|
||||
teamIds: string[];
|
||||
}
|
||||
|
||||
export interface OriginItemDef {
|
||||
id: string;
|
||||
origin_group_id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface OriginGroupDef {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
name: string;
|
||||
items: OriginItemDef[];
|
||||
teamIds: string[];
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
@@ -50,7 +64,7 @@ export interface Attendance {
|
||||
first_response_time_min: number;
|
||||
handling_time_min: number;
|
||||
funnel_stage: string;
|
||||
origin: 'WhatsApp' | 'Instagram' | 'Website' | 'LinkedIn' | 'Indicação';
|
||||
origin: string;
|
||||
product_requested: string;
|
||||
product_sold?: string;
|
||||
converted: boolean;
|
||||
|
||||
Reference in New Issue
Block a user