gruene-seele/resources/views/admin/ingredient/index.blade.php
Kevin Adametz d05df498d3 Warenwirtschaft: AP-21 INCI-Erweiterungen
- Lagerort-Stammdaten Raum/Regal/Fach (storage_rooms/shelves/slots) mit CRUD
  auf Einstellungen -> Allgemein (SettingCrudController-Kinder, ein gemeinsamer
  StoreStorageSegmentRequest, generische Partials setting-list-card/-segment-form)
- Ingredient: alt_name (Handelsname), Lagerort-FKs + storageLabel(),
  scopeUsedInActiveRecipes()
- INCI-Formular: Lieferanten-Repeater mit Shop-URL je Lieferant (leer = Mail),
  Alternativname, drei Lagerort-Dropdowns
- INCI-Liste: Filter "nur aktive (in Rezeptur aktiver Produkte)" + Spalte
  Alternativer Name
- Rohstoffbestand-Detail: Bestellweg pro INCI-Lieferant (Pivot-URL statt
  order_method-Fallback), Kopf zeigt Alternativname + Lagerort
- Hinweise-Doku fortgeschrieben inkl. Chargen-Format-Entscheid ttmmjj (AP-24)

Tests: StorageSettingsTest, IngredientActiveRecipeFilterTest,
IngredientOrderFieldsTest (Repeater-Format), RawMaterialStockTest erweitert
(volle Suite 170 gruen, 613 Assertions)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 11:36:28 +00:00

82 lines
3.5 KiB
PHP
Executable file

@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
{{__('Inhaltsstoffe')}}
<form method="get" action="{{ route('admin_product_ingredients') }}" class="mb-0">
<label class="custom-control custom-checkbox mb-0">
<input type="checkbox" name="only_active" value="1" class="custom-control-input"
onchange="this.form.submit()" @checked($onlyActive)>
<span class="custom-control-label">{{ __('nur aktive (in Rezeptur aktiver Produkte)') }}</span>
</label>
</form>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('Alternativer Name')}}</th>
<th>{{__('INCI')}}</th>
<th>{{__('Wirkung') }}</th>
<th>{{__('Status')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{route('admin_product_ingredient_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->alt_name }}</td>
<td>{{ $value->inci }}</td>
<td>{{ $value->effect }}</td>
<td data-sort="{{ $value->active }}">@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><a class="text-danger" href="{{ route('admin_product_ingredient_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<a href="{{route('admin_product_ingredient_edit', ['new'])}}" class="btn btn-sm btn-primary">
{{__('Neuen Inhaltsstoff erstellen')}}
</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 100,
"order": [[ 1, "asc" ]],
"aoColumns": [
{ "sWidth": "6%" },
{ "sWidth": "6%" },
{ "sWidth": "16%" },
{ "sWidth": "14%" },
{ "sWidth": "17%" },
{ "sWidth": "25%" },
{ "sWidth": "8%" },
{ "sWidth": "8%" },
],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection