made the create button nice
This commit is contained in:
parent
152870f8fd
commit
39fff4bba3
12
device-app/composer.lock
generated
12
device-app/composer.lock
generated
@ -2205,16 +2205,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "opcodesio/log-viewer",
|
"name": "opcodesio/log-viewer",
|
||||||
"version": "v2.4.0",
|
"version": "v2.4.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/opcodesio/log-viewer.git",
|
"url": "https://github.com/opcodesio/log-viewer.git",
|
||||||
"reference": "eed37452d580e8929045e34dc7016420d9bd9bcd"
|
"reference": "caddf3336e4a3c23e655e0c1a11b2ae8e6ab4c7d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/opcodesio/log-viewer/zipball/eed37452d580e8929045e34dc7016420d9bd9bcd",
|
"url": "https://api.github.com/repos/opcodesio/log-viewer/zipball/caddf3336e4a3c23e655e0c1a11b2ae8e6ab4c7d",
|
||||||
"reference": "eed37452d580e8929045e34dc7016420d9bd9bcd",
|
"reference": "caddf3336e4a3c23e655e0c1a11b2ae8e6ab4c7d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2277,9 +2277,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/opcodesio/log-viewer/issues",
|
"issues": "https://github.com/opcodesio/log-viewer/issues",
|
||||||
"source": "https://github.com/opcodesio/log-viewer/tree/v2.4.0"
|
"source": "https://github.com/opcodesio/log-viewer/tree/v2.4.1"
|
||||||
},
|
},
|
||||||
"time": "2023-03-31T07:50:32+00:00"
|
"time": "2023-04-05T05:44:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpoption/phpoption",
|
"name": "phpoption/phpoption",
|
||||||
|
10
device-app/public/css/style.css
Normal file
10
device-app/public/css/style.css
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/*for sticky footer*/
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
min-height: 100vh;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper {
|
||||||
|
flex: 1;
|
||||||
|
}
|
21
device-app/public/js/script.js
Normal file
21
device-app/public/js/script.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
// Get all "navbar-burger" elements
|
||||||
|
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
||||||
|
|
||||||
|
// Add a click event on each of them
|
||||||
|
$navbarBurgers.forEach(el => {
|
||||||
|
el.addEventListener('click', () => {
|
||||||
|
|
||||||
|
// Get the target from the "data-target" attribute
|
||||||
|
const target = el.dataset.target;
|
||||||
|
const $target = document.getElementById(target);
|
||||||
|
|
||||||
|
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
||||||
|
el.classList.toggle('is-active');
|
||||||
|
$target.classList.toggle('is-active');
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
2
device-app/public/vendor/log-viewer/app.js
vendored
2
device-app/public/vendor/log-viewer/app.js
vendored
File diff suppressed because one or more lines are too long
@ -27,12 +27,26 @@
|
|||||||
<td>{{ $device['image_url'] }}</td>
|
<td>{{ $device['image_url'] }}</td>
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
<td>
|
<td>
|
||||||
<button><a href="{{ $device->device_id }}/edit">Edit</a></button>
|
<div class="field is-grouped">
|
||||||
<form method="POST" action="{{ $device->device_id }}">
|
<div class="control">
|
||||||
@method('DELETE')
|
<a class="button is-small is-outlined is-info is-light" href="{{ $device->device_id }}/edit">
|
||||||
@csrf
|
<span class="icon is-small">
|
||||||
<button>Delete</button>
|
<i class="fa-solid fa-pen-to-square"></i>
|
||||||
</form>
|
</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>
|
||||||
</td>
|
</td>
|
||||||
@endcan
|
@endcan
|
||||||
</tr>
|
</tr>
|
||||||
@ -47,7 +61,12 @@
|
|||||||
|
|
||||||
<h3 class="title is-3 has-text-centered">Location Transactions</h3>
|
<h3 class="title is-3 has-text-centered">Location Transactions</h3>
|
||||||
<div class="buttons is-right">
|
<div class="buttons is-right">
|
||||||
<a class="button is-small" href="{{ $device->device_id }}/locations/create">New Location</a>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
@php
|
@php
|
||||||
$locationTransactions = $device->locations;
|
$locationTransactions = $device->locations;
|
||||||
@ -77,7 +96,12 @@
|
|||||||
|
|
||||||
<h3 class="title is-3 has-text-centered">Owner Transactions</h3>
|
<h3 class="title is-3 has-text-centered">Owner Transactions</h3>
|
||||||
<div class="buttons is-right">
|
<div class="buttons is-right">
|
||||||
<a class="button is-small" href="{{ $device->device_id }}/owners/create">New Owner</a>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<table class="table is-narrow is-fullwidth is-striped is-hoverable">
|
<table class="table is-narrow is-fullwidth is-striped is-hoverable">
|
||||||
|
@ -3,12 +3,26 @@
|
|||||||
<td>{{ $location->timestamp_located_since }}</td>
|
<td>{{ $location->timestamp_located_since }}</td>
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
<td>
|
<td>
|
||||||
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
|
<div class="field is-grouped">
|
||||||
<form method="POST" action="locations/{{ $location->location_transaction_id }}">
|
<div class="control">
|
||||||
@method('DELETE')
|
<a class="button is-small is-outlined is-info is-light" href="locations/{{ $location->location_transaction_id }}/edit">
|
||||||
@csrf
|
<span class="icon is-small">
|
||||||
<button>Delete</button>
|
<i class="fa-solid fa-pen-to-square"></i>
|
||||||
</form>
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<form method="POST" action="locations/{{ $location->location_transaction_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>
|
||||||
</td>
|
</td>
|
||||||
@endcan
|
@endcan
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -3,12 +3,27 @@
|
|||||||
<td>{{ $owner->timestamp_owner_since }}</td>
|
<td>{{ $owner->timestamp_owner_since }}</td>
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
<td>
|
<td>
|
||||||
<button><a href="owners/{{ $owner->owner_transaction_id }}/edit">Edit</a></button>
|
<div class="field is-grouped">
|
||||||
<form method="POST" action="owners/{{ $owner->owner_transaction_id }}">
|
<div class="control">
|
||||||
@method('DELETE')
|
<a class="button is-small is-outlined is-info is-light"
|
||||||
@csrf
|
href="owners/{{ $owner->owner_transaction_id }}/edit">
|
||||||
<button>Delete</button>
|
<span class="icon is-small">
|
||||||
</form>
|
<i class="fa-solid fa-pen-to-square"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<form method="POST" action="owners/{{ $owner->owner_transaction_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>
|
||||||
</td>
|
</td>
|
||||||
@endcan
|
@endcan
|
||||||
</tr>
|
</tr>
|
@ -25,7 +25,11 @@
|
|||||||
<td>{{ $purchasing->seller }}</td>
|
<td>{{ $purchasing->seller }}</td>
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
<td>
|
<td>
|
||||||
<button><a href="{{ $device->device_id }}/purchasing/edit">Edit</a></button>
|
<a class="button is-small is-outlined is-info is-light" href="{{ $device->device_id }}/purchasing/edit">
|
||||||
|
<span class="icon is-small">
|
||||||
|
<i class="fa-solid fa-pen-to-square"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
@endcan
|
@endcan
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -4,7 +4,12 @@
|
|||||||
<h3 class="title is-3 has-text-centered">Device List</h3>
|
<h3 class="title is-3 has-text-centered">Device List</h3>
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
<div class="buttons is-right">
|
<div class="buttons is-right">
|
||||||
<a class="button is-small" href="devices/create">Create Device</a>
|
<a class="button is-small is-outlined is-success is-light" href="devices/create">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fa-solid fa-plus"></i>
|
||||||
|
</span>
|
||||||
|
<span>Create Device</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
@unless (count($devices) == 0)
|
@unless (count($devices) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user