=== Lead Owner Summary Report API Test === 1. Lead Owner Summary Report: GET /api/reports/get_report_section Parameters: { "type": "lead_owner_summary", "startDate": "2024-01-01", "endDate": "2024-12-31" } Expected Response: { "success": true, "data": [ { "owner_id": 1, "owner_name": "Dr. Smith", "new_call_count": 15, "converted_count": 8, "touched_count": 25, "follow_up_count": 12, "junk_lead_count": 5, "lost_count": 3, "appointment_count": 10, "total_leads": 30 } ], "date_range": { "start_date": "2024-01-01", "end_date": "2024-12-31" } } === Lead Owner Detail Report API Test === 2. Lead Owner Detail Report (New Calls): GET /api/reports/get_report_section Parameters: { "type": "lead_owner_detail", "owner_id": 1, "status_type": "new_call", "startDate": "2024-01-01", "endDate": "2024-12-31", "page": 1, "pageSize": 10 } 3. Available Status Types for Detail Report: - new_call: Shows leads where lead_owner_id is NULL or empty - converted: Shows leads with status 'converted' - touched: Shows leads where lead_owner_id is not null/empty - follow_up: Shows leads with status in ('Not Contacted', 'Contact In Future', 'Attempted to Contact', 'Pre-Qualified') - junk_lead: Shows leads with status 'Junk Lead' - lost: Shows leads with status in ('Not-Qualified', 'Lost Lead') - appointment: Shows leads where book_an_appoitment_id is not null/empty === SQL Query Examples === 4. New Calls Query: SELECT * FROM lead_enquiry WHERE (lead_owner_id IS NULL OR lead_owner_id = '') AND created_at BETWEEN '2024-01-01 00:00:00' AND '2024-12-31 23:59:59'; 5. Follow Up Calls Query: SELECT * FROM lead_enquiry WHERE lead_status IN ('Not Contacted', 'Contact In Future', 'Attempted to Contact', 'Pre-Qualified') AND created_at BETWEEN '2024-01-01 00:00:00' AND '2024-12-31 23:59:59'; 6. Appointment Query: SELECT * FROM lead_enquiry WHERE (book_an_appoitment_id IS NOT NULL AND book_an_appoitment_id != '') AND created_at BETWEEN '2024-01-01 00:00:00' AND '2024-12-31 23:59:59'; === Frontend Integration Example === 7. Dashboard Cards HTML: