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",
|
||||
"version": "v2.4.0",
|
||||
"version": "v2.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opcodesio/log-viewer.git",
|
||||
"reference": "eed37452d580e8929045e34dc7016420d9bd9bcd"
|
||||
"reference": "caddf3336e4a3c23e655e0c1a11b2ae8e6ab4c7d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opcodesio/log-viewer/zipball/eed37452d580e8929045e34dc7016420d9bd9bcd",
|
||||
"reference": "eed37452d580e8929045e34dc7016420d9bd9bcd",
|
||||
"url": "https://api.github.com/repos/opcodesio/log-viewer/zipball/caddf3336e4a3c23e655e0c1a11b2ae8e6ab4c7d",
|
||||
"reference": "caddf3336e4a3c23e655e0c1a11b2ae8e6ab4c7d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2277,9 +2277,9 @@
|
||||
],
|
||||
"support": {
|
||||
"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",
|
||||
|
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>
|
||||
@can('admin-only')
|
||||
<td>
|
||||
<button><a href="{{ $device->device_id }}/edit">Edit</a></button>
|
||||
<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>Delete</button>
|
||||
<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>
|
||||
@endcan
|
||||
</tr>
|
||||
@ -47,7 +61,12 @@
|
||||
|
||||
<h3 class="title is-3 has-text-centered">Location Transactions</h3>
|
||||
<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>
|
||||
@php
|
||||
$locationTransactions = $device->locations;
|
||||
@ -77,7 +96,12 @@
|
||||
|
||||
<h3 class="title is-3 has-text-centered">Owner Transactions</h3>
|
||||
<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 class="table-container">
|
||||
<table class="table is-narrow is-fullwidth is-striped is-hoverable">
|
||||
|
@ -3,12 +3,26 @@
|
||||
<td>{{ $location->timestamp_located_since }}</td>
|
||||
@can('admin-only')
|
||||
<td>
|
||||
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<a class="button is-small is-outlined is-info is-light" href="locations/{{ $location->location_transaction_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="locations/{{ $location->location_transaction_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
<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>
|
||||
@endcan
|
||||
</tr>
|
||||
|
@ -3,12 +3,27 @@
|
||||
<td>{{ $owner->timestamp_owner_since }}</td>
|
||||
@can('admin-only')
|
||||
<td>
|
||||
<button><a href="owners/{{ $owner->owner_transaction_id }}/edit">Edit</a></button>
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<a class="button is-small is-outlined is-info is-light"
|
||||
href="owners/{{ $owner->owner_transaction_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="owners/{{ $owner->owner_transaction_id }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
<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>
|
||||
@endcan
|
||||
</tr>
|
@ -25,7 +25,11 @@
|
||||
<td>{{ $purchasing->seller }}</td>
|
||||
@can('admin-only')
|
||||
<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>
|
||||
@endcan
|
||||
</tr>
|
||||
|
@ -4,7 +4,12 @@
|
||||
<h3 class="title is-3 has-text-centered">Device List</h3>
|
||||
@can('admin-only')
|
||||
<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>
|
||||
@endcan
|
||||
@unless (count($devices) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user