Initial Commit

This commit is contained in:
dann4624
2022-09-28 09:38:08 +02:00
parent cac476f80f
commit 2d04a269e6
355 changed files with 52166 additions and 25 deletions
+13
View File
@@ -0,0 +1,13 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<form method="post" action="{{route('products.store')}}">
@include('products.form_input')
@include('Partials.Form.Input.Submit.submit_create')
</form>
</div>
@endsection
@section('scripting')
@endsection
+138
View File
@@ -0,0 +1,138 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
@include('Partials.Pages.index_top')
<table class="table table-striped">
<thead>
@if(config('app.barcode_mode') == 'static')
<th>@lang('barcode')</th>
@endif
<th>@lang('category')</th>
<th class="text-center">@lang('subcategory')</th>
<th>@lang('brand')</th>
<th>@lang('model')</th>
<th>@lang('name')</th>
<th>@lang('description')</th>
<th>@lang('available')</th>
<th>@lang('lent')</th>
<th>@lang('reserved')</th>
<th>@lang('total')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $product)
<tr>
@if(config('app.barcode_mode') == 'static')
<td class="align-middle">
@if(!empty($product->barcode))
{{$product->barcode}}
@else
@lang('none')
@endif
</td>
@endif
<td class="align-middle">
@can('categories_view')
<a href="{{route('categories.show',['category' => $product->category])}}"
class="btn btn-success">
{{$product->category->name}}
</a>
@else
{{$product->category->name}}
@endcan
</td>
<td class="align-middle text-center">
@can('subcategories_view')
@if(!empty($product->subcategory))
<a href="{{route('subcategories.show',['subcategory' => $product->subcategory])}}"
class="btn btn-success">
{{$product->subcategory->name}}
</a>
@else
@lang('none')
@endif
@else
{{$product->subcategory->name}}
@endcan
</td>
<td class="align-middle">
@can('brands_view')
<a href="{{route('brands.show',['brand' => $product->brand])}}" class="btn btn-success">
{{$product->brand->name}}
</a>
@else
{{$product->brand->name}}
@endcan
</td>
<td class="align-middle">
@can('models_view')
<a href="{{route('models.show',['model' => $product->model])}}" class="btn btn-success">
{{$product->model->name}}
</a>
@else
{{$product->model->name}}
@endcan
</td>
<td class="align-middle">
@can('products_view')
@if(!empty($product->name))
<a href="{{route('products.show',['product' => $product])}}"
class="btn btn-success me-2">
{{$product->name}}
</a>
@else
<a href="{{route('products.show',['product' => $product])}}"
class="btn btn-outline-success me-2">
@lang('show')
</a>
@endif
@else
{{$product->name}}
@endcan
</td>
<td class="align-middle">
{{$product->description}}
</td>
<td class="align-middle text-center">
{{$product->total - (count($product->loans) + count($product->reservations))}}
</td>
<td class="align-middle text-center">
{{count($product->loans)}}
</td>
<td class="align-middle text-center">
{{count($product->reservations)}}
</td>
<td class="align-middle text-center">
{{$product->total}}
</td>
<td>
@can('brand_edit')
<a href="{{route('brands.edit',['brand' => $brand])}}" class="btn btn-outline-success">
@lang('edit')
</a>
@endcan
@can('brand_restore')
<a href="{{route('brands.restore',['brand' => $brand])}}" class="btn btn-outline-success">
@lang('restore')
</a>
@endcan
@can('brand_delete_force')
<a href="{{route('productss.forceDelete',['brand' => $brand])}}"
class="btn btn-outline-danger">
@lang('delete_force')
</a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
+50
View File
@@ -0,0 +1,50 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<form method="post" action="{{route('products.update',['product' => $data])}}">
@include('products.form_input')
@include('Partials.Form.Input.Submit.submit_edit')
</form>
@can('products_delete')
@include('Partials.Form.Input.Modal.delete')
@endcan
@can('products_amount_add')
<hr>
<form method="post">
@method('put')
@csrf
<div class="mb-3 row">
<label for="amount_input" class="col-2 col-form-label fw-bold">@lang('amount') : </label>
<div class="col-8">
<input
type="number"
class="form-control me-2"
name="amount"
id="amount_input"
placeholder="@lang('amount')"
@if(old('amount') !== null)
value="{{old('amount')}}"
@else
value="1"
@endif
>
</div>
<div class="col-2">
@can('products_amount_add')
<input type="submit" class="btn btn-success ms-2" value="@lang('amount_add')"
formaction="{{route('products.amount.add',['product' => $data])}}">
@endcan
@can('products_amount_remove')
<input type="submit" class="btn btn-danger ms-2" value="@lang('amount_remove')"
formaction="{{route('products.amount.remove',['product' => $data])}}">
@endcan
</div>
</div>
</form>
@endcan
</div>
@endsection
@section('scripting')
@endsection
@@ -0,0 +1,9 @@
@if(config('app.barcode_mode') == "static")
@include('Partials.Form.Input.barcode')
@endif
@include('Partials.Form.Input.category')
@include('Partials.Form.Input.subcategory')
@include('Partials.Form.Input.brand')
@include('Partials.Form.Input.model')
@include('Partials.Form.Input.name')
@include('Partials.Form.Input.description')
+129
View File
@@ -0,0 +1,129 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
@include('Partials.Pages.index_top')
<table class="table table-striped">
<thead>
@if(config('app.barcode_mode') == 'static')
<th>@lang('barcode')</th>
@endif
<th>@lang('category')</th>
<th class="text-center">@lang('subcategory')</th>
<th>@lang('brand')</th>
<th>@lang('model')</th>
<th>@lang('name')</th>
<th>@lang('description')</th>
<th class="text-center">@lang('available')</th>
<th class="text-center">@lang('lent')</th>
<th class="text-center">@lang('reserved')</th>
<th class="text-center">@lang('total')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $product)
<tr>
@if(config('app.barcode_mode') == 'static')
<td class="align-middle">
@if(!empty($product->barcode))
{{$product->barcode}}
@else
@lang('none')
@endif
</td>
@endif
<td class="align-middle">
@can('categories_view')
<a href="{{route('categories.show',['category' => $product->category])}}"
class="btn btn-success">
{{$product->category->name}}
</a>
@else
{{$product->category->name}}
@endcan
</td>
<td class="align-middle text-center">
@can('subcategories_view')
@if(!empty($product->subcategory))
<a href="{{route('subcategories.show',['subcategory' => $product->subcategory])}}"
class="btn btn-success">
{{$product->subcategory->name}}
</a>
@else
@lang('none')
@endif
@else
{{$product->subcategory->name}}
@endcan
</td>
<td class="align-middle">
@can('brands_view')
<a href="{{route('brands.show',['brand' => $product->brand])}}" class="btn btn-success">
{{$product->brand->name}}
</a>
@else
{{$product->brand->name}}
@endcan
</td>
<td class="align-middle">
@can('models_view')
<a href="{{route('models.show',['model' => $product->model])}}" class="btn btn-success">
{{$product->model->name}}
</a>
@else
{{$product->model->name}}
@endcan
</td>
<td class="align-middle">
@can('products_view')
@if(!empty($product->name))
<a href="{{route('products.show',['product' => $product])}}"
class="btn btn-success me-2">
{{$product->name}}
</a>
@else
<a href="{{route('products.show',['product' => $product])}}"
class="btn btn-outline-success me-2">
@lang('show')
</a>
@endif
@else
{{$product->name}}
@endcan
</td>
<td class="align-middle">
{{$product->description}}
</td>
<td class="align-middle text-center">
{{$product->total - (count($product->loans) + count($product->reservations))}}
</td>
<td class="align-middle text-center">
{{count($product->loans)}}
</td>
<td class="align-middle text-center">
{{count($product->reservations)}}
</td>
<td class="align-middle text-center">
{{$product->total}}
</td>
<td class="align-middle">
<div class="btn-group">
@can('products_edit')
<a href="{{route('products.edit',['product' => $product])}}"
class="btn btn-outline-success">
@lang('edit')
</a>
@endcan
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
+163
View File
@@ -0,0 +1,163 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<div class="row">
<div class="col-auto">
<h1>
@if(!empty($data->deleted_at))
@lang('DELETED')
@endif
@lang('product')
</h1>
</div>
@can('product_edit')
<div class="col">
<a href="{{route('products.edit',['product' => $data])}}" target="_blank"
class="btn btn-outline-success ms-4 mt-2">
@lang('edit')
</a>
</div>
@endcan
</div>
<div class="row">
<table>
<tr>
<td class="col-2 fw-bold">
@if(config('app.barcode_mode') == 'static')
@lang('static')
@elseif(config('app.barcode_mode') == 'dynamic')
@lang('dynamic')
@endif
@lang('barcode') :
</td>
<td class="col-auto">
@if(config('app.barcode_mode') == 'static')
@if(!empty($data->barcode))
{{$data->barcode}}
@endif
@elseif(config('app.barcode_mode') == 'dynamic')
{{$data->category->name}}.@if(!empty($data->subcategory)){{$data->subcategory->name}}.@endif{{$data->brand->name}}.{{$data->model->name}}@if(!empty($data->name)).{{$data->name}}@endif
@endif
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('category') :
</td>
<td class="col-auto">
<a href="{{route('categories.show',['category' => $data->category])}}" class="btn btn-success" target="_blank">{{$data->category->name}}</a>
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('subcategory') :
</td>
<td class="col-auto">
@if(!empty($data->subcategory))
<a href="{{route('subcategories.show',['subcategory' => $data->subcategory])}}" class="btn btn-success" target="_blank">{{$data->subcategory->name}}</a>
@else
@lang('none')
@endif
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('brand') :
</td>
<td class="col-auto">
<a href="{{route('brands.show',['brand' => $data->brand])}}" class="btn btn-success" target="_blank">{{$data->brand->name}}</a>
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('model') :
</td>
<td class="col-auto">
<a href="{{route('models.show',['model' => $data->model])}}" class="btn btn-success" target="_blank">{{$data->model->name}}</a>
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('name') :
</td>
<td class="col-auto">
@if(!empty($data->name))
{{$data->name}}
@endif
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('created_at') :
</td>
<td class="col-auto">
{{date('d-m-Y H:i:s',strtotime($data->created_at))}}
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('updated_at') :
</td>
<td class="col-auto">
{{date('d-m-Y H:i:s',strtotime($data->updated_at))}}
</td>
</tr>
@if(!empty($data->deleted_at))
<tr>
<td class="col-1 fw-bold">
@lang('deleted_at') :
</td>
<td class="col-auto">
{{date('d-m-Y H:i:s',strtotime($data->deleted_at))}}
</td>
</tr>
@endif
<!-- Pool -->
<tr>
<td>
<h2 class="mt-4">@lang('pool')</h2>
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('available') :
</td>
<td class="col-auto">
{{$data->total - (count($data->loans) + count($data->reservations))}}
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('lent') :
</td>
<td class="col-auto">
{{count($data->loans)}}
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('reserved') :
</td>
<td class="col-auto">
{{count($data->reservations)}}
</td>
</tr>
<tr>
<td class="col-1 fw-bold">
@lang('total') :
</td>
<td class="col-auto">
{{$data->total}}
</td>
</tr>
</table>
</div>
<div class="row mt-4">
<h1></h1>
</div>
</div>
@endsection
@section('scripting')
@endsection