@extends('layouts.app')

@section('content')
<div class="page-header"><h2> {{ $pageTitle }} <small> {{ $pageNote }} </small> </h2></div>

	{!! Form::open(array('url'=>'actsinisters?return='.$return, 'class'=>'form-horizontal validated','files' => true )) !!}
	<div class="toolbar-nav">
		<div class="row">
			
			<div class="col-md-6 " >
				<button name="apply" class="tips btn btn-sm btn-default  "  title="{{ __('core.btn_back') }}" ><i class="fa  fa-check"></i> {{ __('core.sb_apply') }} </button>
				<button name="save" class="tips btn btn-sm btn-default"  title="{{ __('core.btn_back') }}" ><i class="fa  fa-paste"></i> {{ __('core.sb_save') }} </button> 
			</div>
			<div class="col-md-6 text-right " >
				<a href="{{ url($pageModule.'?return='.$return) }}" class="tips btn btn-sm "  title="{{ __('core.btn_back') }}" ><i class="fa  fa-times"></i></a> 
			</div>
		</div>
	</div>	


	<div class="p-5">
		<ul class="parsley-error-list">
			@foreach($errors->all() as $error)
				<li>{{ $error }}</li>
			@endforeach
		</ul>		
		<div class="row">
	<div class="col-md-12">
						<fieldset><legend> Accidents de travail</legend>
									
									  <div class="form-group row  " >
										<label for="Compe" class=" control-label col-md-4 text-left"> Compe <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <select name='account_id' rows='5' id='account_id' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Sinistre" class=" control-label col-md-4 text-left"> Sinistre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='sinister_id' id='sinister_id' value='{{ $row['sinister_id'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Cie" class=" control-label col-md-4 text-left"> Cie <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='cie' id='cie' value='{{ $row['cie'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Réf Cbt" class=" control-label col-md-4 text-left"> Réf Cbt <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='cbt_id' id='cbt_id' value='{{ $row['cbt_id'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Police" class=" control-label col-md-4 text-left"> Police <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='police' id='police' value='{{ $row['police'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Assuré" class=" control-label col-md-4 text-left"> Assuré <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='insured' id='insured' value='{{ $row['insured'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date sinistre" class=" control-label col-md-4 text-left"> Date sinistre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  
				<div class="input-group input-group-sm m-b" style="width:150px !important;">
					{!! Form::text('sinister_date', $row['sinister_date'],array('class'=>'form-control form-control-sm datetime')) !!}
					<div class="input-group-append">
					 	<div class="input-group-text"><i class="fa fa-calendar"></i></span></div>
					 </div>
				</div>
				 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date déclaration" class=" control-label col-md-4 text-left"> Date déclaration <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  
				<div class="input-group input-group-sm m-b" style="width:150px !important;">
					{!! Form::text('declaration_date', $row['declaration_date'],array('class'=>'form-control form-control-sm datetime')) !!}
					<div class="input-group-append">
					 	<div class="input-group-text"><i class="fa fa-calendar"></i></span></div>
					 </div>
				</div>
				 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Vicitime" class=" control-label col-md-4 text-left"> Vicitime <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='vicitim' id='vicitim' value='{{ $row['vicitim'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date naissance" class=" control-label col-md-4 text-left"> Date naissance <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  
				<div class="input-group input-group-sm m-b" style="width:150px !important;">
					{!! Form::text('birthday', $row['birthday'],array('class'=>'form-control form-control-sm datetime')) !!}
					<div class="input-group-append">
					 	<div class="input-group-text"><i class="fa fa-calendar"></i></span></div>
					 </div>
				</div>
				 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Age" class=" control-label col-md-4 text-left"> Age <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='age' id='age' value='{{ $row['age'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Lieu" class=" control-label col-md-4 text-left"> Lieu <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='place' id='place' value='{{ $row['place'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Type sinistre" class=" control-label col-md-4 text-left"> Type sinistre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='sinister_type' id='sinister_type' value='{{ $row['sinister_type'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Circonstances" class=" control-label col-md-4 text-left"> Circonstances <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='circumstances' id='circumstances' value='{{ $row['circumstances'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Nature lesion" class=" control-label col-md-4 text-left"> Nature lesion <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='lesion_nature' id='lesion_nature' value='{{ $row['lesion_nature'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Salaire" class=" control-label col-md-4 text-left"> Salaire <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='periodic_salary' id='periodic_salary' value='{{ $row['periodic_salary'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Salaire journalier" class=" control-label col-md-4 text-left"> Salaire journalier <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='daily_salary' id='daily_salary' value='{{ $row['daily_salary'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Frais médicaux" class=" control-label col-md-4 text-left"> Frais médicaux <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='medical_fees' id='medical_fees' value='{{ $row['medical_fees'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Jours arrêt de travail" class=" control-label col-md-4 text-left"> Jours arrêt de travail <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='days' id='days' value='{{ $row['days'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Indémnités journalières" class=" control-label col-md-4 text-left"> Indémnités journalières <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='daily_allowances' id='daily_allowances' value='{{ $row['daily_allowances'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Montant Reg Client" class=" control-label col-md-4 text-left"> Montant Reg Client <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <textarea name='payment_customer_amont' rows='5' id='payment_customer_amont' class='form-control form-control-sm '  
				           >{{ $row['payment_customer_amont'] }}</textarea> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Taux IPP" class=" control-label col-md-4 text-left"> Taux IPP <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='IPPRate' id='IPPRate' value='{{ $row['IPPRate'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Réserve" class=" control-label col-md-4 text-left"> Réserve <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='reserve' id='reserve' value='{{ $row['reserve'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Montant rachat" class=" control-label col-md-4 text-left"> Montant rachat <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='purchase_amount' id='purchase_amount' value='{{ $row['purchase_amount'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Décès" class=" control-label col-md-4 text-left"> Décès <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='death' id='death' value='{{ $row['death'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Sort du sinistre" class=" control-label col-md-4 text-left"> Sort du sinistre <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='sinister_fate' id='sinister_fate' value='{{ $row['sinister_fate'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Evenements" class=" control-label col-md-4 text-left"> Evenements <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='sinister_events' id='sinister_events' value='{{ $row['sinister_events'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Observations" class=" control-label col-md-4 text-left"> Observations <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <input  type='text' name='observations' id='observations' value='{{ $row['observations'] }}' 
						     class='form-control form-control-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date de reprise" class=" control-label col-md-4 text-left"> Date de reprise <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  
				<div class="input-group input-group-sm m-b" style="width:150px !important;">
					{!! Form::text('recovery_date', $row['recovery_date'],array('class'=>'form-control form-control-sm datetime')) !!}
					<div class="input-group-append">
					 	<div class="input-group-text"><i class="fa fa-calendar"></i></span></div>
					 </div>
				</div>
				 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Date de mise à jour" class=" control-label col-md-4 text-left"> Date de mise à jour <span class="asterix"> * </span></label>
										<div class="col-md-6">
										  <textarea name='SSISDate' rows='5' id='SSISDate' class='form-control form-control-sm '  
				           >{{ $row['SSISDate'] }}</textarea> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> </fieldset>
			</div>
			
			
	
		</div>

		<input type="hidden" name="action_task" value="save" />
		
		</div>
	</div>		
	{!! Form::close() !!}
		 
   <script type="text/javascript">
	$(document).ready(function() { 
		
		
		
		$("#account_id").jCombo("{!! url('actsinisters/comboselect?filter=sc_accounts:id:name') !!}",
		{  selected_value : '{{ $row["account_id"] }}' });
		 		 

		$('.removeMultiFiles').on('click',function(){
			var removeUrl = '{{ url("actsinisters/removefiles?file=")}}'+$(this).attr('url');
			$(this).parent().remove();
			$.get(removeUrl,function(response){});
			$(this).parent('div').empty();	
			return false;
		});		
		
	});
	</script>		 
@stop