@extends(Auth::check() && Auth::user()->role->layout == 1 ? 'layouts.admin' : 'layouts.employee')

@section('content')
<div class="content-wrapper">
	<section class="content-header">
		<h1>
		Clientes
		</h1>
	</section>

	<section class="content">
		<div class="row">
			<div class="col-md-8 col-md-offset-2">
				<div class="box box-success">
					<div class="box-header">	
						<h3 class="box-title">{{trans('general.edit')}} cliente</h3>
					</div>
					<div class="box-body">
						{!! Form::model($customer, ['method' => 'PATCH', 'url' => 'companies/'.$customer->id]) !!}
						{!! Form::hidden('id', $customer->id) !!}
						@include('companies.form', ['new' => false])
						{!! Form::close() !!}
					</div>
				</div>
			</div>
		</div>

		<div class="row">
			<a class="btn btn-app btn-flat bg-green" href="{{ asset('/companies/'.$customer->id.'/bank-account/create') }}"><i class="fa fa-bank"></i> {{trans('general.bank')}}</a>
		</div>
	</section>
</div>
@endsection

@section('foot')
<script src="{{ asset('/plugins/select2/select2.min.js') }}"></script>
<script src="{{ asset('plugins/jQueryUI/jquery-ui.min.js') }}"></script>
<script src="{{ asset('/plugins/input-mask/jquery.inputmask.js') }}"></script>
<script src="{{ asset('/plugins/input-mask/jquery.inputmask.extensions.js') }}"></script>
<script src="{{ asset('/plugins/iCheck/icheck.js') }}"></script>
<script type="text/javascript">
	$(function () {
		
		$("select").select2({
			placeholder: "Select",
			allowClear: true
		});

		var data = {!! $boats !!};
		$("#boats").select2({
			data: data
		});

		$('#boats').val({!! $selectedBoats !!}).trigger('change');
	});
	
	$(document).ready(function(){
		$('input').iCheck({
		checkboxClass: 'icheckbox_square-green',
		radioClass: 'iradio_square-green'
		});
	});
</script>
@endsection
