@extends('page') @section('content')

Update {{$product->product_name}}'s Details

@if ($message = Session::get('success'))
{{ $message }}
@endif
{!! Form::model($product, ['method' => 'PATCH','route' => ['products.update', $product->id],'files'=> true,'id'=>'product_form']) !!}
{!! Form::text('product_name', null, array('placeholder' => 'Product Name','class' => 'form-control form-control-sm','id' => 'product_name' )) !!} @error('product_name') {{ $message }} @enderror
{!! Form::text('model_number', null, array('placeholder' => 'Model Number','class' => 'form-control form-control-sm', 'style' => 'text-transform: uppercase')) !!} @error('model_number') {{ $message }} @enderror
{!! Form::text('description', null, array('placeholder' => 'Product Description','class' => 'form-control form-control-sm', 'rows' => 1)) !!} @error('description') {{ $message }} @enderror
@error('image')
{{ $message }}
@enderror
{!! Form::text('product_code', null, array('placeholder' => 'Product Code','class' => 'form-control form-control-sm', 'disabled'=>'disabled' )) !!} @error('product_code') {{ $message }} @enderror

{!! Form::text('url', null, array('placeholder' => 'Product URL','class' => 'form-control form-control-sm')) !!} @error('url') {{ $message }} @enderror

{!! Form::text('purchase_link', null, array('placeholder' => 'Purchase Link','class' => 'form-control form-control-sm')) !!} @error('purchase_link') {{ $message }} @enderror
{!! Form::text('quantity', null, array('placeholder' => 'Quantity','class' => 'form-control form-control-sm')) !!} @error('quantity') {{ $message }} @enderror
{!! Form::text('quantity_measured', null, array('placeholder' => 'Measured','class' => 'form-control form-control-sm')) !!} @error('quantity_measured') {{ $message }} @enderror
{!! Form::text('expiry_period', null, array('placeholder' => 'Expiry Period','class' => 'form-control form-control-sm')) !!}
Months
@error('expiry_period') {{ $message }} @enderror
{!! Form::text('number_in_pack', null, array('placeholder' => 'Items per Packet','class' => 'form-control form-control-sm')) !!} @error('number_in_pack') {{ $message }} @enderror
{!! Form::text('packing_method', null, array('placeholder' => 'Packing Method','class' => 'form-control form-control-sm')) !!} @error('packing_method') {{ $message }} @enderror

{!! Form::radio('status', '1','checked'); !!} {!! Form::radio('status', '0'); !!} @error('status') {{ $message }} @enderror
Categories
@error('category') {{ $message }} @enderror
@error('subcategory') {{ $message }} @enderror
Brand Details
{!! Form::text('brand_name', null, array('placeholder' => 'Brand Name','class' => 'form-control form-control-sm')) !!} @error('brand_name') {{ $message }} @enderror
@error('logo') @enderror
Label Generation
{!! Form::file('product_label', array('placeholder' => 'Product Label 1','class' => 'custom-file-input', 'id' => 'product_label')) !!}
@error('product_label') {{ $message }} @enderror
overlay image product label
{!! Form::file('product_label2', array('placeholder' => 'Product Label 2','class' => 'custom-file-input', 'id' => 'product_label2')) !!}
@error('product_label2') {{ $message }} @enderror
overlay image 2 product label 2
Authentication Details
{!! Form::text('auth_prod_name', null, array('placeholder' => 'Product Name','class' => 'form-control form-control-sm', 'id' => 'auth_prod_name')) !!} @error('auth_prod_name') {{ $message }} @enderror
{!! Form::text('auth_done_by', null, array('placeholder' => 'Authenticated By','class' => 'form-control form-control-sm', 'id' => 'auth_done_by')) !!} @error('auth_done_by') {{ $message }} @enderror
{!! Form::model($warranty_details, ['method' => 'PATCH','route' => ['products.update', $product->id],'files'=> true]) !!} {!! Form::close() !!}
Warranty Details
@error('promotion_status') {{ $message }} @enderror
@error('waranty_status') {{ $message }} @enderror
warranty_type=="1")? "checked" : "" }}> warranty_type=="2")? "checked" : "" }}> @error('warranty_type') {{ $message }} @enderror
@error('full_product') {{ $message }} @enderror
@error('s_warranty_count') {{ $message }} @enderror
@error('r_warranty_count') {{ $message }} @enderror
@php $x = 1; @endphp @if($product->partWarranty) @foreach($product->partWarranty as $parts)
@php $x++; @endphp @endforeach @endif
{!! Form::text('part_name[]', null, array('placeholder' => 'Part Name','class' => 'form-control form-control-sm part-name', 'id' => 'tags_create')) !!} @error('part_name.*') {{ 'Part Name is Required' }} @enderror
{!! Form::number('part_warranty[]', 1, array('placeholder' => 'Warranty Period','class' => 'form-control form-control-sm s-warranty-period', 'id' => 'part_warranty', 'min'=>"1")) !!}
@error('part_warranty') {{ $message }} @enderror @error('part_warranty.*') {{ 'Warranty is Required' }} @enderror
@include('template.authentication')
{!! Form::close() !!}
@endsection