|
|
@@ -0,0 +1,38 @@
|
|
|
+@extends('layouts.app')
|
|
|
+
|
|
|
+@section('content')
|
|
|
+ <div class="px-3">
|
|
|
+ <div class="col-xxl-6 offset-xxl-2">
|
|
|
+ <form action="{{ ($product) ? route('catalog.update', $product) : route('catalog.store') }}" method="post">
|
|
|
+
|
|
|
+ @csrf
|
|
|
+
|
|
|
+ @include('partials.input', ['name' => 'article', 'title' => 'Артикул', 'required' => true, 'value' => $product->article ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'nomenclature_number', 'title' => 'Номер номенклатуры', 'required' => true, 'value' => $product->nomenclature_number ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'name_tz', 'title' => 'Наименование по ТЗ', 'required' => true, 'value' => $product->name_tz ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'type_tz', 'title' => 'Тип по ТЗ', 'required' => true, 'value' => $product->type_tz ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'type', 'title' => 'Тип', 'required' => true, 'value' => $product->type ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'manufacturer_name', 'title' => 'Наименование производителя', 'required' => true, 'value' => $product->manufacturer_name ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'sizes', 'title' => 'Размеры', 'required' => true, 'value' => $product->sizes ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'product_price', 'type' => 'number', 'title' => 'Цена товара', 'required' => true, 'value' => $product->product_price ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'installation_price', 'type' => 'number', 'title' => 'Цена установки', 'required' => true, 'value' => $product->installation_price ?? ''])
|
|
|
+ @include('partials.input', ['name' => 'total_price', 'type' => 'number', 'title' => 'Итоговая цена', 'required' => true, 'value' => $product->total_price ?? ''])
|
|
|
+ @include('partials.textarea', ['name' => 'note', 'size' => 10, 'title' => 'Примечания', 'required' => true, 'value' => $product->note ?? ''])
|
|
|
+
|
|
|
+
|
|
|
+ @include('partials.submit', ['deleteDisabled' => (!isset($product)), 'delete' => ['form_id' => 'deleteProduct']])
|
|
|
+ </form>
|
|
|
+ @if($product)
|
|
|
+ <div class="visually-hidden">
|
|
|
+ <form action="{{ route('catalog.delete', $product) }}" method="POST" id="deleteProduct">
|
|
|
+ @csrf
|
|
|
+ @method('DELETE')
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ @if($errors->any())
|
|
|
+ @dump($errors)
|
|
|
+ @endif
|
|
|
+@endsection
|