@extends('contractor.layout.master')
@section('ptitle','Contractor')
@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 )

<?php
Use App\Model\CompanyLaravel;
?>

@section('content')
	<style type="text/css">
		.i_note {color: red;}
	</style>

	<div class="fluid">
		<div class="widget grid2 widgetH"></div>
		<div class="grid8">
		@if(count($errors) > 0)
		<div class="nNote nFailure">
			@foreach($errors->all() as $error)
			<p>{{$error}}</p>
			@endforeach
		</div>
		@endif

		@if(Session::get('error_msg'))
		<div class="nNote nFailure">
			<p>Email or Password is invalid</p>
		</div>
		@elseif(Session::get('success_msg'))
		<div class="nNote nSuccess">
			<p>Add new contractor successful</p>
		</div>
		@endif
		</div>
		<div class="widget grid2 widgetH"></div>
	</div>

	<div class="fluid">
		<form action="{{ url('/contractor/team/request-add-team') }}" class="main cussPayment" method="post" enctype="multipart/form-data">
			<fieldset>
				<div class="widget grid2 widgetH"></div>
				<div class="widget grid8">
					<div class="whead"><h6>Add New Installer Detail</h6></div>
					
					<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">

					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Full Name : </b></label></div>
                        <div class="grid6"><input type="text" name="aname" id="aname" value="" required /></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>NRIC : </b></label></div>
                        <div class="grid6"><input type="text" name="ic" id="ic"  value="" required /></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid4">
							<label><b>Email : </b></label> 
							<input type="email" name="email" id="email" value="" required />
						</div>
                        <div class="grid4">
							<label><b>Phone No. : </b></label>
							<input type="text" name="phone" id="phone" required  value=""/>
							<small style="color: red"></small>
						</div>
						<div class="grid2">&nbsp;</div>
                    </div>	
                    
                    <!-- The vendor should have the same value as the user that's currently login -->
                    <input type="hidden" value="5aeaf61dee0dc21c6757e047" name="vendor">
					
					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Password : </b></label></div>
                        <div class="grid6"><input type="password" name="password" id="password1" required /><small style="color: red"></small></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Re-Password : </b></label></div>
                        <div class="grid6"><input type="password" name="password_confirmation" id="password2" required /><small style="color: red"></small></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow noBorderB" id="sendForm"><input type="submit" value="Add New Installer" class="buttonM bPurple formSubmit" name="submit" id="submit"></div>
				</div>
				<div class="widget grid2 widgetH"></div>
			</fieldset>
		</form>
	</div>
@endsection

@section('external_js')
@endsection