diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index d049a5c23..59db8447c 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -285,18 +285,23 @@ } + // We need a special formatter for license seats, since they don't work exactly the same + // + function licenseSeatInOutFormatter (value, row) { + + if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && (!row.assigned_to)) { + return '{{ trans('general.checkout') }}'; + } else { + + } + } + function genericCheckinCheckoutFormatter(destination) { return function (value,row) { // The user is allowed to check items out, AND the item is deployable - if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && (!row.assigned_to)) { - // case for licenses - if (row.next_seat) { - return '{{ trans('general.checkout') }}'; - } else { - return '{{ trans('general.checkout') }}'; - } - + if ((row.available_actions.checkout == true) && (row.user_can_checkout == true) && ((!row.asset_id) && (!row.assigned_to))) { + return '{{ trans('general.checkout') }}'; // The user is allowed to check items out, but the item is not deployable } else if (((row.user_can_checkout == false)) && (row.available_actions.checkout == true) && (!row.assigned_to)) {