@extends('customer-service.layout.master')
@section('ptitle','Customer Service')
@section('page_title', 'Dashboard')
@section('subpage', 'Graph & Summary Report')
@section('img_profile', asset($user->StaffDetail->user_pic))
@section('login_name', $user->StaffDetail->name )
@section('last_login', $user->last_login_at )

@section('content')
<div class="wrapper">	
	<div class="fluid">
		<div class="widget grid2 widgetH"></div>
		<div class="widget grid8 widgetH">
			<!-- for validation errors -->
			@if(count($errors) > 0)
			<div class="nNote nFailure">
				@foreach($errors->all() as $error)
				<p>{{$error}}</p>
				@endforeach
			</div>
			@endif
			@if(session()->has('success_msg'))
			<div class="nNote nSuccess">
				<p>{!! session()->get('success_msg') !!}</p>
			</div>
			@elseif(Session::get('error_msg'))
			<div class="nNote nFailure">
				<p>{!! session()->get('error_msg') !!}</p>
			</div>
			@endif
		</div>
		<div class="widget grid2 widgetH"></div>
	</div>
	<div class="fluid">
		<form action="{{ url('/customer-service/team/add-vendor')}}" class="main cussPayment" method="POST" enctype="multipart/form-data">
			<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
			<fieldset>
				<div class="widget grid2 widgetH"></div>
				<div class="widget grid8">
					<div class="whead"><h6>Add New Vendor</h6></div>

					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Company Name : </b></label></div>
						<div class="grid6"><input type="text" name="cname" id="cname" value="{{ old('cname') }}" required /></div>
						<div class="grid2">&nbsp;</div>
					</div>

					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Address : </b></label></div>
						<div class="grid6"><textarea rows="3" cols="" name="address" id="address" class="auto" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 70px;" required>{{ old('address') }}</textarea></div>
						<div class="grid2">&nbsp;</div>
					</div>

					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid4">
							<label><b>Postcode : </b></label>
							<input type="text" name="postcode" id="postcode" value="{{ old('postcode') }}" required />
						</div>
						<div class="grid4">
							<label><b>City : </b></label>
							<input type="text" name="city" id="city" value="{{ old('city') }}" required />
						</div>
						<div class="grid2">&nbsp;</div>
					</div>

					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>State : </b></label></div>
						<div class="grid6"><input type="text" name="state" id="state" value="{{ old('state') }}" required /></div>
						<div class="grid2">&nbsp;</div>
					</div>

					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Choose Company Color : </b></label></div>
						<div class="grid6">
							<select class="styled" id="color" name="color" required>
								<option value='' style="background:#fff">none</option>;
								@foreach($colors as $c) {
									<option value='{{ $c }}' style='background:{{ $c }}'>{{ $c }}</option>
								@endforeach		
							</select>
						</div>
						<div class="grid2">&nbsp;</div>
					</div>
					<div class="formRow noBorderB" id="sendForm"><input type="submit" value="Add New Vendor" class="buttonM bPurple formSubmit" name="submit" id="submit"></div>
				</div>
				<div class="widget grid2 widgetH"></div>
			</fieldset>
		</form>
	</div>
</div>
@endsection