3
0
Fork 0

Lot's of bug fixes

This commit is contained in:
BuildTools 2021-06-27 21:01:43 +02:00
parent ad320963fc
commit 7718ed6c32
196 changed files with 51167 additions and 3010 deletions

View file

@ -0,0 +1,100 @@
@extends('layouts.admin')
@section('page', 'Show Manager')
@section('content')
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title" style="margin-top: 8px">Add Show</h3>
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.show') }}">Back</a></small>
</div>
<div class="box-body">
@if(session('error'))
<div class="alert alert-success" role="alert">
{{ session('error') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<form method="POST" action="{{ route('panel.show.create') }}" class="col-xs-10 col-xs-offset-1">
@csrf
<div class="form-group @error('title') has-error @enderror">
<label for="title" class="text-md-right">{{ __('Title:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
<input id="title" type="text" class="form-control" placeholder="Title" name="title" required autocomplete="off" autofocus>
</div>
@error('title')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('description') has-error @enderror">
<label for="description" class="text-md-right">{{ __('Description:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<textarea id="description" class="form-control" placeholder="Description" name="description" required autofocus style="height: 150px; resize: none"></textarea>
</div>
@error('description')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('price') has-error @enderror">
<label for="price" class="text-md-right">{{ __('Price:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
<input id="price" type="number" step="0.01" class="form-control" placeholder="Price" name="price" required autocomplete="off" autofocus>
</div>
@error('price')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('vault_price') has-error @enderror">
<label for="vault_price" class="text-md-right">{{ __('Vault Price:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
<input id="vault_price" type="number" step="0.01" class="form-control" placeholder="Vault Price" name="vault_price" required autocomplete="off" autofocus>
</div>
@error('vault_price')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('seats') has-error @enderror">
<label for="seats" class="text-md-right">{{ __('Seats:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="seats" type="number" step="1" min="1" value="1" class="form-control" placeholder="Seats" name="seats" required autocomplete="off" autofocus>
</div>
@error('seats')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('image') has-error @enderror">
<label for="image" class="text-md-right">{{ __('Image:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
<input id="image" type="text" class="form-control" placeholder="Image" name="image" required autocomplete="off" autofocus>
</div>
@error('image')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-block btn-primary">{{ __('Add Show') }}</button>
</form>
</div>
</div>
</div>
@endsection

View file

@ -0,0 +1,77 @@
@extends('layouts.admin')
@section('page', 'Show Manager')
@section('content')
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title" style="margin-top: 8px"><strong>Title: </strong>{{ $show->title }}</h3>
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.show') }}">Back</a></small>
</div>
<div class="box-body">
@if(session('error'))
<div class="alert alert-success" role="alert">
{{ session('error') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<form method="POST" action="{{ route('panel.show.update') }}" class="col-xs-10 col-xs-offset-1">
@csrf
<input name="id" value="{{ $show->id }}" style="display: none">
<div class="form-group @error('description') has-error @enderror">
<label for="description" class="text-md-right">{{ __('Description:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<textarea id="description" class="form-control" placeholder="Description" name="description" required autofocus style="height: 150px; resize: none">{{ $show->description }}</textarea>
</div>
@error('description')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('price') has-error @enderror">
<label for="price" class="text-md-right">{{ __('Price:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
<input id="price" type="number" step="0.01" class="form-control" placeholder="Price" name="price" value="{{ $show->price }}" required autocomplete="off" autofocus>
</div>
@error('price')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('vault_price') has-error @enderror">
<label for="vault_price" class="text-md-right">{{ __('Vault Price:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
<input id="vault_price" type="number" step="0.01" class="form-control" placeholder="Vault Price" name="vault_price" value="{{ $show->vault_price }}" required autocomplete="off" autofocus>
</div>
@error('vault_price')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('image') has-error @enderror">
<label for="image" class="text-md-right">{{ __('Image:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
<input id="image" type="text" class="form-control" placeholder="Image" name="image" value="{{ $show->image }}" required autocomplete="off" autofocus>
</div>
@error('image')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-block btn-primary">{{ __('Edit Show') }}</button>
</form>
</div>
</div>
</div>
@endsection

View file

@ -0,0 +1,112 @@
@extends('layouts.admin')
@section('page', 'Show Manager')
@section('content')
<div class="col-lg-8 col-lg-offset-2">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">Search</h3>
</div>
<div class="box-body">
<form id="searchForm">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
<input id="search" type="text" class="form-control" name="search" value="{{ $search }}" placeholder="Search for Shows by title" autofocus>
</div>
<button class="btn btn-block btn-primary">{{ __('Search') }}</button>
</form>
</div>
</div>
</div>
<div class="col-lg-8 col-lg-offset-2">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title" style="margin-top: 8px; width: 100%">Shows<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.show.add') }}">Add</a></small></h3>
</div>
<div class="box-body">
@if(session('success'))
<div class="alert alert-success" role="alert">
{{ session('success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@elseif(session('error'))
<div class="alert alert-success" role="alert">
{{ session('error') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>Title</th>
<th class="text-center">Price</th>
<th class="text-center">Vault Price</th>
<th class="text-center">Seats</th>
<th class="text-center" style="width: 155px">Action</th>
</tr>
</thead>
<tbody>
@if(!empty($shows->all()))
@foreach($shows as $show)
<tr>
<td>{{ $show->id }}</td>
<td>{{ $show->title }}</td>
<td class="text-center">{{ $show->price }}</td>
<td class="text-center">{{ $show->vault_price }}</td>
<td>{{ $show->seats }}</td>
<td style="width: 155px"><a class="btn btn-primary" href="{{ route('panel.show.info', ['id' => $show->id]) }}"><i class="glyphicon glyphicon-info-sign"></i></a> <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.show.edit', ['id' => $show->id]) }}"><i class="glyphicon glyphicon-pencil"></i></a> <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.show.delete', ['id' => $show->id]) }}"><i class="glyphicon glyphicon-trash"></i></a></td>
</tr>
@endforeach
@else
<tr>
<td></td>
<td>No shows found</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
@endif
</tbody>
</table>
@if(!empty($shows->all()))
<nav style="float: right">
<ul class="pagination">
<li @if($page == 1) class="disabled" @endif>
<a @if($page != 1) href="{{ route('panel.ums', ['page' => ($page - 1)]) }}" @endif aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
</li>
@for($i = 1; $i <= $pages; $i++)
<li @if($i == $page) class="active" @endif>
<a @if($i != $page)href="{{ route('panel.ums', ['page' => $i]) }}" @endif><span>{{ $i }}</span></a>
</li>
@endfor
<li @if($page == $pages) class="disabled" @endif>
<a @if($page != $pages) href="{{ route('panel.ums', ['page' => ($page + 1)]) }}" @endif aria-label="Next"><span aria-hidden="true">»</span></a>
</li>
</ul>
</nav>
@endif
</div>
</div>
</div>
@endsection
@section('javascript')
<script>
const search = "{{ $search }}";
const route = "{{ route('panel.show', ['page' => 1]) }}";
$("form#searchForm").submit(function(e) {
e.preventDefault();
let term = $("form#searchForm input#search").val();
if(term === search)
return;
window.location.replace(route + "/" + term);
});
</script>
@endsection

View file

@ -0,0 +1,29 @@
@extends('layouts.admin')
@section('page', 'Show Manager')
@section('content')
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ $show->title }}</h3>
<small style="float: right"><a class="btn btn-primary" href="{{ url()->previous() }}">Back</a></small>
</div>
<div class="box-body">
<div class="row">
<div class="col-xs-12 col-md-6">
<p><strong>ID: #</strong>{{ $show->id }}
<br><strong>Title:</strong> {{ $show->title }}
<br><strong>Description:</strong><br>{{ $show->description }}
<br><strong>Price:</strong> {{ $show->price }}
<br><strong>Vault Price:</strong> {{ $show->vault_price }}
<br><strong>Seats:</strong> {{ $show->seats }}</p>
</div>
<div class="col-xs-12 col-md-6 text-center" style="padding: 15px">
<img src="{{ $show->image }}" alt="Image" style="width: 50%; height: auto; border-radius: 10px">
</div>
</div>
</div>
</div>
</div>
@endsection