@extends('market.layout.master')
@section('ptitle', 'Marketing')
@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')
	<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 comission (R) successful</p>
			</div>
			@endif
		</div>
		<div class="widget grid2 widgetH"></div>
	</div>

	<div class="fluid">
		@foreach($commission as $a)
		<form action="{{ url('/marketing/commission/update-commissionR') }}" class="main cussPayment" method="post" enctype="multipart/form-data">
			<fieldset>
				<div class="widget grid2 widgetH"></div>
				<div class="widget grid8">
					<div class="whead"><h6>Edit Commission Details</h6></div>
					
					<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
					<input type="hidden" name="commission_id" value="{{$a->_id}}">;

					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Contract (Month) : </b></label></div>
                        <div class="grid6"><input type="text" name="contract" id="contract" value="{{$a->contract}}"required /></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Range Activation Subcription : </b></label></div>
                        <div class="grid6"><input type="text" name="ranges" id="ranges" value="{{$a->ranges}}" required /></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Commission (%) : </b></label></div>
                        <div class="grid6"><input type="text" name="comm" id="comm" value="{{$a->comm}}" required /></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow">
						<div class="grid2">&nbsp;</div>
						<div class="grid2"><label><b>Category : </b></label></div>
                        <div class="grid6"><input type="text" name="categori" id="categori" value="{{$a->category}}" required /></div>
						<div class="grid2">&nbsp;</div>
                    </div>
					
					<div class="formRow noBorderB" id="sendForm"><input type="submit" value="Submit" class="buttonM bPurple formSubmit" name="submit" id="submit"></div>
				</div>
				<div class="widget grid2 widgetH"></div>
			</fieldset>
		</form>
		@endforeach
	</div>
@endsection

@section('external_js')
@endsection