April 2026 waren Wirtschaft Feedback
This commit is contained in:
parent
02f2a4c23e
commit
9ce711d6b2
167 changed files with 25278 additions and 8518 deletions
108
resources/views/admin/inventory/packaging-items/form.blade.php
Normal file
108
resources/views/admin/inventory/packaging-items/form.blade.php
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
@php
|
||||
$isShipping = ($category ?? 'packaging') === 'shipping';
|
||||
$pageLabel = $isShipping ? __('Versandverpackung') : __('Produktverpackung');
|
||||
@endphp
|
||||
|
||||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<h6 class="card-header">{{ $model->exists ? $pageLabel . ' ' . __('bearbeiten') : $pageLabel . ' ' . __('anlegen') }}</h6>
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ $model->exists ? route('admin.inventory.packaging-items.update', $model) : route('admin.inventory.packaging-items.store') }}">
|
||||
@csrf
|
||||
@if($model->exists)
|
||||
@method('PUT')
|
||||
@endif
|
||||
|
||||
<input type="hidden" name="category" value="{{ old('category', $model->category) }}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">{{ __('Name') }}</label>
|
||||
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror"
|
||||
value="{{ old('name', $model->name) }}" required>
|
||||
@error('name')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="packaging_material_id">{{ __('Verpackungsmaterial') }}</label>
|
||||
<div class="light-style">
|
||||
<select name="packaging_material_id" id="packaging_material_id" class="w-100 @error('packaging_material_id') is-invalid @enderror" required>
|
||||
<option value="">{{ __('Bitte wählen') }}</option>
|
||||
@foreach($packagingMaterials as $pm)
|
||||
<option value="{{ $pm->id }}" @selected((string)old('packaging_material_id', $model->packaging_material_id) === (string)$pm->id)>{{ $pm->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@error('packaging_material_id')
|
||||
<div class="invalid-feedback d-block">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="weight_grams">{{ __('Gewicht (g)') }}</label>
|
||||
<input type="text" name="weight_grams" id="weight_grams" class="form-control @error('weight_grams') is-invalid @enderror"
|
||||
value="{{ old('weight_grams', $model->weight_grams) }}">
|
||||
@error('weight_grams')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="min_stock_alert">{{ __('Mindestbestand Warnung') }}</label>
|
||||
<input type="number" name="min_stock_alert" id="min_stock_alert" class="form-control @error('min_stock_alert') is-invalid @enderror"
|
||||
value="{{ old('min_stock_alert', $model->min_stock_alert) }}" min="0">
|
||||
@error('min_stock_alert')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="supplier_id">{{ __('Lieferant') }}</label>
|
||||
<div class="light-style">
|
||||
<select name="supplier_id" id="supplier_id" class="w-100 @error('supplier_id') is-invalid @enderror">
|
||||
<option value="">{{ __('—') }}</option>
|
||||
@foreach($suppliers as $sup)
|
||||
<option value="{{ $sup->id }}" @selected((string)old('supplier_id', $model->supplier_id) === (string)$sup->id)>{{ $sup->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@error('supplier_id')
|
||||
<div class="invalid-feedback d-block">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="url">{{ __('URL (Onlineshop)') }}</label>
|
||||
<input type="url" name="url" id="url" class="form-control @error('url') is-invalid @enderror"
|
||||
value="{{ old('url', $model->url) }}" placeholder="https://">
|
||||
@error('url')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox">
|
||||
<input type="checkbox" name="active" value="1" class="custom-control-input"
|
||||
@checked(old('active', $model->active))>
|
||||
<span class="custom-control-label">{{ __('Aktiv') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">{{ __('Speichern') }}</button>
|
||||
<a href="{{ route('admin.inventory.packaging-items.index', ['category' => $category ?? 'packaging']) }}" class="btn btn-outline-secondary">{{ __('Zurück') }}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#supplier_id, #packaging_material_id').select2({theme: 'default', width: '100%'});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<h6 class="card-header d-flex justify-content-between align-items-center">
|
||||
<span>{{ $pageTitle }}</span>
|
||||
<a href="{{ route('admin.inventory.packaging-items.create', ['category' => $category]) }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
|
||||
</h6>
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('Material') }}</th>
|
||||
<th>{{ __('Gewicht (g)') }}</th>
|
||||
<th>{{ __('Lieferant') }}</th>
|
||||
<th>{{ __('URL') }}</th>
|
||||
<th>{{ __('Status') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.inventory.packaging-items.edit', $value) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>{{ $value->packagingMaterial?->name ?? '—' }}</td>
|
||||
<td>{{ $value->weight_grams }}</td>
|
||||
<td>{{ $value->supplier?->name ?? '—' }}</td>
|
||||
<td>
|
||||
@if($value->url)
|
||||
<a href="{{ $value->url }}" target="_blank" title="{{ $value->url }}"><i class="fa fa-external-link-alt"></i></a>
|
||||
@else
|
||||
—
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $value->active ? 1 : 0 }}">
|
||||
@if($value->active)
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<form action="{{ route('admin.inventory.packaging-items.destroy', $value) }}" method="post" class="d-inline"
|
||||
onsubmit="return confirm('{{ __('Really delete entry?') }}');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-link text-danger p-0"><i class="far fa-trash-alt"></i></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.datatables-style').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
"order": [[1, "asc"]],
|
||||
"language": {"url": "/js/German.json"}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue