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
+118
View File
@@ -0,0 +1,118 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4" id="tables">
@include('Partials.Pages.index_top')
<table class="table table-striped">
<thead>
<th>@lang('user')</th>
<th>@lang('item') @lang('type')</th>
<th>@lang('item')</th>
<th>@lang('note') @lang('type')</th>
<th>@lang('note')</th>
<th>@lang('created_at')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $note)
<tr>
<td>
@can('users_view')
<a href="{{route('users.show',['user' => $note->user->id])}}" target="_blank" class="btn btn-success">
{{$note->user->username}}
</a>
@else
{{$note->user->username}}
@endcan
</td>
<td>
@switch($note->loanable_type)
@case('App\Models\Product')
@can('products_viewAny')
<a href="{{route('products.index')}}" class="btn btn-success" target="_blank">
@lang('product')
</a>
@else
@lang('product')
@endcan
@break
@case('App\Models\Cabel')
@can('cabels_viewAny')
<a href="{{route('products.index')}}" class="btn btn-success" target="_blank">
@lang('cabel')
</a>
@else
@lang('cabel')
@endcan
@break
@endswitch
</td>
<td>
@switch($note->loanable_type)
@case('App\Models\Product')
@can('products_view')
<a href="{{route('products.show',['product' => $note->loanable->id])}}" target="_blank" class="btn btn-outline-success">
@if(config('app.barcode_mode') == 'dynamic')
{{$note->loanable->category->name}}.@if(!empty($note->loanable->subcategory)){{$note->loanable->subcategory->name}}.@endif{{$note->loanable->brand->name}}.{{$note->loanable->model->name}}@if(!empty($note->loanable->name)).{{$note->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$note->loanable->barcode}}
@endif
</a>
@else
@if(config('app.barcode_mode') == 'dynamic')
{{$note->loanable->category->name}}.@if(!empty($note->loanable->subcategory)){{$note->loanable->subcategory->name}}.@endif{{$note->loanable->brand->name}}.{{$note->loanable->model->name}}@if(!empty($note->loanable->name)).{{$note->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$note->loanable->barcode}}
@endif
@endcan
@break
@case('App\Models\Cabel')
@can('cabels_view')
<a href="{{route('cabels.show',['cabel' => $note->loanable->id])}}" target="_blank" class="btn btn-outline-success">
{{$note->loanable->category->name}}.{{$note->loanable->name}}
</a>
@else
{{$note->loanable->category->name}}.{{$note->loanable->name}}
@endcan
@break
@endswitch
</td>
<td>
@lang($note->type->name)
</td>
<td>
@lang($note->note)
</td>
<td>
{{date('d.m.Y',strtotime($note->created_at))}}
</td>
<td>
@can('notes_edit')
<a href="{{route('notes.edit',['note' => $note])}}" class="btn btn-outline-success">
@lang('edit')
</a>
@endcan
@can('notes_restore')
<a href="{{route('notes.restore',['note' => $note])}}" class="btn btn-outline-success">
@lang('restore')
</a>
@endcan
@can('notes_delete_force')
<a href="{{route('notes.forceDelete',['note' => $note])}}"
class="btn btn-outline-danger">
@lang('delete_force')
</a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
+48
View File
@@ -0,0 +1,48 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4" id="tables">
<form action="{{route('notes.update',['note' => $data->id])}}" method="post">
<div class="mb-3 row">
<label for="type_input" class="col-2 col-form-label fw-bold">@lang('type') : </label>
<div class="col-10 align-middle">
<select name="type" id="type_input" class="form-select" required>
@foreach($types as $type)
<option value="{{$type->id}}"
@if(old('type') !== null)
@if(old('type') == $type->id)
selected
@endif
@elseif(isset($data->note_type_id))
@if($data->note_type_id == $type->id)
selected
@endif
@endif
>
@lang($type->name)
</option>
@endforeach
</select>
</div>
</div>
<div class="mb-3 row">
<label for="note_input" class="col-2 col-form-label fw-bold">@lang('note') : </label>
<div class="col-10 align-middle">
@if(old('note') !== null)
<textarea name="note" id="note_input" class="form-control" required>{{old('note')}}</textarea>
@elseif(isset($data->note))
<textarea name="note" id="note_input" class="form-control" required>{{$data->note}}</textarea>
@endif
</div>
</div>
@include('Partials.Form.Input.Submit.submit_update')
</form>
@can('notes_delete')
@include('Partials.Form.Input.Modal.delete')
@endcan
</div>
@endsection
@section('scripting')
@endsection
+95
View File
@@ -0,0 +1,95 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4" id="tables">
@include('Partials.Pages.index_top')
<table class="table table-striped">
<thead>
<th>@lang('user')</th>
<th>@lang('item') @lang('type')</th>
<th>@lang('item')</th>
<th>@lang('note') @lang('type')</th>
<th>@lang('note')</th>
<th>@lang('created_at')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $note)
<tr>
<td>
@can('users_view')
<a href="{{route('users.show',['user' => $note->user->id])}}" target="_blank" class="btn btn-success">
{{$note->user->username}}
</a>
@else
{{$note->user->username}}
@endcan
</td>
<td>
@switch($note->loanable_type)
@case('App\Models\Product')
@can('products_viewAny')
<a href="{{route('products.index')}}" class="btn btn-success" target="_blank">
@lang('product')
</a>
@else
@lang('product')
@endcan
@break
@case('App\Models\Cabel')
@can('cabels_viewAny')
<a href="{{route('products.index')}}" class="btn btn-success" target="_blank">
@lang('cabel')
</a>
@else
@lang('cabel')
@endcan
@break
@endswitch
</td>
<td>
@switch($note->loanable_type)
@case('App\Models\Product')
@can('products_view')
<a href="{{route('products.show',['product' => $note->loanable_id])}}" class="btn btn-success" target="_blank">
@if(config('app.barcode_mode') == 'dynamic')
{{$note->loanable->category->name}}.@if(!empty($note->loanable->subcategory)){{$note->loanable->subcategory->name}}.@endif{{$note->loanable->brand->name}}.{{$note->loanable->model->name}}@if(!empty($note->loanable->name)).{{$note->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$note->loanable->barcode}}
@endif
</a>
@else
@endcan
@break
@case('App\Models\Cabel')
@lang('cabel')
@break
@endswitch
</td>
<td>
@lang($note->type->name)
</td>
<td>
@lang($note->note)
</td>
<td>
{{date('d.m.Y',strtotime($note->created_at))}}
</td>
<td>
@can('notes_edit')
<a href="{{route('notes.edit',['note' => $note->id])}}" class="btn btn-outline-success">
@lang('edit')
</a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection