diff --git a/app/Controllers/SalesController.php b/app/Controllers/SalesController.php index 44ea7aae..4e139caa 100644 --- a/app/Controllers/SalesController.php +++ b/app/Controllers/SalesController.php @@ -1238,9 +1238,23 @@ class SalesController extends BaseController /* ---------------- SUMMARY ---------------- */ - $summary = ucfirst($input['activity_type']) . - ' with ' . - $lead_data['company_name']; + $activityType = ucfirst($input['activity_type']); + + $prepositionMap = [ + 'Email' => 'to', + 'Call' => 'with', + 'Meeting' => 'with', + 'Visit' => 'to', + 'Demo' => 'with', + 'Share Docs' => 'to', + 'To Do' => 'for' + ]; + + $preposition = $prepositionMap[$activityType] ?? 'with'; + + $summary = "Activity scheduled : {$activityType} {$preposition} {$lead_data['company_name']}"; + + /* ---------------- GOOGLE PAYLOAD ---------------- */