124 lines
4.3 KiB
PHP
Raw Normal View History

@props(['device'])
2023-04-06 12:17:42 +02:00
<h3 class="title is-3 has-text-centered">Device Detail</h3>
<div class="table-container">
<table class="table is-narrow is-fullwidth">
<thead>
<tr>
<th>Ttile</th>
<th>device_type</th>
<th>description</th>
<th>accessories</th>
<th>rz_username_buyer</th>
<th>serial_number</th>
<th>image_url</th>
@can('admin-only')
<th class="is-narrow">Action</th>
@endcan
</tr>
</thead>
<tbody>
<tr>
<td>{{ $device['title'] }}</td>
<td>{{ $device['device_type'] }}</td>
<td>{{ $device['description'] }}</td>
<td>{{ $device['accessories'] }}</td>
<td>{{ $device['rz_username_buyer'] }}</td>
<td>{{ $device['serial_number'] }}</td>
<td>{{ $device['image_url'] }}</td>
@can('admin-only')
<td>
2023-04-06 13:22:40 +02:00
<div class="field is-grouped">
<div class="control">
<a class="button is-small is-outlined is-info is-light" href="{{ $device->device_id }}/edit">
<span class="icon is-small">
<i class="fa-solid fa-pen-to-square"></i>
</span>
</a>
</div>
<div class="control">
<form method="POST" action="{{ $device->device_id }}">
@method('DELETE')
@csrf
<button class="button is-small is-outlined is-danger is-light" type="submit">
<span class="icon is-small">
<i class="fa-solid fa-trash"></i>
</span>
</button>
</form>
</div>
</div>
2023-04-06 12:17:42 +02:00
</td>
@endcan
</tr>
</tbody>
</table>
</div>
<h3 class="title is-3 has-text-centered">Purchasing Information</h3>
<x-purchasing-information :device="$device" />
<h3 class="title is-3 has-text-centered">Location Transactions</h3>
<div class="buttons is-right">
2023-04-06 13:22:40 +02:00
<a class="button is-small is-outlined is-success is-light" href="{{ $device->device_id }}/locations/create">
<span class="icon">
<i class="fa-solid fa-plus"></i>
</span>
<span>New Location</span>
</a>
2023-04-06 12:17:42 +02:00
</div>
@php
$locationTransactions = $device->locations;
$ownerTransactins = $device->owners;
@endphp
<div class="table-container">
<table class="table is-narrow is-fullwidth is-striped is-hoverable">
<thead>
<tr>
<th>room_code</th>
<th>timestamp_located_since</th>
@can('admin-only')
<th class="is-narrow">Action</th>
@endcan
</tr>
</thead>
<tbody>
@foreach ($locationTransactions as $location)
<x-location-transaction :location="$location" />
@endforeach
</tbody>
</table>
</div>
<h3 class="title is-3 has-text-centered">Owner Transactions</h3>
<div class="buttons is-right">
2023-04-06 13:22:40 +02:00
<a class="button is-small is-outlined is-success is-light" href="{{ $device->device_id }}/owners/create">
<span class="icon">
<i class="fa-solid fa-plus"></i>
</span>
<span>New Owner</span>
</a>
2023-04-06 12:17:42 +02:00
</div>
<div class="table-container">
<table class="table is-narrow is-fullwidth is-striped is-hoverable">
<thead>
<tr>
<th>rz_username</th>
<th>timestamp_owner_since</th>
@can('admin-only')
<th class="is-narrow">Action</th>
@endcan
</tr>
</thead>
<tbody>
@foreach ($ownerTransactins as $owner)
<x-owner-transaction :owner="$owner" />
@endforeach
</tbody>
</table>
2023-03-31 10:52:12 +02:00
</div>