From 79197a719eac2030410715d5f6eb6f607724cd8c Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 11 Mar 2017 12:11:24 -0800 Subject: [PATCH] =?UTF-8?q?Fixes=20BS=20tables=20for=20items=20that=20don?= =?UTF-8?q?=E2=80=99t=20have=20a=20checkin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/partials/bootstrap-table.blade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index 11e85ae8a9..e3ef85dfcf 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -146,17 +146,17 @@ $('.snipe-table').bootstrapTable({ return function (value,row) { // The user is allowed to check items out, AND the item is deployable - if ((row.available_actions.checkout === true) && (row.can_checkout === true)) { - + if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && (!row.assigned_to)) { return '{{ trans('general.checkout') }}'; // The user is allowed to check items out, but the item is not deployable - } else if (((row.can_checkout == 'true')) && (row.available_actions.checkout == 'false') && (row.assigned_to == null)) { + } else if (((row.user_can_checkout == false)) && (row.available_actions.checkout == true) && (!row.assigned_to)) { return '{{ trans('general.checkout') }}'; // The user is allowed to check items in - } else if (row.available_actions.checkin === true) { + } else if ((row.available_actions.checkin == true) && (row.assigned_to)) { return '{{ trans('general.checkin') }}'; + } }