<?php $__env->startSection('content'); ?>
<div class="container-fluid">
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
<h1>Timesheet Edit</h1>
    <ul class='breadcrumb'>
        <li><a href="<?php echo e(URL('admin/dashboard')); ?>">Home</a></li>
        <li><a href="<?php echo e(URL('admin/timesheet')); ?>">Timesheet</a></li>
        <li>Edit</li>

    </ul>


			<div class="panel panel-default">
		
				<div class="panel-body">
					<?php if(count($errors) > 0): ?>
						<div class="alert alert-danger">
							<strong>Whoops!</strong> There were some problems with your input.<br><br>
							<ul>
								<?php foreach($errors->all() as $error): ?>
									<li><?php echo e($error); ?></li>
								<?php endforeach; ?>
							</ul>
						</div>
					<?php endif; ?>

				 <?php if(Session::has('message')): ?>
						<div class="alert alert-success">
							<strong>Status!</strong>  <?php echo e(Session('message')); ?> 
        				</div>
					<?php endif; ?>

<?php if(count($employees) > 0): ?>
<?php foreach($employees as $emp): ?>

					<form class="form-horizontal" role="form" method="POST">
						<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
						<input type="hidden" name="id" value="<?php echo e($emp->id); ?>">
						
					
                        	<div class="form-group">
							<label class="col-md-4 control-label">Employee*</label>
							<div class="col-md-6">
                            <select class="form-control" name="emp_id">
<option value="<?php echo e($emp->emp_id); ?>" selected><?php echo e($emp->emp->name); ?></option>                            	
  <?php foreach($posts as $post): ?>
  <option value="<?php echo e($post->id); ?> "><?php echo e($post->name); ?></option>
  <?php endforeach; ?>
</select>


							</div>
						</div>
							<div class="form-group">
							<label class="col-md-4 control-label">Project*</label>
							<div class="col-md-6">
                            <select class="form-control" name="proj_id">
<option value="<?php echo e($emp->proj_id); ?>" selected><?php echo e($emp->project->proj_title); ?></option>                            	                            	
  <?php foreach($projects as $project): ?>
  <option value="<?php echo e($project->id); ?> "><?php echo e($project->proj_title); ?></option>
  <?php endforeach; ?>
</select>


							</div>
						</div>
	<div class="form-group">
							<label class="col-md-4 control-label">Start Time*</label>
							<div class="col-md-6">
                            <div class='input-group date'>
<input type='text' class="form-control" name="start_time" id="time-start" value="<?php echo e($emp->start_time); ?>" required />
  <span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span></div>

							</div>
						</div>
	<div class="form-group">
							<label class="col-md-4 control-label">End Time*</label>
							<div class="col-md-6">
                            <div class='input-group date'>
<input type='text' class="form-control" name="end_time" id="time-end" value="<?php echo e($emp->end_time); ?>" required />
  <span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span></div>

							</div>
						</div>											
<div class="form-group">	
							<label class="col-md-4 control-label">Task*</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="task" value="<?php echo e($emp->task); ?>" >
							</div>
						</div>	
<div class="form-group">	
							<label class="col-md-4 control-label">Notes*</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="notes" value="<?php echo e($emp->notes); ?>" >
							</div>
						</div>						
                        	


						<div class="form-group">
							<div class="col-md-6 col-md-offset-4">
								<button type="submit" class="btn btn-primary" disabled>
								   Save
								</button>
							</div>
						</div>
					</form>

<?php endforeach; ?>
<?php endif; ?>						

				</div>
			</div>
		</div>
	</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>