@extends('layouts.masterDashboard')
@section('content')
<style type="text/css">
#load{
position:absolute;
z-index:1;
border:3px double #999;
background:#439bd9;
width:300px;
height:200px;
margin-top:-150px;
margin-left:-150px;
top:50%;
left:50%;
text-align:center;
line-height:270px;
font-size:18pt;
}
</style>
<div class="row">
<div class="col-md-12">
  <div id="load" style="display: none;">Processing... Please wait</div>
</div>
</div>
<?php
    $roleName = isset($result['foodscraftRole']) && !empty($result['foodscraftRole']) ? strtolower($result['foodscraftRole']) : (isset($roleType) && !empty($roleType) ? strtolower($roleType) : '');
    // dd($result, $roleName);
?>
<div class="row">
    <div class="col-md-12">
        <div class="main-card mb-3 card">
            <div class="card-header p-2">
                <h3 class="w-100 text-center">REGISTER</h3>
            </div>
            <div class="card-body">
                <form method="POST" class="fkformlabel" action="{{ url('create') }}" onsubmit="return ray.ajax()" enctype='multipart/form-data'>
                    @csrf
                    <input id="foodscraftRole" type="hidden" name="foodscraftRole" value="Vendor" readonly />
                    <div class="row">
                        <div class="col-md-4 col-sm-12 pr-md-1">
                            <div class="form-group">
                                <label for="name">Name of the Company</label>
                                <span class="required-field">*</span>
                                <input type="text" id="name" class="form-control" autocomplete="off" name="name" value="{{ old('name') }}" required />
                            </div>
                        </div>
                        <div class="col-md-4 col-sm-12 px-md-1">
                            <div class="form-group">
                                <label for="username">Vendor Code</label>
                                <span class="required-field">*</span>
                                <input type="text" id="username" class="form-control" autocomplete="off" name="username" value="{{ old('username') }}" required />
                            </div>
                        </div>
                        <div class="col-md-4 col-sm-12 pl-md-1">
                            <div class="form-group">
                                <label for="email">Email address</label>
                                <span class="required-field">*</span>
                                <input type="email" id="email" class="form-control" name="email" required autocomplete="off" value="{{ old('email') }}" required />
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-4 col-sm-12 pr-md-1">
                            <div class="form-group">
                                <label for="contactName">Contact person name</label>
                                <span class="required-field">*</span>
                                <input id="contactName" type="text" class="form-control" name="contactName" autocomplete="off" value="{{ old('contactName') }}" required />
                            </div>
                        </div>
                        <div class="col-md-4 col-sm-12 px-md-1">
                            <div class="form-group">
                                <label for="contactNumber">Contact Person Number</label>
                                <span class="required-field">*</span>
                                <input id="contactNumber" type="tel" pattern="^[0-9]{10}$" data-toggle="tooltip" title="10 Digit Mobile Number Only" class="form-control" name="contactNumber" autocomplete="off" value="{{ old('contactNumber') }}" required />
                            </div>
                        </div>
                        <div class="col-md-4 col-sm-12 pl-md-1">
                            <div class="form-group">
                                <label for="address">Address</label>
                                <span class="required-field">*</span>
                                <input id="address" type="text" class="form-control" name="address" autocomplete="off" value="{{ old('address') }}" required />
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-4 col-sm-12 pr-md-1">
                            <div class="form-group">
                                <label for="companyRole">Designation</label>
                                <span class="required-field">*</span>
                                <input id="companyRole" type="text" class="form-control" name="companyRole" value="{{ old('companyRole') }}" required />
                            </div>
                        </div>
                        <div class="col-md-4 col-sm-12 px-md-1">
                            <div class="form-group">
                                <label for="employeeNumber">No. of employees</label>
                                <span class="required-field">*</span>
                                <input id="employeeNumber" type="text" class="form-control" name="employeeNumber" value="{{ old('employeeNumber') }}" required />
                            </div>
                        </div>
                        <div class="col-md-4 col-sm-12 pl-md-1">
                            <div class="form-group">
                                <label for="yearExp">Years of experience</label>
                                <span class="required-field">*</span>
                                <input id="yearExp" type="text" class="form-control" pattern="^[1-9]{1|2}$" data-toggle="tooltip" title="" name="yearExp" value="{{ old('yearExp') }}" required />
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-4 col-sm-12 pr-md-1">
                            <div class="form-group">
                                <label for="companyType">Company type</label>
                                <span class="required-field">*</span>
                                <select class="form-control" name="companyType" id="companyType" required>
                                    <!--<option value="">Select Type</option>-->
                                    <?php
                                    if(!empty(old('companyType'))){ ?>
                                      <option value="{{ old('companyType') }}" checked>{{ old('companyType') }}</option>
                                    <?php } else { ?>
                                      <option value="" checked>Select Company type</option>
                                    <?php } ?>
                                    
                                    <option value="proprietor">Proprietor</option>
                                    <option value="partnership">partnership</option>
                                    <option value="LLP">LLP</option>
                                    <option value="Pvt">PVT LTD.</option>
                                </select>
                            </div>
                        </div>
