Resolve "Job order unlock" #837
2 changed files with 4 additions and 2 deletions
|
|
@ -294,6 +294,7 @@ class JobOrderController extends BaseController
|
||||||
$tier_name = 'Fullfillment';
|
$tier_name = 'Fullfillment';
|
||||||
$rows_route = 'jo_fulfill_rows';
|
$rows_route = 'jo_fulfill_rows';
|
||||||
$edit_route = 'jo_fulfill_form';
|
$edit_route = 'jo_fulfill_form';
|
||||||
|
$unlock_route = '';
|
||||||
$jo_status = [
|
$jo_status = [
|
||||||
JOStatus::ASSIGNED,
|
JOStatus::ASSIGNED,
|
||||||
JOStatus::IN_PROGRESS
|
JOStatus::IN_PROGRESS
|
||||||
|
|
@ -439,7 +440,8 @@ class JobOrderController extends BaseController
|
||||||
|
|
||||||
// add crud urls
|
// add crud urls
|
||||||
$row['meta']['update_url'] = $this->generateUrl($tier_params['edit_route'], ['id' => $row['id']]);
|
$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;
|
$rows[] = $row;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
template: function (row, index, datatable) {
|
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>';
|
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>';
|
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 %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue