add new frontend
This commit is contained in:
parent
50acb5fd41
commit
64c64c001b
@ -120,7 +120,7 @@ php artisan test
|
|||||||
Timon Lorenz (lot17014)
|
Timon Lorenz (lot17014)
|
||||||
|
|
||||||
## 6 License
|
## 6 License
|
||||||
This project is licensed with the MIT license. The used framework [Laravel](https://laravel.com/) and the imported [Log-Viewer](https://github.com/opcodesio/log-viewer/discussions) are also licensed with the MIT license.
|
This project is licensed with the MIT license. The used framework [Laravel](https://laravel.com/) and the imported [Log-Viewer](https://github.com/opcodesio/log-viewer/discussions) as well as the CSS framework [Bulma](https://bulma.io/) are also licensed with the MIT license.
|
||||||
|
|
||||||
## Releasedate
|
## Releasedate
|
||||||
latest: 15.04.2023
|
latest: 15.04.2023
|
||||||
|
@ -1,37 +1,99 @@
|
|||||||
@props(['device'])
|
@props(['device'])
|
||||||
<div>
|
<h3 class="title is-3 has-text-centered">Device Detail</h3>
|
||||||
<h3>Device Detail</h3>
|
<div class="table-container">
|
||||||
<ul>
|
<table class="table is-narrow is-fullwidth">
|
||||||
<!--li>device_id: {{ $device['device_id'] }}</li-->
|
<thead>
|
||||||
<li>title: {{ $device['title'] }}</li>
|
<tr>
|
||||||
<li>device_type: {{ $device['device_type'] }}</li>
|
<th>Ttile</th>
|
||||||
<li>description: {{ $device['description'] }}</li>
|
<th>device_type</th>
|
||||||
<li>accessories: {{ $device['accessories'] }}</li>
|
<th>description</th>
|
||||||
<li>rz_username_buyer: {{ $device['rz_username_buyer'] }}</li>
|
<th>accessories</th>
|
||||||
<li>serial_number: {{ $device['serial_number'] }}</li>
|
<th>rz_username_buyer</th>
|
||||||
<li>image_url: {{ $device['image_url'] }}</li>
|
<th>serial_number</th>
|
||||||
</ul>
|
<th>image_url</th>
|
||||||
@can('admin-only')
|
@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>
|
||||||
<button><a href="{{ $device->device_id }}/edit">Edit</a></button>
|
<button><a href="{{ $device->device_id }}/edit">Edit</a></button>
|
||||||
<form method="POST" action="{{ $device->device_id }}">
|
<form method="POST" action="{{ $device->device_id }}">
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
@csrf
|
@csrf
|
||||||
<button>Delete</button>
|
<button>Delete</button>
|
||||||
</form>
|
</form>
|
||||||
|
</td>
|
||||||
@endcan
|
@endcan
|
||||||
<x-purchasing-information :device="$device" />
|
</tr>
|
||||||
@php
|
</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">
|
||||||
|
<a class="button is-small" href="{{ $device->device_id }}/locations/create">New Location</a>
|
||||||
|
</div>
|
||||||
|
@php
|
||||||
$locationTransactions = $device->locations;
|
$locationTransactions = $device->locations;
|
||||||
$ownerTransactins = $device->owners;
|
$ownerTransactins = $device->owners;
|
||||||
@endphp
|
@endphp
|
||||||
<h3>Location Transactions</h3>
|
|
||||||
<button><a href="{{ $device->device_id }}/locations/create">New Location</a></button>
|
<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)
|
@foreach ($locationTransactions as $location)
|
||||||
<x-location-transaction :location="$location" />
|
<x-location-transaction :location="$location" />
|
||||||
@endforeach
|
@endforeach
|
||||||
<h3>Owner Transactions</h3>
|
</tbody>
|
||||||
<button><a href="{{ $device->device_id }}/owners/create">New Owner</a></button>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</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)
|
@foreach ($ownerTransactins as $owner)
|
||||||
<x-owner-transaction :owner="$owner" />
|
<x-owner-transaction :owner="$owner" />
|
||||||
@endforeach
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
@props(['device'])
|
@props(['device'])
|
||||||
<div>
|
<tr>
|
||||||
<a href="/devices/{{ $device['device_id'] }}">{{ $device->title }}</a>
|
<td><a href="/devices/{{ $device['device_id'] }}">{{ $device->title }}</a></td>
|
||||||
<ul>
|
<td>{{ $device['device_type'] }}</td>
|
||||||
<!--li>{{ $device['device_id'] }}</li-->
|
<td>{{ $device['description'] }}</td>
|
||||||
<!--li>title:{{ $device['title'] }}</li-->
|
<td>{{ $device['accessories'] }}</td>
|
||||||
<li>device_type: {{ $device['device_type'] }}</li>
|
<td>{{ $device['rz_username_buyer'] }}</td>
|
||||||
<li>description: {{ $device['description'] }}</li>
|
<td>{{ $device['serial_number'] }}</td>
|
||||||
<li>accessories: {{ $device['accessories'] }}</li>
|
<td>{{ $device['image_url'] }}</td>
|
||||||
<li>rz_username_buyer: {{ $device['rz_username_buyer'] }}</li>
|
{{-- TODO: Nicht null --}}
|
||||||
<li>serial_number: {{ $device['serial_number'] }}</li>
|
<td>{{ $device->locations->last()['room_code'] ?? ''}}</td>
|
||||||
<li>image_url: {{ $device['image_url'] }}</li>
|
<td>{{ $device->owners->last()['rz_username'] ?? ''}}</td>
|
||||||
<li>room_code: {{ $device->locations->last()['room_code'] }}</li>
|
</tr>
|
||||||
<li>rz_username: {{ $device->owners->last()['rz_username'] }}</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
@ -1,14 +1,14 @@
|
|||||||
<div>
|
<tr>
|
||||||
<ul>
|
<td>{{ $location->room_code }}</td>
|
||||||
<li>room_code: {{ $location->room_code }}</li>
|
<td>{{ $location->timestamp_located_since }}</td>
|
||||||
<li>timestamp_located_since: {{ $location->timestamp_located_since }}</li>
|
|
||||||
</ul>
|
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
|
<td>
|
||||||
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
|
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
|
||||||
<form method="POST" action="locations/{{ $location->location_transaction_id }}">
|
<form method="POST" action="locations/{{ $location->location_transaction_id }}">
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
@csrf
|
@csrf
|
||||||
<button>Delete</button>
|
<button>Delete</button>
|
||||||
</form>
|
</form>
|
||||||
|
</td>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</tr>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<div>
|
<tr>
|
||||||
<ul>
|
<td>{{ $owner->rz_username }}</td>
|
||||||
<li>rz_username: {{ $owner->rz_username }}</li>
|
<td>{{ $owner->timestamp_owner_since }}</td>
|
||||||
<li>timestamp_owner_since: {{ $owner->timestamp_owner_since }}</li>
|
|
||||||
</ul>
|
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
|
<td>
|
||||||
<button><a href="owners/{{ $owner->owner_transaction_id }}/edit">Edit</a></button>
|
<button><a href="owners/{{ $owner->owner_transaction_id }}/edit">Edit</a></button>
|
||||||
<form method="POST" action="owners/{{ $owner->owner_transaction_id }}">
|
<form method="POST" action="owners/{{ $owner->owner_transaction_id }}">
|
||||||
@method('DELETE')
|
@method('DELETE')
|
||||||
@csrf
|
@csrf
|
||||||
<button>Delete</button>
|
<button>Delete</button>
|
||||||
</form>
|
</form>
|
||||||
|
</td>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</tr>
|
@ -1,16 +1,34 @@
|
|||||||
<div>
|
@php
|
||||||
@php
|
|
||||||
$purchasing = $device->purchasing;
|
$purchasing = $device->purchasing;
|
||||||
@endphp
|
@endphp
|
||||||
<h3>Purchasing Information</h3>
|
|
||||||
<ul>
|
<div class="table-container">
|
||||||
<li>price: {{ $purchasing->price }}</li>
|
<table class="table is-narrow is-fullwidth">
|
||||||
<li>timestamp_warranty_end: {{ $purchasing->timestamp_warranty_end }}</li>
|
<thead>
|
||||||
<li>timestamp_purchase: {{ $purchasing->timestamp_purchase }}</li>
|
<tr>
|
||||||
<li>cost_centre: {{ $purchasing->cost_centre }}</li>
|
<th>price</th>
|
||||||
<li>seller: {{ $purchasing->seller }}</li>
|
<th>timestamp_warranty_end</th>
|
||||||
</ul>
|
<th>timestamp_purchase</th>
|
||||||
|
<th>cost_centre</th>
|
||||||
|
<th>seller</th>
|
||||||
@can('admin-only')
|
@can('admin-only')
|
||||||
<button><a href="{{ $device->device_id }}/purchasing/edit">Edit</a></button>
|
<th class="is-narrow">Action</th>
|
||||||
@endcan
|
@endcan
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $purchasing->price }}</td>
|
||||||
|
<td>{{ $purchasing->timestamp_warranty_end }}</td>
|
||||||
|
<td>{{ $purchasing->timestamp_purchase }}</td>
|
||||||
|
<td>{{ $purchasing->cost_centre }}</td>
|
||||||
|
<td>{{ $purchasing->seller }}</td>
|
||||||
|
@can('admin-only')
|
||||||
|
<td>
|
||||||
|
<button><a href="{{ $device->device_id }}/purchasing/edit">Edit</a></button>
|
||||||
|
</td>
|
||||||
|
@endcan
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
@ -1,56 +1,103 @@
|
|||||||
@extends('layout')
|
@extends('layout')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-6">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Create Device</h3>
|
||||||
|
|
||||||
|
|
||||||
<form method="POST" action="/devices">
|
<form method="POST" action="/devices">
|
||||||
@csrf
|
@csrf
|
||||||
<!--label for="device_id">device_id:</label>
|
|
||||||
<input type="text" id="device_id" name="device_id" value="{{old('device_id')}}" required>
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="title" class="label">Title</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
@enderror
|
<input class="input" type="text" id="title" placeholder="Title" name="title"
|
||||||
<br /-->
|
value="{{ old('title') }}" required />
|
||||||
<label for="title">Title:</label>
|
</div>
|
||||||
<input type="text" id="title" name="title" value="{{old('title')}}" required>
|
|
||||||
@error('title')
|
@error('title')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="device_type">device_type:</label>
|
|
||||||
<input type="text" id="device_type" name="device_type" value="{{old('device_type')}}" required>
|
<div class="field">
|
||||||
|
<label for="device_type" class="label">device_type</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="device_type" placeholder="device_type"
|
||||||
|
name="device_type" value="{{ old('device_type') }}" required />
|
||||||
|
</div>
|
||||||
@error('device_type')
|
@error('device_type')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="accessories">accessories:</label>
|
|
||||||
<input type="text" id="accessories" name="accessories" value="{{old('accessories')}}">
|
<div class="field">
|
||||||
|
<label for="accessories" class="label">accessories</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="accessories" placeholder="accessories"
|
||||||
|
name="accessories" value="{{ old('accessories') }}" />
|
||||||
|
</div>
|
||||||
@error('accessories')
|
@error('accessories')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="rz_username_buyer">rz_username_buyer:</label>
|
|
||||||
<input type="text" id="rz_username_buyer" name="rz_username_buyer" value="{{old('rz_username_buyer')}}" required>
|
<div class="field">
|
||||||
|
<label for="rz_username_buyer" class="label">rz_username_buyer</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="rz_username_buyer" placeholder="rz_username_buyer"
|
||||||
|
name="rz_username_buyer" value="{{ old('rz_username_buyer') }}" required />
|
||||||
|
</div>
|
||||||
@error('rz_username_buyer')
|
@error('rz_username_buyer')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="serial_number">serial_number:</label>
|
|
||||||
<input type="text" id="serial_number" name="serial_number" value="{{old('serial_number')}}" required>
|
<div class="field">
|
||||||
|
<label for="serial_number" class="label">serial_number</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="serial_number" placeholder="serial_number"
|
||||||
|
name="serial_number" value="{{ old('serial_number') }}" required />
|
||||||
|
</div>
|
||||||
@error('serial_number')
|
@error('serial_number')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="image_url">image_url:</label>
|
|
||||||
<input id="image_url" name="image_url" value="{{old('image_url')}}" required>
|
<div class="field">
|
||||||
|
<label for="image_url" class="label">image_url</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="image_url" placeholder="image_url" name="image_url"
|
||||||
|
value="{{ old('image_url') }}" required />
|
||||||
|
</div>
|
||||||
@error('image_url')
|
@error('image_url')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="description">description:</label>
|
|
||||||
<textarea type="text" id="description" name="description">{{old('rz_username_buyer')}}</textarea>
|
<div class="field">
|
||||||
|
<label for="description" class="label">description</label>
|
||||||
|
<div class="control">
|
||||||
|
<textarea class="textarea" placeholder="description" id="description" name="description">{{ old('description') }}</textarea>
|
||||||
|
</div>
|
||||||
@error('description')
|
@error('description')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<input type="submit" value="Submit">
|
|
||||||
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Submit</button>
|
||||||
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<a class="button is-success is-light" href="/devices">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
@ -1,57 +1,102 @@
|
|||||||
@extends('layout')
|
@extends('layout')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<form method="POST" action="/devices/{{$device->device_id}}">
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-6">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Edit Device</h3>
|
||||||
|
|
||||||
|
<form method="POST" action="/devices/{{ $device->device_id }}">
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
@csrf
|
@csrf
|
||||||
<!--label for="device_id">device_id:</label>
|
|
||||||
<input type="text" id="device_id" name="device_id" value="{{$device->device_id}}" required>
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="title" class="label">Title</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="title" name="title"
|
||||||
|
value="{{ $device->title }}" required />
|
||||||
|
</div>
|
||||||
|
@error('title')
|
||||||
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br /-->
|
</div>
|
||||||
<label for="title">Title:</label>
|
|
||||||
<input type="text" id="title" name="title" value="{{$device->title}}" required>
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="device_type" class="label">device_type</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="device_type"
|
||||||
|
name="device_type" value="{{ $device->device_type }}" required />
|
||||||
|
</div>
|
||||||
|
@error('device_type')
|
||||||
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="device_type">device_type:</label>
|
|
||||||
<input type="text" id="device_type" name="device_type" value="{{$device->device_type}}" required>
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="accessories" class="label">accessories</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="accessories"
|
||||||
|
name="accessories" value="{{ $device->accessories }}" />
|
||||||
|
</div>
|
||||||
|
@error('accessories')
|
||||||
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="accessories">accessories:</label>
|
|
||||||
<input type="text" id="accessories" name="accessories" value="{{$device->accessories}}">
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="rz_username_buyer" class="label">rz_username_buyer</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="rz_username_buyer"
|
||||||
|
name="rz_username_buyer" value="{{ $device->rz_username_buyer }}" required />
|
||||||
|
</div>
|
||||||
|
@error('rz_username_buyer')
|
||||||
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="rz_username_buyer">rz_username_buyer:</label>
|
|
||||||
<input type="text" id="rz_username_buyer" name="rz_username_buyer" value="{{$device->rz_username_buyer}}" required>
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="serial_number" class="label">serial_number</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="serial_number"
|
||||||
|
name="serial_number" value="{{ $device->serial_number }}" required />
|
||||||
|
</div>
|
||||||
|
@error('serial_number')
|
||||||
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="serial_number">serial_number:</label>
|
|
||||||
<input type="text" id="serial_number" name="serial_number" value="{{$device->serial_number}}" required>
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="image_url" class="label">image_url</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="image_url" name="image_url"
|
||||||
|
value="{{ $device->image_url }}" required />
|
||||||
|
</div>
|
||||||
|
@error('image_url')
|
||||||
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="image_url">image_url:</label>
|
|
||||||
<input id="image_url" name="image_url" value="{{$device->image_url}}" required>
|
<div class="field">
|
||||||
@error('device_id')
|
<label for="description" class="label">description</label>
|
||||||
<p>{{$message}}</p>
|
<div class="control">
|
||||||
|
<textarea class="textarea" id="description" name="description">{{ $device->description }}</textarea>
|
||||||
|
</div>
|
||||||
|
@error('description')
|
||||||
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="description">description:</label>
|
|
||||||
<textarea type="text" id="description" name="description">{{$device->description}}</textarea>
|
<div class="field is-grouped is-grouped-centered">
|
||||||
@error('device_id')
|
<div class="control">
|
||||||
<p>{{$message}}</p>
|
<button class="button is-success" type="submit">Submit</button>
|
||||||
@enderror
|
</div>
|
||||||
<br />
|
<div class="control">
|
||||||
<input type="submit" value="Submit">
|
<a class="button is-success is-light" href="/devices/{{ $device->device_id }}">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
@ -1,17 +1,37 @@
|
|||||||
@extends('layout')
|
@extends('layout')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<h1>Device List</h1>
|
<h3 class="title is-3 has-text-centered">Device List</h3>
|
||||||
@unless(count($devices) == 0)
|
@can('admin-only')
|
||||||
<ul>
|
<div class="buttons is-right">
|
||||||
|
<a class="button is-small" href="devices/create">Create Device</a>
|
||||||
|
</div>
|
||||||
|
@endcan
|
||||||
|
@unless (count($devices) == 0)
|
||||||
|
<div class="table-container">
|
||||||
|
<table class="table is-narrow is-fullwidth is-striped is-hoverable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>device_title</th>
|
||||||
|
<th>device_type</th>
|
||||||
|
<th>description</th>
|
||||||
|
<th>accessories</th>
|
||||||
|
<th>rz_username_buyer</th>
|
||||||
|
<th>serial_number</th>
|
||||||
|
<th>image_url</th>
|
||||||
|
<th>room_code</th>
|
||||||
|
<th>rz_username</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
@foreach ($devices as $device)
|
@foreach ($devices as $device)
|
||||||
<x-device-simple :device="$device" />
|
<x-device-simple :device="$device" />
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
@else
|
@else
|
||||||
<p>No devices found</p>
|
<p>No devices found</p>
|
||||||
@endunless
|
@endunless
|
||||||
@can('admin-only')
|
|
||||||
<button><a href="devices/create">Device</a></button>
|
|
||||||
@endcan
|
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -2,35 +2,107 @@
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>Device Manager</title>
|
<title>Device Manager</title>
|
||||||
|
{{-- Bulma CSS Framework --}}
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/*for sticky footer*/
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
min-height: 100vh;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
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');
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
|
||||||
<ul>
|
<div class="navbar-brand">
|
||||||
<li><a href="/home">Home</a></li>
|
<a class="navbar-item" href="/home">
|
||||||
|
Device Manager
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{{-- nav bar for mobile device --}}
|
||||||
|
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navBarBasic">
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="navBarBasic" class="navbar-menu">
|
||||||
|
<div class="navbar-start">
|
||||||
@auth
|
@auth
|
||||||
<li>Welcome {{ auth()->user()->full_name }}</li>
|
<a class="navbar-item" href="/devices">To List</a>
|
||||||
<li>
|
<a class="navbar-item" href="/log-viewer">To Log-Viewer</a>
|
||||||
<form class="inline" method="POST" action="/logout">
|
|
||||||
@csrf
|
|
||||||
<button type="submit">Logout</button>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
@else
|
|
||||||
<li><a href="/register">Register</a></li>
|
|
||||||
<li><a href="/login">Login</a></li>
|
|
||||||
@endauth
|
@endauth
|
||||||
</ul>
|
</div>
|
||||||
|
|
||||||
|
<div class="navbar-end">
|
||||||
|
@auth
|
||||||
|
<div class="navbar-item has-dropdown is-hoverable">
|
||||||
|
<a class="navbar-link">
|
||||||
|
{{ auth()->user()->full_name }}
|
||||||
|
</a>
|
||||||
|
<div class="navbar-dropdown is-right">
|
||||||
|
<form class="navbar-item" method="POST" action="/logout">
|
||||||
|
@csrf
|
||||||
|
<button class="button is-small" type="submit">Logout</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<a class="navbar-item" href="/login">
|
||||||
|
Login
|
||||||
|
</a>
|
||||||
|
<a class="navbar-item" href="/register">
|
||||||
|
Register
|
||||||
|
</a>
|
||||||
|
@endauth
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
|
||||||
<h1>Device Manager</h1>
|
<main id="wrapper">
|
||||||
|
<section class="section">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@yield('content')
|
@yield('content')
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
|
||||||
<p>© 2023 My Website. All rights reserved.</p>
|
<footer class="footer notification is-dark p-5">
|
||||||
|
<p class="has-text-centered">© 2023 Device-Manager. MIT License.</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -1,17 +1,48 @@
|
|||||||
<form method="POST" action="/devices/{{ $device->device_id }}/locations">
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-6">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Create Location</h3>
|
||||||
|
<form method="POST" action="/devices/{{ $device->device_id }}/locations">
|
||||||
@csrf
|
@csrf
|
||||||
<label for="room_code">room_code:</label>
|
|
||||||
<input type="text" id="room_code" name="room_code" value="{{old('room_code')}}" required>
|
<div class="field">
|
||||||
|
<label for="room_code" class="label">room_code</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="room_code" placeholder="room_code" name="room_code"
|
||||||
|
value="{{ old('room_code') }}" required />
|
||||||
|
</div>
|
||||||
@error('room_code')
|
@error('room_code')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="timestamp_located_since">timestamp_located_since:</label>
|
|
||||||
<input type="text" id="timestamp_located_since" name="timestamp_located_since"
|
<div class="field">
|
||||||
value="{{old('timestamp_located_since')}}" required>
|
<label for="timestamp_located_since" class="label">timestamp_located_since</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="timestamp_located_since"
|
||||||
|
placeholder="timestamp_located_since" name="timestamp_located_since"
|
||||||
|
value="{{ old('timestamp_located_since') }}" required />
|
||||||
|
</div>
|
||||||
@error('timestamp_located_since')
|
@error('timestamp_located_since')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Submit</button>
|
||||||
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<a class="button is-success is-light" href="/devices/{{ $device->device_id }}">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
@ -1,18 +1,48 @@
|
|||||||
<form method="POST" action="/devices/locations/{{ $location->location_transaction_id }}">
|
@extends('layout')
|
||||||
@method('PUT')
|
|
||||||
|
@section('content')
|
||||||
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-6">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Edit Location</h3>
|
||||||
|
<form method="POST" action="/devices/locations/{{ $location->location_transaction_id }}">
|
||||||
@csrf
|
@csrf
|
||||||
<label for="room_code">room_code:</label>
|
@method('PUT')
|
||||||
<input type="text" id="room_code" name="room_code" value="{{$location->room_code}}" required>
|
<div class="field">
|
||||||
|
<label for="room_code" class="label">room_code</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="room_code" name="room_code"
|
||||||
|
value="{{$location->room_code}}" required />
|
||||||
|
</div>
|
||||||
@error('room_code')
|
@error('room_code')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="timestamp_located_since">timestamp_located_since:</label>
|
|
||||||
<input type="text" id="timestamp_located_since" name="timestamp_located_since"
|
<div class="field">
|
||||||
value="{{$location->timestamp_located_since}}" required>
|
<label for="timestamp_located_since" class="label">timestamp_located_since</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="timestamp_located_since" name="timestamp_located_since"
|
||||||
|
value="{{$location->timestamp_located_since}}" required />
|
||||||
|
</div>
|
||||||
@error('timestamp_located_since')
|
@error('timestamp_located_since')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Submit</button>
|
||||||
|
</div>
|
||||||
|
{{-- TODO: make a link to go back to device --}}
|
||||||
|
{{-- <div class="control">
|
||||||
|
<a class="button is-success is-light" href="/devices/{{ $device->device_id }}">Cancel</a>
|
||||||
|
</div> --}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@ -1,17 +1,48 @@
|
|||||||
<form method="POST" action="/devices/{{ $device->device_id }}/owners">
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-6">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Create Owner</h3>
|
||||||
|
<form method="POST" action="/devices/{{ $device->device_id }}/owners">
|
||||||
@csrf
|
@csrf
|
||||||
<label for="rz_username">rz_username:</label>
|
|
||||||
<input type="text" id="rz_username" name="rz_username" value="{{old('rz_username')}}" required>
|
<div class="field">
|
||||||
|
<label for="rz_username" class="label">rz_username</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="rz_username" name="rz_username" placeholder="rz_username"
|
||||||
|
value="{{old('rz_username')}}" required />
|
||||||
|
</div>
|
||||||
@error('rz_username')
|
@error('rz_username')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="timestamp_owner_since">timestamp_owner_since:</label>
|
|
||||||
<input type="text" id="timestamp_owner_since" name="timestamp_owner_since"
|
<div class="field">
|
||||||
value="{{old('timestamp_owner_since')}}" required>
|
<label for="timestamp_owner_since" class="label">timestamp_owner_since</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="timestamp_owner_since" name="timestamp_owner_since" placeholder="timestamp_owner_since"
|
||||||
|
value="{{old('timestamp_owner_since')}}" required />
|
||||||
|
</div>
|
||||||
@error('timestamp_owner_since')
|
@error('timestamp_owner_since')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Submit</button>
|
||||||
|
</div>
|
||||||
|
{{-- TODO: make a link to go back to device --}}
|
||||||
|
{{-- <div class="control">
|
||||||
|
<a class="button is-success is-light" href="/devices/{{ $device->device_id }}">Cancel</a>
|
||||||
|
</div> --}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@ -1,18 +1,48 @@
|
|||||||
<form method="POST" action="/devices/owners/{{ $owner->owner_transaction_id }}">
|
@extends('layout')
|
||||||
@method('PUT')
|
|
||||||
|
@section('content')
|
||||||
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-6">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Edit Owner</h3>
|
||||||
|
<form method="POST" action="/devices/owners/{{ $owner->owner_transaction_id }}">
|
||||||
@csrf
|
@csrf
|
||||||
<label for="rz_username">rz_username:</label>
|
@method('PUT')
|
||||||
<input type="text" id="rz_username" name="rz_username" value="{{$owner->rz_username}}" required>
|
<div class="field">
|
||||||
|
<label for="rz_username" class="label">rz_username</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="rz_username" name="rz_username"
|
||||||
|
value="{{$owner->rz_username}}" required />
|
||||||
|
</div>
|
||||||
@error('rz_username')
|
@error('rz_username')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="timestamp_owner_since">timestamp_owner_since:</label>
|
|
||||||
<input type="text" id="timestamp_owner_since" name="timestamp_owner_since"
|
<div class="field">
|
||||||
value="{{$owner->timestamp_owner_since}}" required>
|
<label for="timestamp_owner_since" class="label">timestamp_owner_since</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="timestamp_owner_since" name="timestamp_owner_since"
|
||||||
|
value="{{$owner->timestamp_owner_since}}" required />
|
||||||
|
</div>
|
||||||
@error('timestamp_owner_since')
|
@error('timestamp_owner_since')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Submit</button>
|
||||||
|
</div>
|
||||||
|
{{-- TODO: make a link to go back to device --}}
|
||||||
|
{{-- <div class="control">
|
||||||
|
<a class="button is-success is-light" href="/devices/{{ $device->device_id }}">Cancel</a>
|
||||||
|
</div> --}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@ -1,36 +1,82 @@
|
|||||||
<form method="POST" action="/devices/{{ $purchasing->device->device_id }}/purchasing">
|
@extends('layout')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-6">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Edit Purchasing</h3>
|
||||||
|
<form method="POST" action="/devices/{{ $purchasing->device->device_id }}/purchasing">
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
@csrf
|
@csrf
|
||||||
<label for="price">price:</label>
|
|
||||||
<input type="text" id="price" name="price" value="{{$purchasing->price}}" required>
|
<div class="field">
|
||||||
|
<label for="price" class="label">price</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="price" name="price"
|
||||||
|
value="{{$purchasing->price}}" required />
|
||||||
|
</div>
|
||||||
@error('price')
|
@error('price')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="timestamp_warranty_end">timestamp_warranty_end:</label>
|
|
||||||
<input type="text" id="timestamp_warranty_end" name="timestamp_warranty_end"
|
<div class="field">
|
||||||
value="{{$purchasing->timestamp_warranty_end}}" required>
|
<label for="timestamp_warranty_end" class="label">timestamp_warranty_end</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="timestamp_warranty_end" name="timestamp_warranty_end"
|
||||||
|
value="{{$purchasing->timestamp_warranty_end}}" required />
|
||||||
|
</div>
|
||||||
@error('timestamp_warranty_end')
|
@error('timestamp_warranty_end')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="timestamp_purchase">timestamp_purchase:</label>
|
|
||||||
<input type="text" id="timestamp_purchase" name="timestamp_purchase"
|
<div class="field">
|
||||||
value="{{$purchasing->timestamp_purchase}}" required>
|
<label for="timestamp_purchase" class="label">timestamp_purchase</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="timestamp_purchase" name="timestamp_purchase"
|
||||||
|
value="{{$purchasing->timestamp_purchase}}" required />
|
||||||
|
</div>
|
||||||
@error('timestamp_purchase')
|
@error('timestamp_purchase')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="cost_centre">cost_centre:</label>
|
|
||||||
<input type="text" id="cost_centre" name="cost_centre" value="{{$purchasing->cost_centre}}" required>
|
<div class="field">
|
||||||
|
<label for="cost_centre" class="label">cost_centre</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="cost_centre" name="cost_centre"
|
||||||
|
value="{{$purchasing->cost_centre}}" required />
|
||||||
|
</div>
|
||||||
@error('cost_centre')
|
@error('cost_centre')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="seller">seller:</label>
|
|
||||||
<input type="text" id="seller" name="seller" value="{{$purchasing->seller}}">
|
<div class="field">
|
||||||
|
<label for="seller" class="label">seller</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="seller" name="seller"
|
||||||
|
value="{{$purchasing->seller}}" required />
|
||||||
|
</div>
|
||||||
@error('seller')
|
@error('seller')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<input type="submit" value="Submit">
|
</div>
|
||||||
</form>
|
|
||||||
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Submit</button>
|
||||||
|
</div>
|
||||||
|
{{-- TODO: make a link to go back to device --}}
|
||||||
|
{{-- <div class="control">
|
||||||
|
<a class="button is-success is-light" href="/devices/{{ $device->device_id }}">Cancel</a>
|
||||||
|
</div> --}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
@ -1,25 +1,51 @@
|
|||||||
@extends('layout')
|
@extends('layout')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<h1>Login Form</h1>
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-4">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Login Form</h3>
|
||||||
<form method="POST" action="/users/authenticate">
|
<form method="POST" action="/users/authenticate">
|
||||||
@csrf
|
@csrf
|
||||||
<label for="rz_username">RZ-Username:</label>
|
|
||||||
<input type="text" id="rz_username" name="rz_username" value="{{ old('device_id') }}" required>
|
<div class="field">
|
||||||
|
<label for="rz_username" class="label">RZ-Username</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="rz_username" placeholder="RZ-Username"
|
||||||
|
name="rz_username" value="{{ old('device_id') }}" required />
|
||||||
|
</div>
|
||||||
@error('rz_username')
|
@error('rz_username')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<label for="hashed_password">Password:</label>
|
|
||||||
<input type="password" id="hashed_password" name="password" required>
|
<div class="field">
|
||||||
|
<label for="hashed_password" class="label">Password</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="password" id="hashed_password" name="password" required />
|
||||||
|
</div>
|
||||||
@error('hashed_password')
|
@error('hashed_password')
|
||||||
<p>{{ $message }}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br />
|
</div>
|
||||||
<input type="submit" value="Login">
|
|
||||||
<div>
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Login</button>
|
||||||
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<a class="button is-success is-light" href="/home">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="has-text-centered">
|
||||||
<p>Don't have an account?</p>
|
<p>Don't have an account?</p>
|
||||||
<a href="/register">Register</a>
|
<a href="/register">Register</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
@ -1,43 +1,79 @@
|
|||||||
@extends('layout')
|
@extends('layout')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<h1>Registration Form</h1>
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-4">
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="title is-3 has-text-centered">Registration Form Form</h3>
|
||||||
<form method="POST" action="/users">
|
<form method="POST" action="/users">
|
||||||
@csrf
|
@csrf
|
||||||
<label for="rz_username">RZ-Username:</label>
|
|
||||||
<input type="text" id="rz_username" name="rz_username" value="{{old('device_id')}}" required>
|
<div class="field">
|
||||||
|
<label for="rz_username" class="label">RZ-Username</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="rz_username" name="rz_username"
|
||||||
|
value="{{ old('device_id') }}" placeholder="RZ-Username" required />
|
||||||
|
</div>
|
||||||
@error('rz_username')
|
@error('rz_username')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br/>
|
</div>
|
||||||
<label for="full_name">Full Name:</label>
|
|
||||||
<input type="text" id="full_name" name="full_name" value="{{old('device_id')}}" required>
|
<div class="field">
|
||||||
|
<label for="full_name" class="label">Full Name</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="full_name" name="full_name"
|
||||||
|
value="{{ old('device_id') }}" placeholder="Full Name" required />
|
||||||
|
</div>
|
||||||
@error('full_name')
|
@error('full_name')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br/>
|
</div>
|
||||||
<label for="organisation_unit">Organisation Unit:</label>
|
|
||||||
<input type="text" id="organisation_unit" name="organisation_unit" value="{{old('device_id')}}" required>
|
<div class="field">
|
||||||
|
<label for="organisation_unit" class="label">Organisation Unit</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="organisation_unit" name="organisation_unit"
|
||||||
|
value="{{ old('device_id') }}" placeholder="Organisation Unit" required />
|
||||||
|
</div>
|
||||||
@error('organisation_unit')
|
@error('organisation_unit')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br/>
|
</div>
|
||||||
<label for="password">Password:</label>
|
|
||||||
<input type="password" id="password" name="password" required>
|
<div class="field">
|
||||||
|
<label for="password" class="label">Password</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="password" id="password" name="password" required />
|
||||||
|
</div>
|
||||||
@error('password')
|
@error('password')
|
||||||
<p>{{$message}}</p>
|
<p class="help is-danger">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br/>
|
</div>
|
||||||
{{-- <label for="password_confirm">Confirm Password:</label>
|
|
||||||
|
<div class="field is-grouped is-grouped-centered">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-success" type="submit">Register</button>
|
||||||
|
</div>
|
||||||
|
<div class="control">
|
||||||
|
<a class="button is-success is-light" href="/home">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{--
|
||||||
|
<label for="password_confirm">Confirm Password:</label>
|
||||||
<input type="password" id="password_confirmation" name="password_confirm" required><
|
<input type="password" id="password_confirmation" name="password_confirm" required><
|
||||||
@error('password_confirmation')
|
@error('password_confirmation')
|
||||||
<p>{{$message}}</p>
|
<p>{{$message}}</p>
|
||||||
@enderror
|
@enderror
|
||||||
<br/> --}}
|
--}}
|
||||||
<input type="submit" value="Register">
|
|
||||||
<div>
|
</form>
|
||||||
|
<div class="has-text-centered">
|
||||||
<p>Already have an account?</p>
|
<p>Already have an account?</p>
|
||||||
<a href="/login">Login</a>
|
<a href="/login">Login</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
@ -1,10 +1,8 @@
|
|||||||
@extends('layout')
|
@extends('layout')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<h1>Welcome</h1>
|
<h3 class="title is-3 has-text-centered">Welcome</h3>
|
||||||
<a href="/devices">To List</a>
|
|
||||||
<br/>
|
|
||||||
@can('admin-only')
|
|
||||||
<a href="/log-viewer">To Log Viewer</a>
|
|
||||||
@endcan
|
|
||||||
@endsection
|
@endsection
|
||||||
|
{{-- @can('admin-only')
|
||||||
|
<a href="/log-viewer">To Log Viewer</a>
|
||||||
|
@endcan --}}
|
||||||
|
Loading…
Reference in New Issue
Block a user