Resolve "Rejection feature for hubs" #1027

Merged
jankstudio merged 5 commits from 183-rejection-feature-for-hubs into master 2019-02-12 09:20:30 +00:00
Showing only changes of commit 54bc9455a1 - Show all commits

View file

@ -561,7 +561,9 @@
-->
<th class="text-right">Available Riders</th>
<th class="text-right">Jobs For Assignment</th>
<th>Contact Numbers</th> </tr>
<th>Contact Numbers</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr class="placeholder-row{{ hubs|length > 0 ? ' hide' }}">
@ -581,6 +583,9 @@
<td class="text-right">{{ hub.rider_count }}</td>
<td class="text-right">{{ hub.jo_count }}</td>
<td>{{ hub.hub.getContactNumbers|replace({"\n": ', '}) }}</td>
<td>
<button type="button" class="button-reject btn btn-primary">Reject</button>
</td>
</tr>
{% endfor %}
</tbody>
@ -804,7 +809,7 @@
<button type="submit" class="btn btn-success">{{ mode == 'update-fulfillment' ? 'Fulfill' : 'Submit' }}</button>
{% endif %}
{% if ftags.set_map_coordinate and is_granted('joborder.cancel') and not obj.isCancelled %}
<a href="{{ url('jo_cancel', {'id': obj.getID}) }}" class="btn btn-danger btn-cancel-job-order">Cancel Job Order</button>
<a href="{{ url('jo_cancel', {'id': obj.getID}) }}" class="btn btn-danger btn-cancel-job-order">Cancel Job Order</a>
{% endif %}
{% if mode != 'create' %}
<a href="{{ return_url }}" class="btn btn-secondary">Back</a>
@ -1469,6 +1474,11 @@ $(function() {
var ticketTable = $("#data-tickets").mDatatable(ticketOptions);
{% endif %}
// reject job order
$(".button-reject").click(function(e) {
return false;
});
// cancel job order
$(".btn-cancel-job-order").click(function(e) {
var url = $(this).prop('href');