Skip to content

Commit

Permalink
Added EULAs in print user's assets
Browse files Browse the repository at this point in the history
Added EULAs when we want to print all assets assigned to a users and ask him/her to sign.
  • Loading branch information
mauro-miatello authored Jul 14, 2024
1 parent 51242fc commit e49c96a
Showing 1 changed file with 42 additions and 23 deletions.
65 changes: 42 additions & 23 deletions resources/views/users/print.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
size: A4;
}
.print-logo {
max-height: 40px;
}
Expand All @@ -42,8 +41,6 @@
margin-top: 20px;
margin-bottom: 10px;
}
</style>

<script nonce="{{ csrf_token() }}">
Expand Down Expand Up @@ -80,7 +77,10 @@
{{ ($show_user->employee_num!='') ? ' (#'.$show_user->employee_num.') ' : '' }}
{{ ($show_user->jobtitle!='' ? ' - '.$show_user->jobtitle : '') }}
</h3>
<p></p>{{ trans('admin/users/general.all_assigned_list_generation')}} {{ Helper::getFormattedDateObject(now(), 'datetime', false) }}</body>
<p></p>{{ trans('admin/users/general.all_assigned_list_generation')}} {{ Helper::getFormattedDateObject(now(), 'datetime', false) }}

</body>

@if ($assets->count() > 0)
@php
$counter = 1;
Expand Down Expand Up @@ -120,7 +120,9 @@ class="snipe-table table table-striped inventory"
</thead>
<tbody>
@foreach ($assets as $asset)

@php
if ($asset->model->category->getEula()) $eulas[] = $asset->model->category->getEula()
@endphp
<tr>
<td>{{ $counter }}</td>
<td>
Expand Down Expand Up @@ -148,7 +150,6 @@ class="snipe-table table table-striped inventory"
$assignedCounter = 1;
@endphp
@foreach ($asset->assignedAssets as $asset)

<tr>
<td>{{ $counter }}.{{ $assignedCounter }}</td>
<td>
Expand Down Expand Up @@ -216,7 +217,9 @@ class="snipe-table table table-striped inventory"
@endphp

@foreach ($licenses as $license)

@php
if ($license->category->getEula()) $eulas[] = $license->category->getEula()
@endphp
<tr>
<td>{{ $lcounter }}</td>
<td>{{ $license->name }}</td>
Expand Down Expand Up @@ -272,6 +275,9 @@ class="snipe-table table table-striped inventory"

@foreach ($accessories as $accessory)
@if ($accessory)
@php
if ($accessory->category->getEula()) $eulas[] = $accessory->category->getEula()
@endphp
<tr>
<td>{{ $acounter }}</td>
<td>
Expand Down Expand Up @@ -332,10 +338,11 @@ class="snipe-table table table-striped inventory"

@foreach ($consumables as $consumable)
@if ($consumable)
@php
if ($consumable->category->getEula()) $eulas[] = $consumable->category->getEula()
@endphp
<tr>
<td>{{ $ccounter }}</td>


<td>
@if ($consumable->deleted_at!='')
<td>{{ ($consumable->manufacturer) ? $consumable->manufacturer->name : '' }} {{ $consumable->name }} {{ $consumable->model_number }}</td>
Expand All @@ -359,25 +366,44 @@ class="snipe-table table table-striped inventory"
</table>
@endif

<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>

<table style="margin-top: 80px;">
<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>
<tr>
<td style="padding-right: 10px; vertical-align: top; font-weight: bold;">{{ trans('general.signed_off_by') }}:</td>
<td style="padding-right: 10px; vertical-align: top;">________________________________________________________</td>
<td style="padding-right: 10px; vertical-align: top;">________________________________________________________</td>
<td>_____________________</td>
<td style="padding-right: 10px; vertical-align: top;">______________________________________</td>
<td style="padding-right: 10px; vertical-align: top;">______________________________________</td>
<td>_____________</td>
</tr>
<tr style="height: 80px;">
<td></td>
<td style="padding-right: 10px; vertical-align: top;">Name</td>
<td style="padding-right: 10px; vertical-align: top;">Signature</td>
<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>
<td style="padding-right: 10px; vertical-align: top;">________________________________________________________</td>
<td style="padding-right: 10px; vertical-align: top;">________________________________________________________</td>
<td>_____________________</td>
<td style="padding-right: 10px; vertical-align: top;">______________________________________</td>
<td style="padding-right: 10px; vertical-align: top;">______________________________________</td>
<td>_____________</td>
</tr>
<tr>
<td></td>
Expand All @@ -392,11 +418,6 @@ class="snipe-table table table-striped inventory"
{{-- Javascript files --}}
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>






<script src="{{ url(mix('js/dist/bootstrap-table.js')) }}"></script>

<script>
Expand Down Expand Up @@ -475,7 +496,5 @@ classes: 'table table-responsive table-no-bordered',
});
</script>



</body>
</html>

0 comments on commit e49c96a

Please sign in to comment.