<?php $__env->startSection('content'); ?>
<div class="content-wrapper">

	<section class="content">
		<?php /* <a class="btn btn-app btn-flat bg-green" href="{{ asset('/users/'.$user->id.'/edit') }}"><i class="fa fa-edit"></i> Edit</a>
		<a class="btn btn-app btn-flat bg-green" href="{{ asset('/users/'.$user->id.'/absences/create') }}"><i class="fa fa-user-times"></i> Absence</a>
		<a class="btn btn-app btn-flat bg-green" href="{{ asset('/users/'.$user->id.'/awards/create') }}"><i class="fa fa-trophy"></i> Award</a>
		<a class="btn btn-app btn-flat bg-green" href="{{ asset('/users/'.$user->id.'/documents/create') }}"><i class="fa fa-file"></i> Document</a>
		<a class="btn btn-app btn-flat bg-green" href="{{ asset('/users/'.$user->id.'/expenses/create') }}"><i class="fa fa-money"></i> Expense</a>
		<a class="btn btn-app btn-flat bg-green" href="{{ asset('/users/'.$user->id.'/leaves/create') }}"><i class="fa fa-rocket"></i> Leave</a>
		<a class="btn btn-app btn-flat bg-green" href="{{ asset('/users/'.$user->id.'/bank-account/create') }}"><i class="fa fa-bank"></i> Bank Account</a> */ ?>
		<div class="row">
			<div class="col-md-3">
				<div class="box box-success">
					<div class="box-body box-profile">
						<img class="profile-user-img img-responsive img-circle" src="<?php echo e(asset('/dist/img/users/'.Auth::user()->profile_picture)); ?>" alt="User profile picture">
						<h3 class="profile-username text-center"><?php echo e(Auth::user()->first_name.' '.Auth::user()->last_name); ?> </h3>
						<p class="text-center no-margin"><?php echo e(Auth::user()->designation_item ? Auth::user()->designation_item->designation_item : ''); ?></p>
						<p class="small text-center no-margin"><span class="text-muted"><?php echo e(trans('general.categoria')); ?>:</span> <?php echo e(Auth::user()->department ? Auth::user()->department->department : ''); ?></p>
						<p class="small text-center no-margin"><span class="text-muted"><?php echo e(trans('general.usuario')); ?> ID:</span> <?php echo e(Auth::user()->employee_id); ?></p>
					</div>
					<div class="box-footer">
						<div class="row">
							<!--<div class="col-sm-4 border-right">
								<div class="description-block">
								<h5 class="description-header">8/11</h5>
								<span class="description-text small">Attendance</span>
								</div>
							</div>-->
							<div class="col-sm-6 border-right">
								<div class="description-block">
								<h5 class="description-header"><?php echo e(Auth::user()->documents->count()); ?></h5>
								<span class="description-text small"><?php echo e(trans('general.documentos')); ?></span>
								</div>
							</div>

							<!-- div class="col-sm-6">
								<div class="description-block">
								<h5 class="description-header">{# Auth::user()->customer() #}</h5>
								<span class="description-text small"><?php echo e(trans('general.boats')); ?></span>
								</div>
							</div -->

						</div>
					</div>
				</div>
				<div class="small-box bg-black">
					<div class="inner datebar" align="center">
						<p><?php setlocale(LC_ALL,"es_ES"); echo date('l'). ", " .date('jS \of F, Y'); ?></p>
						<h3 id="clock"></h3>
						<br />
					</div>
				</div>
			</div>
			<div class="col-md-9">
				<div class="row">
					<div class="col-md-6">
						<div class="box box-success">
							<div class="box-header">
								<h3 class="box-title"><?php echo e(trans('general.usuario')); ?></h3>
							</div>
							<div class="box-body no-padding">
								<table class="table">
									<tbody>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-envelope-o"></i></td>
										<td><strong>Email</strong></td>
										<td><?php echo e(Auth::user()->email); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-phone"></i></td>
										<td><strong><?php echo e(trans('general.movil')); ?></strong></td>
										<td><?php echo e(Auth::user()->telephone); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-map-marker"></i></td>
										<td><strong><?php echo e(trans('general.direccion')); ?></strong></td>
										<td><?php echo e(Auth::user()->local_address); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-user-secret"></i></td>
										<td><strong><?php echo e(trans('general.cif')); ?></strong></td>
										<td><?php echo e(Auth::user()->cif); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-birthday-cake"></i></td>
										<td><strong><?php echo e(trans('general.birthday')); ?></strong></td>
										<td><?php echo e(Auth::user()->birthday); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-genderless"></i></td>
										<td><strong><?php echo e(trans('general.usuariogenero')); ?></strong></td>
										<td><?php echo e(Auth::user()->gender_text()); ?></td>
									</tr>
									</tbody>
								</table>
							</div>
						</div>


						 <div class="box box-success">
							<div class="box-header">
								<h3 class="box-title"><?php echo e(trans('general.boat')); ?> asignada</h3>
							</div>
							<div class="box-body no-padding">
								<table class="table">
									<tbody>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-key"></i></td>
										<td><strong>Cliente ID</strong></td>
										<td><?php echo e($customer->id); ?> - <?php echo e($customer->fiscal_reason); ?></td>
									</tr>

									<?php if(count($boats) > 0): ?>
									<?php foreach($boats as $boat): ?>
									<tr>
										<td class="text-center"><i class="fa fa-briefcase"></i></td>
										<td><strong><?php echo e(trans('general.nombre')); ?></strong></td>
										<td>
										<?php echo e($boat->name); ?> <?php echo e($boat->model); ?> (<?php echo e($boat->number); ?>)
										</td>
									</tr>
									<?php endforeach; ?>
									<?php endif; ?>
									</tbody>
								</table>
							</div>
						</div>
					</div>
					<div class="col-md-6">
						<?php if(Auth::user()->role->layout != 1): ?>
						<div class="box box-success">
							<div class="box-header">
								<h3 class="box-title">Reservas pendientes</h3>
							</div>
							<div class="box-body no-padding">
								<table class="table">
									<tbody>
									<tr>
										<td style="width:10px" class="text-center"><strong>Fecha</strong></td>
										<td style="width:10px" class="text-center"><strong>Horario</strong></td>
									</tr>
									<?php foreach($reservations as $reservation): ?>
									<tr>
										<td style="width: 10px" class="text-center"><?php echo e($reservation->date_start); ?></td>
										<td style="width: 10px" class="text-center"><?php echo e($reservation->schedule->name); ?></td>
									</tr>
									<?php endforeach; ?>
									</tbody>
								</table>
							</div>
						</div>
						<?php endif; ?>

						<div class="box box-success">
							<div class="box-header with-border">
								<h3 class="box-title"><i class="fa fa-bell-o"></i> <?php echo e(trans('general.noticias')); ?></h3>
							</div>
							<div class="box-body">
								<ul class="products-list product-list-in-box">
									<?php foreach($notices as $notice): ?>
									<li class="item">
										<div class="product-img">
											<img src="<?php echo e(asset($notice->image)); ?>" alt="Product Image">
										</div>
										<div class="product-info">
											<a href="<?php echo e(asset('notices/'.$notice->id)); ?>" class="product-title"><?php echo e($notice->title); ?>

											<span class="label label-success pull-right"><?php echo e($notice->created_at); ?></span></a>
											<span class="product-description">
											<?php echo e($notice->description); ?>

											</span>
										</div>
									</li>
									<?php endforeach; ?>
								</ul>
							</div>
							<div class="box-footer text-center">
								<a href="<?php echo e(asset('notices')); ?>" class="uppercase"><?php echo e(trans('general.vertodos')); ?></a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('foot'); ?>
	<script type="text/javascript">
		function startTime() {
			var today=new Date(),
			curr_hour=today.getHours(),
			curr_min=today.getMinutes(),
			curr_sec=today.getSeconds();
			curr_hour=checkTime(curr_hour);
			curr_min=checkTime(curr_min);
			curr_sec=checkTime(curr_sec);
			document.getElementById('clock').innerHTML=curr_hour+":"+curr_min+":"+curr_sec;
		}
		function checkTime(i) {
			if (i<10) {
				i="0" + i;
			}
			return i;
		}
		setInterval(startTime, 500);
	</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make(Auth::check() && Auth::user()->role->layout == 1 ? 'layouts.admin' : 'layouts.employee', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>