@extends('layouts.members')

@section('content')
    <div class="container" style="">
        <div class="card card-primary">
            <div class="panel panel-black">
                <div class="panel-heading">
                    <a href="{{route('member_unit_inventory', auth()->user()->role_id)}}"><span class="btn btn-raised btn-primary pull-right">All Inventories</span></a>
                    <hr/>
                    <h3>Create New Inventory</h3>
                </div>

                <div class="panel-body">
                    @include('includes.flash')
                    <form class="form-horizontal" method="post" enctype="multipart/form-data"
                          action="{{ route('member_save_inventory') }}">
                        {!! csrf_field() !!}

                        <input type="hidden" name="category_id" value="{{auth()->user()->role_id}}">


                        <div class="form-group required">
                            <label class="col-sm-2 control-label" for="weight">Product</label>
                            <div class="col-md-6 col-lg-6">
                                <select name="product_id" id="product_id" class="form-control">
                                    <option value="">Select Product</option>
                                    @foreach($products as $product)
                                        <option value="{{$product->id}}">{{$product->name}} - {{$product->description}}</option>
                                    @endforeach
                                </select>
                            </div>

                        </div>


                        <div class="form-group required">
                            <label class="col-sm-2 control-label" for="weight">Quanity</label>
                            <div class="col-sm-6 col-md-6 col-lg-6">
                                <input type="number" name="quantity" value="{{old('quantity')? old('quantity'):0}}"
                                       placeholder="Enter Quantity" id="quantity"
                                       class="form-control"/>
                            </div>
                        </div>


                        <div class="form-group">
                            <div class="col-md-2"></div>
                            <div class="col-md-10 ">
                                <button type="submit" class="btn btn-success clear-fix">Submit</button>
                            </div>

                        </div>

                    </form>

                </div>

                <div class="panel-footer">
                </div>
            </div>
        </div>

    </div>
@endsection