<!--                        <div class="col-md-4 col-sm-12 px-md-1">
                            <div class="form-group">
                                <label for="vendorScope">Scope of vendor</label>
                                <span class="required-field">*</span>
                                <select class="form-control" name="vendorScope" id="vendorScope" required>
                                    <option value="">Select Scope</option>
                                    <?php
                                    if(!empty(old('vendorScope'))){ ?>
                                      <option value="{{ old('vendorScope') }}" checked>{{ old('vendorScope') }}</option>
                                    <?php } else { ?>
                                      <option value="" checked>Select Scope</option>
                                    <?php } ?>
                                    
                                    <option value="mainMeal">main meal</option>
                                    <option value="tuckShop">tuck shop</option>
                                    <option value="liveMeals">live meals</option>
                                    <option value="mrp">mrp</option>
                                    <option value="beverages">beverages</option>
                                    <option value="healthyMealsSnacks">healthy meals/snacks</option>
                                    <option value="customizedMeals">customized meals</option>
                                    <option value="specializedServices">specialized services</option>
                                    <option value="ODC">ODC</option>
                                    <option value="CorporateEvents">Corporate events</option>
                                </select>
                            </div>
                        </div>-->
                        <div class="col-md-4 col-sm-12 pl-md-1">
                            <div class="form-group">
                                <label for="auditRating">Kitchen audit rating</label>
                                <span class="required-field">*</span>
                                <select class="form-control" name="auditRating" id="auditRating" required>
                                    <!--<option value="" checked>Select Rating</option>-->
                                    <?php
                                    if(!empty(old('auditRating'))){ ?>
                                      <option value="{{ old('auditRating') }}" checked>{{ old('auditRating') }}</option>
                                    <?php } else { ?>
                                      <option value="" checked>Select Rating</option>
                                    <?php } ?>
                                    
                                    <option value="Less than 5">Less than 5</option>
                                    <option value="5-7">5-7</option>
                                    <option value="7-9">7-9</option>
                                    <option value="More than 9">More than 9</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-3 col-sm-12 pr-md-1">
                            <div class="form-group">
                                <label for="kitchenArea">Kitchen area</label>
                                <span class="required-field">*</span>
                                <input id="kitchenArea" type="text" class="form-control" pattern="^[0-9]{1|2|3|4}$" data-toggle="tooltip" title="Digits Only" placeholder="In Sq.ft." name="kitchenArea" value="{{ old('kitchenArea') }}" required />
                            </div>
                        </div>
                        <div class="col-md-3 col-sm-12 px-md-1">
                            <div class="form-group">
                                <label for="mealCapacity">Meal capacity</label>
                                <span class="required-field">*</span>
                                <input id="mealCapacity" type="text" class="form-control" pattern="[0-9]+" data-toggle="tooltip" title="Digits Only" placeholder="In numbers per day." name="mealCapacity" value="{{ old('mealCapacity') }}" required />
                            </div>
                        </div>
                        <div class="col-md-3 col-sm-12 px-md-1">
                            <div class="form-group">
                                <label for="cameraNumber">No. of camera’s</label>
                                <span class="required-field">*</span>
                                <input id="cameraNumber" type="text" class="form-control" name="cameraNumber" value="{{ old('cameraNumber') }}" required />
                            </div>
                        </div>
                        <div class="col-md-3 col-sm-12 pl-md-1">
                            <div class="form-group">
                                <label for="cameraMegaPixel">Camera Mega Pixel</label>
                                <span class="required-field">*</span>
                                <input id="cameraMegaPixel" type="text" class="form-control" name="cameraMegaPixel" value="{{ old('cameraMegaPixel') }}" required />
                            </div>
                        </div>
                    </div>
                    
                    <div class="row">
                    <div class="col-sm-12 col-md-12">
                            <div class="form-group">
                                <h6 class="text-center d-flex justify-content-center">
                                    <span class="border-bottom-span border-bottom">Scope of vendor</span>
                                    <span class="required-field">*</span>
                                </h6>
                                <input class="inp-cbx" id="mainMeal" type="checkbox" name="vendorScope[]" value="mainMeal" {{ (is_array(old('vendorScope')) and in_array('mainMeal', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="mainMeal">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Main Meal</span>
                                </label>
                                <input class="inp-cbx" id="tuckShop" type="checkbox" name="vendorScope[]" value="tuckShop" {{ (is_array(old('vendorScope')) and in_array('tuckShop', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="tuckShop">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Tuck Shop</span>
                                </label>
                                <input class="inp-cbx" id="livemeals" type="checkbox" name="vendorScope[]" value="livemeals" {{ (is_array(old('vendorScope')) and in_array('livemeals', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="livemeals">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Live Meals</span>
                                </label>
                                <input class="inp-cbx" id="mrp" type="checkbox" name="vendorScope[]" value="mrp" {{ (is_array(old('vendorScope')) and in_array('mrp', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="mrp">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>MRP</span>
                                </label>
                                <input class="inp-cbx" id="beverages" type="checkbox" name="vendorScope[]" value="mrp" {{ (is_array(old('vendorScope')) and in_array('beverages', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="beverages">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Beverages</span>
                                </label>
                                <input class="inp-cbx" id="healthyMealsSnacks" type="checkbox" name="vendorScope[]" value="healthyMealsSnacks" {{ (is_array(old('vendorScope')) and in_array('healthyMealsSnacks', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="healthyMealsSnacks">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Healthy Meals/Snacks</span>
                                </label>
                                <input class="inp-cbx" id="customizedMeals" type="checkbox" name="vendorScope[]" value="customizedMeals" {{ (is_array(old('vendorScope')) and in_array('customizedMeals', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="customizedMeals">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Customized Meals</span>
                                </label>
                                <input class="inp-cbx" id="specializedServices" type="checkbox" name="vendorScope[]" value="specializedServices" {{ (is_array(old('vendorScope')) and in_array('specializedServices', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="specializedServices">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Specialized Services</span>
                                </label>
                                <input class="inp-cbx" id="odc" type="checkbox" name="vendorScope[]" value="odc" {{ (is_array(old('vendorScope')) and in_array('odc', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="odc">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>ODC</span>
                                </label>
                                <input class="inp-cbx" id="corporateEvents" type="checkbox" name="vendorScope[]" value="corporateEvents" {{ (is_array(old('vendorScope')) and in_array('corporateEvents', old('vendorScope'))) ? ' checked' : '' }}/>
                                <label class="cbx" for="corporateEvents">
                                    <span>
                                        <svg width="12px" height="11px" viewBox="0 0 12 11">
                                            <polyline points="1 6.29411765 4.5 10 11 1"></polyline>
                                        </svg>
                                    </span>
                                    <span>Corporate Events</span>
                                </label>
                            </div>                            
                        </div>
                    </div>

<!--                    <div class="row">
                        <div class="col-md-5 col-sm-12">
                            <div class="form-group">
                                <label for="password">Password</label>
                                <span class="required-field">*</span>
                                <input id="password" type="password" class="form-control" name="password" required autocomplete="new-password">
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-5 col-sm-12">
                            <div class="form-group">
                                <label for="password-confirm">Confirm Password</label>
                                <span class="required-field">*</span>
                                <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
                            </div>
                        </div>
                    </div>-->

                    <div class="row">
                        <div class="update ml-auto mr-auto">
                            <button type="submit" class="turquoise">{{ __('Register') }}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@section('customscript')
<script type="text/javascript">
var ray={
ajax:function(st)
	{
		this.show('load');
        $('html,body').scrollTop(0);
	},
show:function(el)
	{
		this.getID(el).style.display='';
	},
getID:function(el)
	{
		return document.getElementById(el);
	}
}
</script>
@endsection
  
@endsection