Add job order count for hubs in jo form. #596

This commit is contained in:
Korina Cordero 2021-07-16 09:29:22 +00:00
parent 625236667b
commit b761e2bfb5
3 changed files with 62 additions and 60 deletions

View file

@ -92,7 +92,7 @@ class HubSelector
$hubs_round_robin = $this->filterHubsByRoundRobin($filtered_hubs, $flag_round_robin);
$filtered_hubs = $hubs_round_robin;
//error_log('round robin hubs ' . json_encode($filtered_hubs));
error_log('round robin hubs ' . json_encode($filtered_hubs));
// max results filter
$hubs_max_result = $this->filterHubsByMaxResults($filtered_hubs, $limit_results, $jo_id, $customer_id);

View file

@ -2035,6 +2035,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
// counters
$hub['rider_count'] = count($hub['hub']->getAvailableRiders());
$hub['redis_jo_count'] = $hub['jo_count'];
$hub['jo_count'] = count($hub['hub']->getForAssignmentJobOrders());
// check for rejection
@ -2337,6 +2338,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
// counters
$hub['rider_count'] = count($hub['hub']->getAvailableRiders());
$hub['redis_jo_count'] = $hub['jo_count'];
$hub['jo_count'] = count($hub['hub']->getForAssignmentJobOrders());
// check for rejection

View file

@ -662,11 +662,11 @@
<tr>
<th>Hub</th>
<th>Branch</th>
<!--
<th class="text-right">Distance</th>
<!--<th class="text-right">Distance</th>
<th class="text-right">Travel Time</th>
-->
<th class="text-right">Available Riders</th>
<th class="text-right">Job Order Count</th>
<th class="text-right">Jobs For Assignment</th>
<th class="text-right">Inventory</th>
<th>Contact Numbers</th>
@ -675,7 +675,7 @@
</thead>
<tbody>
<tr class="placeholder-row{{ hubs|length > 0 ? ' hide' }}">
<td colspan="7">
<td colspan="8">
No items to display.
</td>
</tr>
@ -684,11 +684,11 @@
<tr data-lat="{{ hub.hub.getCoordinates.getLatitude }}" data-lng="{{ hub.hub.getCoordinates.getLongitude }}" data-id="{{ hub.hub.getID }}"{{ obj.getHub and obj.getHub.getID == hub.hub.getID ? ' class="m-table__row--primary"' }}>
<td>{{ hub.hub.getName }}</td>
<td>{{ hub.hub.getBranch }}</td>
<!--
<td class="text-right">{{ hub.distance ? hub.distance : '-' }}</td>
<!--<td class="text-right">{{ hub.distance ? hub.distance : '-' }}</td>
<td class="text-right">{{ hub.duration ? hub.duration : '-' }}</td>
-->
<td class="text-right">{{ hub.rider_count }}</td>
<td class="text-right">{{ hub.redis_jo_count }}</td>
<td class="text-right">{{ hub.jo_count }}</td>
<td class="text-right">{{ hub.inventory|default('0') }}</td>
<td>{{ hub.hub.getContactNumbers|replace({"\n": ', '}) }}</td>