2017-12-05 01:55:24 -08:00
<! doctype html >
2022-05-06 01:32:20 -07:00
< html lang = " { { str_replace('_', '-', app()->getLocale()) }} " >
2017-12-05 01:55:24 -08:00
< head >
< meta http - equiv = " Content-Type " content = " text/html; charset=utf-8 " />
2023-03-09 12:11:07 -08:00
< title > {{ trans ( 'general.assigned_to' , [ 'name' => $show_user -> present () -> fullName ()]) }} - {{ date ( 'Y-m-d H:i' , time ()) }} </ title >
2024-03-11 07:23:25 -07:00
< link rel = " shortcut icon " type = " image/ico " href = " { { ( $snipeSettings ) && ( $snipeSettings->favicon !='') ? Storage::disk('public')->url(e( $snipeSettings->favicon )) : config('app.url').'/favicon.ico' }} " >
2024-07-09 11:41:31 -07:00
< link rel = " stylesheet " href = " { { url(mix('css/dist/bootstrap-table.css')) }} " >
2024-03-11 07:23:25 -07:00
{{ -- stylesheets -- }}
< link rel = " stylesheet " href = " { { url(mix('css/dist/all.css')) }} " >
< script nonce = " { { csrf_token() }} " >
window . snipeit = {
settings : {
" per_page " : 50
}
};
</ script >
2017-12-05 01:55:24 -08:00
< style >
body {
font - family : " Arial, Helvetica " , sans - serif ;
2024-03-11 07:23:25 -07:00
padding : 20 px ;
2017-12-05 01:55:24 -08:00
}
2017-12-05 12:34:16 -08:00
table . inventory {
2017-12-05 01:55:24 -08:00
width : 100 % ;
2024-03-18 06:06:08 -07:00
border : 1 px solid #d3d3d3;
2017-12-05 01:55:24 -08:00
}
@ page {
size : A4 ;
}
2024-03-11 07:23:25 -07:00
2018-07-24 13:37:02 -07:00
. print - logo {
max - height : 40 px ;
}
2024-03-13 05:36:17 -07:00
h4 {
margin - top : 20 px ;
margin - bottom : 10 px ;
}
2017-12-05 01:55:24 -08:00
</ style >
2024-03-11 07:23:25 -07:00
< script nonce = " { { csrf_token() }} " >
window . snipeit = {
settings : {
" per_page " : 50
}
};
</ script >
2017-12-05 01:55:24 -08:00
</ head >
< body >
2022-05-06 02:06:12 -07:00
2018-07-24 13:37:02 -07:00
@ if ( $snipeSettings -> logo_print_assets == '1' )
@ if ( $snipeSettings -> brand == '3' )
2020-03-31 21:30:24 -07:00
< h2 >
2022-05-06 02:06:12 -07:00
@ if ( $snipeSettings -> logo != '' )
2023-04-05 16:05:40 -07:00
< img class = " print-logo " src = " { { config('app.url') }}/uploads/ { { $snipeSettings->logo }} " >
2022-05-06 02:06:12 -07:00
@ endif
{{ $snipeSettings -> site_name }}
2020-03-31 23:36:56 -07:00
</ h2 >
2018-07-24 13:37:02 -07:00
@ elseif ( $snipeSettings -> brand == '2' )
@ if ( $snipeSettings -> logo != '' )
2023-04-05 16:05:40 -07:00
< img class = " print-logo " src = " { { config('app.url') }}/uploads/ { { $snipeSettings->logo }} " >
2018-07-24 13:37:02 -07:00
@ endif
@ else
2022-05-06 02:06:12 -07:00
< h2 > {{ $snipeSettings -> site_name }} </ h2 >
2018-07-24 13:37:02 -07:00
@ endif
@ endif
2024-03-18 06:29:01 -07:00
< h3 >
{{ trans ( 'general.assigned_to' , [ 'name' => $show_user -> present () -> fullName ()]) }}
{{ ( $show_user -> employee_num != '' ) ? ' (#' . $show_user -> employee_num . ') ' : '' }}
{{ ( $show_user -> jobtitle != '' ? ' - ' . $show_user -> jobtitle : '' ) }}
2023-03-08 11:56:14 -08:00
</ h3 >
2024-07-14 10:10:33 -07:00
< p ></ p > {{ trans ( 'admin/users/general.all_assigned_list_generation' )}} {{ Helper :: getFormattedDateObject ( now (), 'datetime' , false ) }}
</ body >
2022-05-06 02:06:12 -07:00
@ if ( $assets -> count () > 0 )
@ php
$counter = 1 ;
@ endphp
2024-03-11 07:23:25 -07:00
2024-03-13 05:36:17 -07:00
< div id = " assets-toolbar " >
2024-03-18 14:17:46 -07:00
< h4 > {{ trans_choice ( 'general.countable.assets' , $assets -> count (), [ 'count' => $assets -> count ()]) }}
</ h4 >
2024-03-11 07:23:25 -07:00
</ div >
< table
class = " snipe-table table table-striped inventory "
2024-03-13 05:36:17 -07:00
id = " AssetsAssigned "
data - pagination = " false "
data - id - table = " AssetsAssigned "
data - search = " false "
2024-03-11 07:23:25 -07:00
data - side - pagination = " client "
2024-03-18 14:17:46 -07:00
data - sortable = " true "
2024-03-13 05:36:17 -07:00
data - toolbar = " #assets-toolbar "
2024-03-11 07:23:25 -07:00
data - show - columns = " true "
data - sort - order = " desc "
data - sort - name = " created_at "
2024-03-13 05:36:17 -07:00
data - show - columns - toggle - all = " true "
data - cookie - id - table = " AssetsAssigned " >
2022-05-06 02:06:12 -07:00
< thead >
2024-03-18 14:17:46 -07:00
< th data - field = " asset_id " data - sortable = " false " data - visible = " true " data - switchable = " false " > #</th>
< th data - field = " asset_image " data - sortable = " true " data - visible = " false " data - switchable = " true " > {{ trans ( 'general.image' ) }} </ th >
< th data - field = " asset_tag " data - sortable = " true " data - visible = " true " data - switchable = " false " > {{ trans ( 'admin/hardware/table.asset_tag' ) }} </ th >
< th data - field = " asset_name " data - sortable = " true " data - visible = " true " > {{ trans ( 'general.name' ) }} </ th >
< th data - field = " asset_category " data - sortable = " true " data - visible = " true " > {{ trans ( 'general.category' ) }} </ th >
< th data - field = " asset_model " data - sortable = " true " data - visible = " true " > {{ trans ( 'admin/hardware/form.model' ) }} </ th >
2024-03-20 11:55:47 -07:00
< th data - field = " rtd_location " data - sortable = " true " data - visible = " true " > {{ trans ( 'admin/hardware/form.default_location' ) }} </ th >
2024-03-18 14:17:46 -07:00
< th data - field = " asset_location " data - sortable = " true " data - visible = " false " > {{ trans ( 'general.location' ) }} </ th >
< th data - field = " asset_serial " data - sortable = " true " data - visible = " true " > {{ trans ( 'admin/hardware/form.serial' ) }} </ th >
< th data - field = " asset_checkout_date " data - sortable = " true " data - visible = " true " > {{ trans ( 'admin/hardware/table.checkout_date' ) }} </ th >
< th data - field = " signature " data - sortable = " true " data - visible = " true " > {{ trans ( 'general.signature' ) }} </ th >
2022-05-06 02:06:12 -07:00
</ thead >
2024-03-11 07:23:25 -07:00
< tbody >
2022-05-06 02:06:12 -07:00
@ foreach ( $assets as $asset )
2024-07-14 10:10:33 -07:00
@ php
if ( $asset -> model -> category -> getEula ()) $eulas [] = $asset -> model -> category -> getEula ()
@ endphp
2022-05-06 02:06:12 -07:00
< tr >
2024-03-18 06:06:08 -07:00
< td > {{ $counter }} </ td >
2024-03-13 05:36:17 -07:00
< td >
@ if ( $asset -> getImageUrl ())
< img src = " { { $asset->getImageUrl () }} " class = " thumbnail " style = " max-height: 50px; " >
@ endif
</ td >
2022-05-06 02:06:12 -07:00
< td > {{ $asset -> asset_tag }} </ td >
< td > {{ $asset -> name }} </ td >
2023-10-31 08:58:59 -07:00
< td > {{ (( $asset -> model ) && ( $asset -> model -> category )) ? $asset -> model -> category -> name : trans ( 'general.invalid_category' ) }} </ td >
2023-10-31 09:04:19 -07:00
< td > {{ ( $asset -> model ) ? $asset -> model -> name : trans ( 'general.invalid_model' ) }} </ td >
2024-03-20 11:55:47 -07:00
< td > {{ ( $asset -> defaultLoc ) ? $asset -> defaultLoc -> name : '' }} </ td >
2024-03-13 05:36:17 -07:00
< td > {{ ( $asset -> location ) ? $asset -> location -> name : '' }} </ td >
2022-05-06 02:06:12 -07:00
< td > {{ $asset -> serial }} </ td >
< td >
2024-03-18 06:06:08 -07:00
{{ Helper :: getFormattedDateObject ( $asset -> last_checkout , 'datetime' , false ) }} </ td >
2024-03-13 05:36:17 -07:00
< td >
2022-07-11 14:46:45 -07:00
@ if (( $asset -> assetlog -> first ()) && ( $asset -> assetlog -> first () -> accept_signature != '' ))
2022-05-06 02:06:12 -07:00
< img style = " width:auto;height:100px; " src = " { { asset('/') }}display-sig/ { { $asset->assetlog ->first()->accept_signature }} " >
@ endif
</ td >
</ tr >
2024-03-11 07:23:25 -07:00
@ if ( $settings -> show_assigned_assets )
2022-05-06 02:06:12 -07:00
@ php
$assignedCounter = 1 ;
@ endphp
@ foreach ( $asset -> assignedAssets as $asset )
< tr >
< td > {{ $counter }} . {{ $assignedCounter }} </ td >
2024-07-10 10:05:39 -07:00
< td >
2024-03-13 05:36:17 -07:00
@ if ( $asset -> getImageUrl ())
< img src = " { { $asset->getImageUrl () }} " class = " thumbnail " style = " max-height: 50px; " >
@ endif
</ td >
2022-05-06 02:06:12 -07:00
< td > {{ $asset -> asset_tag }} </ td >
< td > {{ $asset -> name }} </ td >
2024-07-10 10:05:39 -07:00
< td > {{ (( $asset -> model ) && ( $asset -> model -> category )) ? $asset -> model -> category -> name : trans ( 'general.invalid_category' ) }} </ td >
< td > {{ ( $asset -> model ) ? $asset -> model -> name : trans ( 'general.invalid_model' ) }} </ td >
2024-03-20 11:55:47 -07:00
< td > {{ ( $asset -> defaultLoc ) ? $asset -> defaultLoc -> name : '' }} </ td >
2024-03-13 05:36:17 -07:00
< td > {{ ( $asset -> location ) ? $asset -> location -> name : '' }} </ td >
2022-05-06 02:06:12 -07:00
< td > {{ $asset -> serial }} </ td >
2024-07-10 10:05:39 -07:00
< td >
{{ Helper :: getFormattedDateObject ( $asset -> last_checkout , 'datetime' , false ) }} </ td >
< td >
@ if (( $asset -> assetlog -> first ()) && ( $asset -> assetlog -> first () -> accept_signature != '' ))
< img style = " width:auto;height:100px; " src = " { { asset('/') }}display-sig/ { { $asset->assetlog ->first()->accept_signature }} " >
@ endif
</ td >
2022-05-06 02:06:12 -07:00
</ tr >
@ php
$assignedCounter ++
@ endphp
@ endforeach
2021-05-20 13:53:43 -07:00
@ endif
2019-12-06 10:57:48 -08:00
@ php
2022-05-06 02:06:12 -07:00
$counter ++
2019-12-06 10:57:48 -08:00
@ endphp
2022-05-06 02:06:12 -07:00
@ endforeach
2024-03-11 07:23:25 -07:00
</ tbody >
2022-05-06 02:06:12 -07:00
</ table >
@ endif
2017-12-05 01:55:24 -08:00
2022-05-06 02:06:12 -07:00
@ if ( $licenses -> count () > 0 )
2024-03-13 05:36:17 -07:00
< div id = " licenses-toolbar " >
2024-03-18 06:29:01 -07:00
< h4 > {{ trans_choice ( 'general.countable.licenses' , $licenses -> count (), [ 'count' => $licenses -> count ()]) }} </ h4 >
2024-03-13 05:36:17 -07:00
</ div >
< table
class = " snipe-table table table-striped inventory "
id = " licensessAssigned "
data - toolbar = " #licenses-toolbar "
data - pagination = " false "
data - id - table = " licensessAssigned "
data - search = " false "
data - side - pagination = " client "
2024-03-18 14:17:46 -07:00
data - sortable = " true "
2024-03-13 05:36:17 -07:00
data - show - columns = " true "
data - sort - order = " desc "
data - sort - name = " created_at "
data - show - columns - toggle - all = " true "
data - cookie - id - table = " licensessAssigned " >
2022-05-06 02:06:12 -07:00
< thead >
2017-12-05 12:34:16 -08:00
< tr >
2024-03-18 14:17:46 -07:00
< th style = " width: 20px; " data - sortable = " false " data - switchable = " false " > #</th>
< th style = " width: 40%; " data - sortable = " true " data - switchable = " false " > {{ trans ( 'general.name' ) }} </ th >
< th style = " width: 50%; " data - sortable = " true " > {{ trans ( 'admin/licenses/form.license_key' ) }} </ th >
< th style = " width: 10%; " data - sortable = " true " > {{ trans ( 'admin/hardware/table.checkout_date' ) }} </ th >
2017-12-05 12:34:16 -08:00
</ tr >
2022-05-06 02:06:12 -07:00
</ thead >
@ php
$lcounter = 1 ;
@ endphp
@ foreach ( $licenses as $license )
2024-07-14 10:10:33 -07:00
@ php
if ( $license -> category -> getEula ()) $eulas [] = $license -> category -> getEula ()
@ endphp
2022-05-06 02:06:12 -07:00
< tr >
< td > {{ $lcounter }} </ td >
< td > {{ $license -> name }} </ td >
< td >
@ can ( 'viewKeys' , $license )
{{ $license -> serial }}
@ else
< i class = " fa-lock " aria - hidden = " true " ></ i > {{ str_repeat ( 'x' , 15 ) }}
@ endcan
</ td >
2024-03-10 09:39:49 -07:00
< td > {{ $license -> pivot -> updated_at }} </ td >
2022-05-06 02:06:12 -07:00
</ tr >
@ php
$lcounter ++
@ endphp
@ endforeach
</ table >
@ endif
2017-12-05 01:55:24 -08:00
2022-05-06 02:06:12 -07:00
@ if ( $accessories -> count () > 0 )
2024-03-13 05:36:17 -07:00
< div id = " accessories-toolbar " >
2024-03-18 06:29:01 -07:00
< h4 > {{ trans_choice ( 'general.countable.accessories' , $accessories -> count (), [ 'count' => $accessories -> count ()]) }} </ h4 >
2024-03-13 05:36:17 -07:00
</ div >
< table
class = " snipe-table table table-striped inventory "
id = " accessoriesAssigned "
data - toolbar = " #accessories-toolbar "
data - pagination = " false "
data - id - table = " accessoriesAssigned "
data - search = " false "
data - side - pagination = " client "
2024-03-18 14:17:46 -07:00
data - sortable = " true "
2024-03-13 05:36:17 -07:00
data - show - columns = " true "
data - sort - order = " desc "
data - sort - name = " created_at "
data - show - columns - toggle - all = " true "
data - cookie - id - table = " accessoriesAssigned " >
2022-05-06 02:06:12 -07:00
< thead >
< tr >
2024-03-18 14:17:46 -07:00
< th style = " width: 20px; " data - sortable = " false " data - switchable = " false " > #</th>
< th data - field = " accessory_image " data - sortable = " true " data - visible = " true " > {{ trans ( 'general.image' ) }} </ th >
< th style = " width: 40%; " data - sortable = " true " data - switchable = " false " > {{ trans ( 'general.name' ) }} </ th >
< th style = " width: 50%; " data - sortable = " true " > {{ trans ( 'general.category' ) }} </ th >
< th style = " width: 10%; " data - sortable = " true " > {{ trans ( 'admin/hardware/table.checkout_date' ) }} </ th >
2024-03-26 09:11:54 -07:00
< th style = " width: 10%; " data - sortable = " true " > {{ trans ( 'general.signature' ) }} </ th >
2022-05-06 02:06:12 -07:00
</ tr >
</ thead >
2017-12-05 01:55:24 -08:00
@ php
2022-05-06 02:06:12 -07:00
$acounter = 1 ;
2017-12-05 01:55:24 -08:00
@ endphp
2022-05-06 02:06:12 -07:00
@ foreach ( $accessories as $accessory )
@ if ( $accessory )
2024-07-14 10:10:33 -07:00
@ php
if ( $accessory -> category -> getEula ()) $eulas [] = $accessory -> category -> getEula ()
@ endphp
2022-05-06 02:06:12 -07:00
< tr >
< td > {{ $acounter }} </ td >
2024-03-18 06:29:01 -07:00
< td >
@ if ( $accessory -> getImageUrl ())
< img src = " { { $accessory->getImageUrl () }} " class = " thumbnail " style = " max-height: 50px; " >
@ endif
</ td >
2022-05-06 02:06:12 -07:00
< td > {{ ( $accessory -> manufacturer ) ? $accessory -> manufacturer -> name : '' }} {{ $accessory -> name }} {{ $accessory -> model_number }} </ td >
< td > {{ $accessory -> category -> name }} </ td >
< td > {{ $accessory -> pivot -> created_at }} </ td >
2024-03-26 11:24:34 -07:00
< td >
@ if (( $accessory -> assetlog -> first ()) && ( $accessory -> assetlog -> first () -> accept_signature != '' ))
< img style = " width:auto;height:100px; " src = " { { asset('/') }}display-sig/ { { $accessory->assetlog ->first()->accept_signature }} " >
@ endif
</ td >
2022-05-06 02:06:12 -07:00
</ tr >
@ php
$acounter ++
@ endphp
@ endif
@ endforeach
</ table >
@ endif
2017-12-05 01:55:24 -08:00
2022-05-06 02:06:12 -07:00
@ if ( $consumables -> count () > 0 )
2024-03-13 05:36:17 -07:00
< div id = " consumables-toolbar " >
2024-03-18 06:29:01 -07:00
< h4 > {{ trans_choice ( 'general.countable.consumables' , $consumables -> count (), [ 'count' => $consumables -> count ()]) }} </ h4 >
2024-03-13 05:36:17 -07:00
</ div >
< table
class = " snipe-table table table-striped inventory "
id = " consumablesAssigned "
data - pagination = " false "
data - toolbar = " #consumables-toolbar "
data - id - table = " consumablesAssigned "
data - search = " false "
data - side - pagination = " client "
2024-03-18 14:17:46 -07:00
data - sortable = " true "
2024-03-13 05:36:17 -07:00
data - show - columns = " true "
data - sort - order = " desc "
data - sort - name = " created_at "
data - show - columns - toggle - all = " true "
data - cookie - id - table = " consumablesAssigned " >
2022-05-06 02:06:12 -07:00
< thead >
2017-12-05 12:34:16 -08:00
< tr >
2024-03-18 14:17:46 -07:00
< th style = " width: 20px; " data - sortable = " false " data - switchable = " false " ></ th >
< th style = " width: 40%; " data - sortable = " true " data - switchable = " false " > {{ trans ( 'general.name' ) }} </ th >
< th style = " width: 50%; " data - sortable = " true " > {{ trans ( 'general.category' ) }} </ th >
< th style = " width: 10%; " data - sortable = " true " > {{ trans ( 'admin/hardware/table.checkout_date' ) }} </ th >
2024-03-26 12:18:10 -07:00
< th style = " width: 10%; " data - sortable = " true " > {{ trans ( 'general.signature' ) }} </ th >
2017-12-05 12:34:16 -08:00
</ tr >
2022-05-06 02:06:12 -07:00
</ thead >
@ php
$ccounter = 1 ;
@ endphp
2017-12-05 12:37:42 -08:00
2022-05-06 02:06:12 -07:00
@ foreach ( $consumables as $consumable )
@ if ( $consumable )
2024-07-14 10:10:33 -07:00
@ php
if ( $consumable -> category -> getEula ()) $eulas [] = $consumable -> category -> getEula ()
@ endphp
2022-05-06 02:06:12 -07:00
< tr >
< td > {{ $ccounter }} </ td >
< td >
@ if ( $consumable -> deleted_at != '' )
< td > {{ ( $consumable -> manufacturer ) ? $consumable -> manufacturer -> name : '' }} {{ $consumable -> name }} {{ $consumable -> model_number }} </ td >
@ else
{{ ( $consumable -> manufacturer ) ? $consumable -> manufacturer -> name : '' }} {{ $consumable -> name }} {{ $consumable -> model_number }}
@ endif
</ td >
< td > {{ ( $consumable -> category ) ? $consumable -> category -> name : ' invalid/deleted category' }} </ td >
< td > {{ $consumable -> pivot -> created_at }} </ td >
2024-03-26 12:18:10 -07:00
< td >
@ if (( $consumable -> assetlog -> first ()) && ( $consumable -> assetlog -> first () -> accept_signature != '' ))
< img style = " width:auto;height:100px; " src = " { { asset('/') }}display-sig/ { { $consumable->assetlog ->first()->accept_signature }} " >
@ endif
</ td >
2022-05-06 02:06:12 -07:00
</ tr >
@ php
$ccounter ++
@ endphp
@ endif
@ endforeach
</ table >
@ endif
2019-11-21 21:43:54 -08:00
2024-07-14 10:10:33 -07:00
< p ></ p >
< div class = " pull-right " >
< button class = " btn btn-default hidden-print " type = " button " data - toggle = " collapse " data - target = " #eula-row " aria - expanded = " false " aria - controls = " eula-row " title = " EULAs " >
< i class = " fa fa-eye-slash " ></ i >
</ button >
</ div >
2024-08-16 04:39:59 -07:00
< table style = " margin-top: 80px; " class = " snipe-table " >
2024-07-14 10:10:33 -07:00
< tr class = " collapse " id = " eula-row " >
< td style = " padding-right: 10px; vertical-align: top; font-weight: bold; " > EULA </ td >
< td style = " padding-right: 10px; vertical-align: top; padding-bottom: 80px; " colspan = " 3 " >
@ php
if ( ! empty ( $eulas )) $eulas = array_unique ( $eulas );
@ endphp
@ if ( ! empty ( $eulas ))
@ foreach ( $eulas as $key => $eula )
{ !! $eula !! }
@ endforeach
@ endif
</ td >
</ tr >
2024-03-18 06:44:51 -07:00
< tr >
< td style = " padding-right: 10px; vertical-align: top; font-weight: bold; " > {{ trans ( 'general.signed_off_by' ) }} :</ td >
2024-07-14 10:10:33 -07:00
< td style = " padding-right: 10px; vertical-align: top; " > ______________________________________ </ td >
< td style = " padding-right: 10px; vertical-align: top; " > ______________________________________ </ td >
< td > _____________ </ td >
2024-03-18 06:44:51 -07:00
</ tr >
< tr style = " height: 80px; " >
< td ></ td >
2024-08-16 04:39:59 -07:00
< td style = " padding-right: 10px; vertical-align: top; " > {{ trans ( 'general.name' ) }} </ td >
< td style = " padding-right: 10px; vertical-align: top; " > {{ trans ( 'general.signature' ) }} </ td >
2024-03-18 06:44:51 -07:00
< td style = " padding-right: 10px; vertical-align: top; " > {{ trans ( 'general.date' ) }} </ td >
</ tr >
< tr >
< td style = " padding-right: 10px; vertical-align: top; font-weight: bold; " > {{ trans ( 'admin/users/table.manager' ) }} :</ td >
2024-07-14 10:10:33 -07:00
< td style = " padding-right: 10px; vertical-align: top; " > ______________________________________ </ td >
< td style = " padding-right: 10px; vertical-align: top; " > ______________________________________ </ td >
< td > _____________ </ td >
2024-03-18 06:29:01 -07:00
</ tr >
< tr >
2024-03-18 06:44:51 -07:00
< td ></ td >
2024-08-16 04:39:59 -07:00
< td style = " padding-right: 10px; vertical-align: top; " > {{ trans ( 'general.name' ) }} </ td >
< td style = " padding-right: 10px; vertical-align: top; " > {{ trans ( 'general.signature' ) }} </ td >
2024-03-18 06:44:51 -07:00
< td style = " padding-right: 10px; vertical-align: top; " > {{ trans ( 'general.date' ) }} </ td >
< td ></ td >
2022-05-06 02:06:12 -07:00
</ tr >
2024-03-18 06:44:51 -07:00
2017-12-05 12:37:42 -08:00
</ table >
2017-12-05 12:34:16 -08:00
2024-03-11 07:23:25 -07:00
{{ -- Javascript files -- }}
< script src = " { { url(mix('js/dist/all.js')) }} " nonce = " { { csrf_token() }} " ></ script >
2024-03-13 05:36:17 -07:00
< script src = " { { url(mix('js/dist/bootstrap-table.js')) }} " ></ script >
2024-08-16 04:39:59 -07:00
< script src = " { { url(mix('js/dist/bootstrap-table-locale-all.min.js')) }} " ></ script >
<!-- load english again here , even though it 's in the all.js file, because if BS table doesn' t have the translation , it otherwise defaults to chinese . See https :// bootstrap - table . com / docs / api / table - options / #locale -->
< script src = " { { url(mix('js/dist/bootstrap-table-en-US.min.js')) }} " ></ script >
2024-03-11 07:23:25 -07:00
< script >
$ ( '.snipe-table' ) . bootstrapTable ( 'destroy' ) . each ( function () {
console . log ( 'BS table loaded' );
2024-07-09 11:41:31 -07:00
2024-03-11 07:23:25 -07:00
data_export_options = $ ( this ) . attr ( 'data-export-options' );
export_options = data_export_options ? JSON . parse ( data_export_options ) : {};
export_options [ 'htmlContent' ] = false ; // this is already the default; but let's be explicit about it
export_options [ 'jspdf' ] = { " orientation " : " l " };
// the following callback method is necessary to prevent XSS vulnerabilities
// (this is taken from Bootstrap Tables's default wrapper around jQuery Table Export)
export_options [ 'onCellHtmlData' ] = function ( cell , rowIndex , colIndex , htmlData ) {
if ( cell . is ( 'th' )) {
return cell . find ( '.th-inner' ) . text ()
}
return htmlData
}
$ ( this ) . bootstrapTable ({
classes : 'table table-responsive table-no-bordered' ,
ajaxOptions : {
headers : {
'X-CSRF-TOKEN' : $ ( 'meta[name="csrf-token"]' ) . attr ( 'content' )
}
},
// reorderableColumns: true,
stickyHeader : true ,
stickyHeaderOffsetLeft : parseInt ( $ ( 'body' ) . css ( 'padding-left' ), 10 ),
stickyHeaderOffsetRight : parseInt ( $ ( 'body' ) . css ( 'padding-right' ), 10 ),
undefinedText : '' ,
iconsPrefix : 'fa' ,
cookieStorage : '{{ config(' session . bs_table_storage ') }}' ,
cookie : true ,
cookieExpire : '2y' ,
mobileResponsive : true ,
maintainSelected : true ,
trimOnSearch : false ,
showSearchClearButton : true ,
paginationFirstText : " { { trans('general.first') }} " ,
paginationLastText : " { { trans('general.last') }} " ,
paginationPreText : " { { trans('general.previous') }} " ,
paginationNextText : " { { trans('general.next') }} " ,
pageList : [ '10' , '20' , '30' , '50' , '100' , '150' , '200' { !! (( config ( 'app.max_results' ) > 200 ) ? " ,'500' " : '' ) !! }{ !! (( config ( 'app.max_results' ) > 500 ) ? " ,' " . config ( 'app.max_results' ) . " ' " : '' ) !! }],
pageSize : {{ (( $snipeSettings -> per_page != '' ) && ( $snipeSettings -> per_page > 0 )) ? $snipeSettings -> per_page : 20 }},
paginationVAlign : 'both' ,
queryParams : function ( params ) {
var newParams = {};
for ( var i in params ) {
if ( ! keyBlocked ( i )) { // only send the field if it's not in blockedFields
newParams [ i ] = params [ i ];
}
}
return newParams ;
},
formatLoadingMessage : function () {
return '<h2><i class="fas fa-spinner fa-spin" aria-hidden="true"></i> {{ trans(' general . loading ') }} </h4>' ;
},
icons : {
advancedSearchIcon : 'fas fa-search-plus' ,
paginationSwitchDown : 'fa-caret-square-o-down' ,
paginationSwitchUp : 'fa-caret-square-o-up' ,
fullscreen : 'fa-expand' ,
columns : 'fa-columns' ,
refresh : 'fas fa-sync-alt' ,
export : 'fa-download' ,
clearSearch : 'fa-times'
},
exportOptions : export_options ,
exportTypes : [ 'xlsx' , 'excel' , 'csv' , 'pdf' , 'json' , 'xml' , 'txt' , 'sql' , 'doc' ],
onLoadSuccess : function () {
$ ( '[data-tooltip="true"]' ) . tooltip (); // Needed to attach tooltips after ajax call
}
});
});
</ script >
2024-07-09 11:41:31 -07:00
2017-12-05 01:55:24 -08:00
</ body >
</ html >