Merge branch '14-job-order-unlock' into 'master'
Resolve "Job order unlock" Closes #14 See merge request jankstudio/resq!26
This commit is contained in:
commit
c0dda9b2e4
2 changed files with 4 additions and 2 deletions
|
|
@ -294,6 +294,7 @@ class JobOrderController extends BaseController
|
|||
$tier_name = 'Fullfillment';
|
||||
$rows_route = 'jo_fulfill_rows';
|
||||
$edit_route = 'jo_fulfill_form';
|
||||
$unlock_route = '';
|
||||
$jo_status = [
|
||||
JOStatus::ASSIGNED,
|
||||
JOStatus::IN_PROGRESS
|
||||
|
|
@ -439,7 +440,8 @@ class JobOrderController extends BaseController
|
|||
|
||||
// add crud urls
|
||||
$row['meta']['update_url'] = $this->generateUrl($tier_params['edit_route'], ['id' => $row['id']]);
|
||||
$row['meta']['unlock_url'] = $this->generateUrl($tier_params['unlock_route'], ['id' => $row['id']]);
|
||||
if ($tier_params['unlock_route'] != '')
|
||||
$row['meta']['unlock_url'] = $this->generateUrl($tier_params['unlock_route'], ['id' => $row['id']]);
|
||||
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
template: function (row, index, datatable) {
|
||||
var actions = '<a href="' + row.meta.update_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="View / Edit"><i class="la la-edit"></i></a>';
|
||||
|
||||
{% if is_granted('jo_proc.unlock') %}
|
||||
{% if row.meta.unlock_url != "" && is_granted('jo_proc.unlock') %}
|
||||
actions += '<a href="' + row.meta.unlock_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="Unlock"><i class="fa fa-unlock"></i></a>';
|
||||
{% endif %}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue