FIX_SalesTracker4
This commit is contained in:
parent
7fe3bb1ebd
commit
997aae68ef
@ -825,6 +825,7 @@ class LeadsController extends BaseController
|
||||
$last_3_years_claims = $data['finyear'];
|
||||
|
||||
$processedData[] = [
|
||||
'actual_lead_id' => $data['actual_lead_id'] ?? null,
|
||||
'lead_type' => $data['lead_type'],
|
||||
'issuer' => $data['issuer'],
|
||||
'client_type' => $data['client_type'],
|
||||
|
||||
@ -863,9 +863,10 @@ class SalesController extends BaseController
|
||||
|
||||
// 5. Team Performance
|
||||
$teamPerformance = $db->table('user_profiles as u')
|
||||
->select('u.first_name, u.last_name, u.profile as role,
|
||||
->select('u.first_name, u.last_name, r.role,
|
||||
(SELECT COUNT(*) FROM sales_activities WHERE assigned_to = u.id) as total_acts,
|
||||
(SELECT COUNT(*) FROM sales_activities WHERE assigned_to = u.id AND status = "completed") as done_acts')
|
||||
->join('roles r', 'r.id = u.role')
|
||||
->where('u.nhance_branch_id', $branchId)
|
||||
->whereIn('u.id', $sales_manager_ids)
|
||||
->where('u.is_active', 1)
|
||||
|
||||
@ -2077,7 +2077,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (in_array(get_role_id(), [1, 2, 3, 4]) || in_array(SALES_TEAM_ID, user_team())) { ?>
|
||||
<?php if (in_array(get_role_id(), [1, 5]) || (get_role_id() == 4 && in_array(SALES_TEAM_ID, user_team()))) { ?>
|
||||
<li class="li-seperate" id="app-sales-tracker-li">
|
||||
<a id="app_sales_tracker" href="#sidebarSalesTrackermenu" data-toggle="collapse" class="waves-effect img-inactive" style="color: grey;">
|
||||
<img
|
||||
|
||||
@ -238,15 +238,17 @@
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="empty-state">No activities found</div>
|
||||
<div class="empty-state">
|
||||
<div class="empty-icon">✓</div> No activities found
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card" style="grid-column: 1 / -1; width: 100%; box-sizing: border-box;">
|
||||
<div class="table-header">
|
||||
<h3 style="font-size: 16px; font-weight: 700;">All Leads Overview</h3>
|
||||
<h3 style="font-size: 16px; font-weight: 700;">All Leads Overview <?php echo !empty($leads_overview) ? "<i>(".count($leads_overview).")</i>" : ""; ?></h3>
|
||||
<!-- <span style="color: #718096; font-size: 12px; font-weight: 600;">Click a lead to see details</span> -->
|
||||
<a href="<?= base_url('sales') ?>"
|
||||
style="color: #718096; font-size: 12px; font-weight: 600; text-decoration: none; padding: 4px 8px; transition: color 0.2s ease; display: inline-block; cursor: pointer;"
|
||||
@ -261,8 +263,8 @@
|
||||
<th>Company</th>
|
||||
<th>Status</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Activities</th>
|
||||
<th>Opportunities</th>
|
||||
<th style="text-align: center !important;">Activities</th>
|
||||
<th style="text-align: center !important;">Opportunities</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -280,7 +282,9 @@
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<div class="empty-state">No leads found</div>
|
||||
<div class="empty-state">
|
||||
<div class="empty-icon">👤</div> No leads found
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -54,14 +54,14 @@
|
||||
}
|
||||
|
||||
/* Fix for inputs inside modal rows */
|
||||
input, select, textarea {
|
||||
width: 100%; /* Change from 400px to 100% */
|
||||
box-sizing: border-box; /* Ensures padding doesn't add to width */
|
||||
/* input, select, textarea {
|
||||
width: 100%; * Change from 400px to 100% *
|
||||
box-sizing: border-box; * Ensures padding doesn't add to width *
|
||||
padding: 10px 15px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
} */
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user