edit.blade.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="px-3">
  4. <div class="col-xxl-6 offset-xxl-2">
  5. <form action="{{ ($product) ? route('catalog.update', $product) : route('catalog.store') }}" method="post">
  6. @csrf
  7. @include('partials.input', ['name' => 'article', 'title' => 'Артикул', 'required' => true, 'value' => $product->article ?? ''])
  8. @include('partials.input', ['name' => 'nomenclature_number', 'title' => 'Номер номенклатуры', 'required' => true, 'value' => $product->nomenclature_number ?? ''])
  9. @include('partials.input', ['name' => 'name_tz', 'title' => 'Наименование по ТЗ', 'required' => true, 'value' => $product->name_tz ?? ''])
  10. @include('partials.input', ['name' => 'type_tz', 'title' => 'Тип по ТЗ', 'required' => true, 'value' => $product->type_tz ?? ''])
  11. @include('partials.input', ['name' => 'type', 'title' => 'Тип', 'required' => true, 'value' => $product->type ?? ''])
  12. @include('partials.input', ['name' => 'manufacturer_name', 'title' => 'Наименование производителя', 'required' => true, 'value' => $product->manufacturer_name ?? ''])
  13. @include('partials.input', ['name' => 'sizes', 'title' => 'Размеры', 'required' => true, 'value' => $product->sizes ?? ''])
  14. @include('partials.input', ['name' => 'product_price', 'type' => 'number', 'title' => 'Цена товара', 'required' => true, 'value' => $product->product_price ?? ''])
  15. @include('partials.input', ['name' => 'installation_price', 'type' => 'number', 'title' => 'Цена установки', 'required' => true, 'value' => $product->installation_price ?? ''])
  16. @include('partials.input', ['name' => 'total_price', 'type' => 'number', 'title' => 'Итоговая цена', 'required' => true, 'value' => $product->total_price ?? ''])
  17. @include('partials.textarea', ['name' => 'note', 'size' => 10, 'title' => 'Примечания', 'required' => true, 'value' => $product->note ?? ''])
  18. @include('partials.submit', ['deleteDisabled' => (!isset($product)), 'delete' => ['form_id' => 'deleteProduct']])
  19. </form>
  20. @if($product)
  21. <div class="visually-hidden">
  22. <form action="{{ route('catalog.delete', $product) }}" method="POST" id="deleteProduct">
  23. @csrf
  24. @method('DELETE')
  25. </form>
  26. </div>
  27. @endif
  28. </div>
  29. </div>
  30. @if($errors->any())
  31. @dump($errors)
  32. @endif
  33. @endsection