Add job order count for hubs in jo form. #596
This commit is contained in:
parent
625236667b
commit
b761e2bfb5
3 changed files with 62 additions and 60 deletions
|
|
@ -92,7 +92,7 @@ class HubSelector
|
||||||
$hubs_round_robin = $this->filterHubsByRoundRobin($filtered_hubs, $flag_round_robin);
|
$hubs_round_robin = $this->filterHubsByRoundRobin($filtered_hubs, $flag_round_robin);
|
||||||
$filtered_hubs = $hubs_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
|
// max results filter
|
||||||
$hubs_max_result = $this->filterHubsByMaxResults($filtered_hubs, $limit_results, $jo_id, $customer_id);
|
$hubs_max_result = $this->filterHubsByMaxResults($filtered_hubs, $limit_results, $jo_id, $customer_id);
|
||||||
|
|
|
||||||
|
|
@ -2035,6 +2035,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
||||||
|
|
||||||
// counters
|
// counters
|
||||||
$hub['rider_count'] = count($hub['hub']->getAvailableRiders());
|
$hub['rider_count'] = count($hub['hub']->getAvailableRiders());
|
||||||
|
$hub['redis_jo_count'] = $hub['jo_count'];
|
||||||
$hub['jo_count'] = count($hub['hub']->getForAssignmentJobOrders());
|
$hub['jo_count'] = count($hub['hub']->getForAssignmentJobOrders());
|
||||||
|
|
||||||
// check for rejection
|
// check for rejection
|
||||||
|
|
@ -2337,6 +2338,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
||||||
|
|
||||||
// counters
|
// counters
|
||||||
$hub['rider_count'] = count($hub['hub']->getAvailableRiders());
|
$hub['rider_count'] = count($hub['hub']->getAvailableRiders());
|
||||||
|
$hub['redis_jo_count'] = $hub['jo_count'];
|
||||||
$hub['jo_count'] = count($hub['hub']->getForAssignmentJobOrders());
|
$hub['jo_count'] = count($hub['hub']->getForAssignmentJobOrders());
|
||||||
|
|
||||||
// check for rejection
|
// check for rejection
|
||||||
|
|
|
||||||
|
|
@ -645,67 +645,67 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if mode in ['update-processing', 'update-reassign-hub'] %}
|
{% if mode in ['update-processing', 'update-reassign-hub'] %}
|
||||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||||
<div class="m-form__section">
|
<div class="m-form__section">
|
||||||
<div class="m-form__heading">
|
<div class="m-form__heading">
|
||||||
<h3 class="m-form__heading-title">
|
<h3 class="m-form__heading-title">
|
||||||
Nearest Hubs
|
Nearest Hubs
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<label>Click on a row to select a hub</label>
|
<label>Click on a row to select a hub</label>
|
||||||
<div class="form-control-feedback hide" data-field="hub"></div>
|
<div class="form-control-feedback hide" data-field="hub"></div>
|
||||||
<div class="table-frame" data-name="hub">
|
<div class="table-frame" data-name="hub">
|
||||||
<table id="hubs-table" class="table table-compact table-hover table-clickable m-table">
|
<table id="hubs-table" class="table table-compact table-hover table-clickable m-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Hub</th>
|
<th>Hub</th>
|
||||||
<th>Branch</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">Travel Time</th>
|
-->
|
||||||
-->
|
<th class="text-right">Available Riders</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">Jobs For Assignment</th>
|
||||||
<th class="text-right">Inventory</th>
|
<th class="text-right">Inventory</th>
|
||||||
<th>Contact Numbers</th>
|
<th>Contact Numbers</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="placeholder-row{{ hubs|length > 0 ? ' hide' }}">
|
<tr class="placeholder-row{{ hubs|length > 0 ? ' hide' }}">
|
||||||
<td colspan="7">
|
<td colspan="8">
|
||||||
No items to display.
|
No items to display.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% for hub in hubs %}
|
{% for hub in hubs %}
|
||||||
<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"' }}>
|
<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.getName }}</td>
|
||||||
<td>{{ hub.hub.getBranch }}</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.duration ? hub.duration : '-' }}</td>
|
-->
|
||||||
-->
|
<td class="text-right">{{ hub.rider_count }}</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.jo_count }}</td>
|
||||||
<td class="text-right">{{ hub.inventory|default('0') }}</td>
|
<td class="text-right">{{ hub.inventory|default('0') }}</td>
|
||||||
<td>{{ hub.hub.getContactNumbers|replace({"\n": ', '}) }}</td>
|
<td>{{ hub.hub.getContactNumbers|replace({"\n": ', '}) }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if hub.flag_rejected %}
|
{% if hub.flag_rejected %}
|
||||||
<button type="button" class="btn btn-danger btn-disabled" disabled>Rejected</button>
|
<button type="button" class="btn btn-danger btn-disabled" disabled>Rejected</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="button" data-hub-id="{{ hub.hub.getID }}" data-hub-name="{{ hub.hub.getName }}" data-hub-branch="{{ hub.hub.getBranch }}" class="btn-reject btn btn-info">Reject</button>
|
<button type="button" data-hub-id="{{ hub.hub.getID }}" data-hub-name="{{ hub.hub.getName }}" data-hub-branch="{{ hub.hub.getBranch }}" class="btn-reject btn btn-info">Reject</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||||
<div class="m-form__section">
|
<div class="m-form__section">
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue