2017-11-02 04:17:14 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
|
|
|
|
@section('title0')
|
|
|
|
{{ trans('admin/hardware/general.requested') }}
|
|
|
|
{{ trans('general.assets') }}
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
|
|
|
@yield('title0') @parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2023-06-28 09:38:44 -07:00
|
|
|
|
2017-11-02 04:17:14 -07:00
|
|
|
@if ($requestedItems->count() > 0)
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table
|
2018-04-04 17:33:02 -07:00
|
|
|
name="requestedAssets"
|
2017-11-02 04:17:14 -07:00
|
|
|
data-toolbar="#toolbar"
|
|
|
|
class="table table-striped snipe-table"
|
2018-04-04 17:33:02 -07:00
|
|
|
id="requestedAssets"
|
2017-11-02 04:17:14 -07:00
|
|
|
data-advanced-search="true"
|
2018-04-04 17:33:02 -07:00
|
|
|
data-search="true"
|
|
|
|
data-show-columns="true"
|
|
|
|
data-show-export="true"
|
|
|
|
data-pagination="true"
|
|
|
|
data-id-table="requestedAssets"
|
|
|
|
data-cookie-id-table="requestedAssets"
|
|
|
|
data-export-options='{
|
|
|
|
"fileName": "export-assetrequests-{{ date('Y-m-d') }}",
|
|
|
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
|
|
|
}'>
|
2017-11-02 04:17:14 -07:00
|
|
|
<thead>
|
|
|
|
<tr role="row">
|
|
|
|
<th class="col-md-1">Image</th>
|
|
|
|
<th class="col-md-2">Item Name</th>
|
|
|
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
|
|
|
<th class="col-md-2" data-sortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
2022-05-23 20:15:22 -07:00
|
|
|
<th class="col-md-3" data-sortable="true">{{ trans('admin/hardware/table.requesting_user') }}</th>
|
|
|
|
<th class="col-md-2">{{ trans('admin/hardware/table.requested_date') }}</th>
|
2023-12-11 11:14:55 -08:00
|
|
|
<th class="col-md-1">{{ trans('button.actions') }}</th>
|
|
|
|
<th class="col-md-1">{{ trans('general.checkout') }}</th>
|
2017-11-02 04:17:14 -07:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($requestedItems as $request)
|
2017-11-02 08:11:04 -07:00
|
|
|
|
|
|
|
@if ($request->requestable)
|
2017-11-02 04:17:14 -07:00
|
|
|
<tr>
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<td>
|
2017-11-02 08:11:04 -07:00
|
|
|
@if (($request->itemType() == "asset") && ($request->requestable))
|
2020-03-27 15:35:29 -07:00
|
|
|
<a href="{{ $request->requestable->getImageUrl() }}" data-toggle="lightbox" data-type="image"><img src="{{ $request->requestable->getImageUrl() }}" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive" alt="{{ $request->requestable->name }}"></a>
|
2017-11-02 08:11:04 -07:00
|
|
|
@elseif (($request->itemType() == "asset_model") && ($request->requestable))
|
2023-04-05 16:05:40 -07:00
|
|
|
<a href="{{ config('app.url') }}/uploads/models/{{ $request->requestable->image }}" data-toggle="lightbox" data-type="image"><img src="{{ config('app.url') }}/uploads/models/{{ $request->requestable->image }}" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive" alt="{{ $request->requestable->name }}"></a>
|
2017-11-02 04:17:14 -07:00
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
|
|
|
|
@if ($request->itemType() == "asset")
|
2023-04-05 16:05:40 -07:00
|
|
|
<a href="{{ config('app.url') }}/hardware/{{ $request->requestable->id }}">
|
2017-11-02 04:17:14 -07:00
|
|
|
{{ $request->name() }}
|
|
|
|
</a>
|
|
|
|
@elseif ($request->itemType() == "asset_model")
|
2023-04-05 16:05:40 -07:00
|
|
|
<a href="{{ config('app.url') }}/models/{{ $request->requestable->id }}">
|
2017-11-02 04:17:14 -07:00
|
|
|
{{ $request->name() }}
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</td>
|
|
|
|
@if ($request->location())
|
|
|
|
<td>{{ $request->location()->name }}</td>
|
|
|
|
@else
|
|
|
|
<td></td>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<td>
|
|
|
|
@if ($request->itemType() == "asset")
|
|
|
|
{{ App\Helpers\Helper::getFormattedDateObject($request->requestable->expected_checkin, 'datetime', false) }}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
2023-07-10 15:34:00 -07:00
|
|
|
@if ($request->requestingUser() && !$request->requestingUser()->trashed())
|
2023-04-05 16:05:40 -07:00
|
|
|
<a href="{{ config('app.url') }}/users/{{ $request->requestingUser()->id }}">
|
2017-11-02 04:17:14 -07:00
|
|
|
{{ $request->requestingUser()->present()->fullName() }}
|
|
|
|
</a>
|
2018-01-16 07:36:03 -08:00
|
|
|
@else
|
|
|
|
(deleted user)
|
|
|
|
@endif
|
2017-11-02 04:17:14 -07:00
|
|
|
</td>
|
|
|
|
<td>{{ App\Helpers\Helper::getFormattedDateObject($request->created_at, 'datetime', false) }}</td>
|
2023-06-27 15:41:30 -07:00
|
|
|
<td>
|
2023-06-27 16:02:25 -07:00
|
|
|
{{ Form::open([
|
|
|
|
'method' => 'POST',
|
2023-06-27 17:11:10 -07:00
|
|
|
'route' => ['account/request-item', $request->itemType(), $request->requestable->id, true, $request->requestingUser()->id],
|
2023-06-27 16:02:25 -07:00
|
|
|
]) }}
|
2023-06-28 09:38:44 -07:00
|
|
|
<button class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.cancel_request') }}">{{ trans('button.cancel') }}</button>
|
2023-06-27 16:02:25 -07:00
|
|
|
{{ Form::close() }}
|
2023-06-27 15:41:30 -07:00
|
|
|
</td>
|
2017-11-02 04:17:14 -07:00
|
|
|
<td>
|
|
|
|
@if ($request->itemType() == "asset")
|
|
|
|
@if ($request->requestable->assigned_to=='')
|
2023-04-05 16:05:40 -07:00
|
|
|
<a href="{{ config('app.url') }}/hardware/{{ $request->requestable->id }}/checkout" class="btn btn-sm bg-maroon" data-tooltip="true" title="{{ trans('general.checkout_user_tooltip') }}">{{ trans('general.checkout') }}</a>
|
2017-11-02 04:17:14 -07:00
|
|
|
@else
|
2023-04-05 16:05:40 -07:00
|
|
|
<a href="{{ config('app.url') }}/hardware/{{ $request->requestable->id }}/checkin" class="btn btn-sm bg-purple" data-tooltip="true" title="{{ trans('general.checkin_toolip') }}">{{ trans('general.checkin') }}</a>
|
2017-11-02 04:17:14 -07:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
2017-11-02 08:11:04 -07:00
|
|
|
@endif
|
2017-11-02 04:17:14 -07:00
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@else
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="alert alert-info alert-block">
|
2021-09-26 01:11:08 -07:00
|
|
|
<i class="fas fa-info-circle"></i>
|
2017-11-02 04:17:14 -07:00
|
|
|
{{ trans('general.no_results') }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div> <!-- .col-md-12> -->
|
|
|
|
</div> <!-- .row -->
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('moar_scripts')
|
|
|
|
@include ('partials.bootstrap-table', [
|
|
|
|
'exportFile' => 'requested-export',
|
|
|
|
'search' => true,
|
|
|
|
'clientSearch' => true,
|
|
|
|
])
|
|
|
|
|
|
|
|
@stop
|