<?php $__env->startSection("content"); ?>

<div>
	<ol class="breadcrumb">
		<li><a href="<?php echo e(URL::route('user.home')); ?>"><?php echo trans('messages.home'); ?></a></li>
		<li class="active"><?php echo trans('messages.daily-log'); ?></li>
	</ol>
</div>

<div class='container-fluid'>
	<?php echo Form::open(array('route' => array('daily.activity'), 'class' => 'form-inline')); ?>

	<div class='row'>
		<div class="col-sm-4">
			<div class="row">
				<div class="col-sm-2">
					<?php echo Form::label('start', trans('messages.from')); ?>

				</div>
				<div class="col-sm-2">
					<?php echo Form::text('start', isset($input['start'])?$input['start']:date('Y-m-d'),
					array('class' => 'form-control standard-datepicker')); ?>

				</div>
			</div>
		</div>
		<div class="col-sm-4">
			<div class="row">
				<div class="col-sm-2">
					<?php echo Form::label('end', trans('messages.to')); ?>

				</div>
				<div class="col-sm-2">
					<?php echo Form::text('end', isset($input['end'])?$input['end']:date('Y-m-d'),
					array('class' => 'form-control standard-datepicker')); ?>

				</div>
			</div>
		</div>
		<div class="col-sm-4">
			<div class="row">
				<div class="col-sm-3">
					<?php echo Form::button("<span class='glyphicon glyphicon-filter'></span> ".trans('messages.view'),
					array('class' => 'btn btn-info', 'id' => 'filter', 'type' => 'submit')); ?>

				</div>
				<div class="col-sm-1">
					<?php echo Form::submit(trans('messages.export-to-word'),
					array('class' => 'btn btn-success', 'id'=>'word', 'name'=>'word')); ?>

				</div>
			</div>
		</div>
	</div>

<?php echo Form::close(); ?>

</div>
<br />
<div class="panel panel-primary">
	<div class="panel-heading ">
		<span class="glyphicon glyphicon-list"></span> <?php echo trans('messages.daily-log'); ?> - <?php echo trans('messages.test-records'); ?>

	<div class="panel-btn">
		<a class="btn btn-sm btn-info" href="<?php echo URL::route('dailyactivity.create'); ?>" >
			<span class="glyphicon glyphicon-plus-sign"></span>
			<font size="3">Add Activity</font>
		</a>
	</div>
</div>

	<div class="panel-body">
		<!-- if there are search errors, they will show here -->
		<?php if($error!=''): ?>
		<div class="alert alert-info"><?php echo $error; ?></div>
		<?php else: ?>
		<div id="test_records_div">

			<strong>
				<p>

					<?php $from = isset($input['start'])?$input['start']:date('d-m-Y');?>
					<?php $to = isset($input['end'])?$input['end']:date('d-m-Y');?>
					<?php if($from!=$to): ?>
					<?php echo trans('messages.from').' '.$from.' '.trans('messages.to').' '.$to; ?>

					<?php else: ?>
					<?php echo trans('messages.for').' '.date('d-m-Y'); ?>

					<?php endif; ?>
				</p>
			</strong>

			<table class="table table-striped table-hover table-bordered search-table">
				<tbody>
					<tr>
						<th>Date<th>
							<th>Lab Section<th>
								<th>No. Runs<th>
									<th>Valid Tests<th>
										<th>Invalid Tests<th>
											<th>Controls<th>
												<th>Total<th>
													<th>Valid<th>
														<th>Invalid<th>
															<th>Total<th>

															</tr>
															<?php $__empty_1 = true; foreach($activity as $key => $test): $__empty_1 = false; ?>
															<tr>
																<td><?php echo $test->activity_date; ?></td>
																<td><?php echo $test->section_id; ?></td>
																<td><?php echo $test->runs; ?></td>
																<td><?php echo $test->valid_tests; ?></td>
																<td><?php echo $test->invalid_tests; ?></td>
																<td><?php echo $test->controls; ?></td>
																<td><?php echo $test->total_runs; ?></td>
																<td><?php echo $test->valid_kits; ?></td>
																<td><?php echo $test->invalid_kits; ?></td>
																<td><?php echo $test->total_kits; ?></td>
																<td><?php echo $test->user->name; ?></td>
															</tr>
															<?php endforeach; if ($__empty_1): ?>
															<tr><td colspan="12"><?php echo trans('messages.no-records-found'); ?></td></tr>
															<?php endif; ?>
														</tbody>
													</table>
												</div>
												<?php endif; ?>
											</div>
										</div>

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

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