add admin gate
This commit is contained in:
@ -11,12 +11,14 @@
|
||||
<li>serial_number: {{ $device['serial_number'] }}</li>
|
||||
<li>image_url: {{ $device['image_url'] }}</li>
|
||||
</ul>
|
||||
<button><a href="{{ $device->device_id }}/edit">Edit</a></button>
|
||||
<form method="POST" action="{{ $device->device_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
</form>
|
||||
@can('admin-only')
|
||||
<button><a href="{{ $device->device_id }}/edit">Edit</a></button>
|
||||
<form method="POST" action="{{ $device->device_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
</form>
|
||||
@endcan
|
||||
<x-purchasing-information :device="$device" />
|
||||
@php
|
||||
$locationTransactions = $device->locations;
|
||||
|
@ -3,10 +3,12 @@
|
||||
<li>room_code: {{ $location->room_code }}</li>
|
||||
<li>timestamp_located_since: {{ $location->timestamp_located_since }}</li>
|
||||
</ul>
|
||||
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
|
||||
<form method="POST" action="locations/{{ $location->location_transaction_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
</form>
|
||||
@can('admin-only')
|
||||
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
|
||||
<form method="POST" action="locations/{{ $location->location_transaction_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
</form>
|
||||
@endcan
|
||||
</div>
|
@ -3,10 +3,12 @@
|
||||
<li>rz_username: {{ $owner->rz_username }}</li>
|
||||
<li>timestamp_owner_since: {{ $owner->timestamp_owner_since }}</li>
|
||||
</ul>
|
||||
<button><a href="owners/{{ $owner->owner_transaction_id }}/edit">Edit</a></button>
|
||||
<form method="POST" action="owners/{{ $owner->owner_transaction_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
</form>
|
||||
@can('admin-only')
|
||||
<button><a href="owners/{{ $owner->owner_transaction_id }}/edit">Edit</a></button>
|
||||
<form method="POST" action="owners/{{ $owner->owner_transaction_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
</form>
|
||||
@endcan
|
||||
</div>
|
@ -10,5 +10,7 @@
|
||||
<li>cost_centre: {{ $purchasing->cost_centre }}</li>
|
||||
<li>seller: {{ $purchasing->seller }}</li>
|
||||
</ul>
|
||||
<button><a href="{{ $device->device_id }}/purchasing/edit">Edit</a></button>
|
||||
@can('admin-only')
|
||||
<button><a href="{{ $device->device_id }}/purchasing/edit">Edit</a></button>
|
||||
@endcan
|
||||
</div>
|
@ -11,5 +11,7 @@
|
||||
@else
|
||||
<p>No devices found</p>
|
||||
@endunless
|
||||
<button><a href="devices/create">Device</a></button>
|
||||
@can('admin-only')
|
||||
<button><a href="devices/create">Device</a></button>
|
||||
@endcan
|
||||
@endsection
|
||||
|
Reference in New Issue
Block a user