<?php $__env->startSection("content"); ?>
<div>
	<ol class="breadcrumb">
		  <li><a href="<?php echo e(URL::route('mechanicalmaintenance.index')); ?>">Bio-medical Equipment Maintenance Log</a></li>
		 <li><a  href="<?php echo URL::route('mechanicalbreakdown.index'); ?>">BIo-Medical Equipment Breakdown Log</a></li>
		 <li><a  href="<?php echo URL::route('mechanicalsupplier.index'); ?>">Equipment Suppliers</a></li>
		  <li class="active">Bio-Medical Equipment Inventory</li>
	</ol>
</div>
<?php if(Session::has('message')): ?>
	<div class="alert alert-info"><?php echo trans(Session::get('message')); ?></div>
<?php endif; ?>
<div class="panel panel-default" style="width:90%">
	<div class="panel-heading ">
		<span class="ion-gear-a"></span>
		Bio-Medical Equipment Inventory
		<div class="panel-btn">

			<a href="<?php echo URL::route("mechanicalinventory.create"); ?>" class="btn btn-sm btn-info">
      <span class="glyphicon glyphicon-plus-sign"></span><font size:"4"> New Asset</font></a>
		</div>
	</div>

	<div class="panel-body">
	<div class="table-responsive">
  		<table class="table table-striped table-bordered search-table small-medium">
			<thead>
				<tr>

					<!-- <th>Asset Description</th>
					<th>Purchase Details</th>
					<th>Asset Life Details</th>
					<th>Asset Operational Details</th>
					<th>Actions</th> -->

					<th class="text-left">#</th>
					<th class="text-left">Item</th>
					<th class="text-left">Model</th>
					<th class="text-left">Location/User</th>
					<th class="text-left">Installation Date</th>
					<th class="text-left">Actions</th>

					<!-- <th>Name</th>
					<th>Model</th>
					<th>Serial number</th>
					<th>Location</th>
					<th>Procurement type</th>
					<th>Purchase date</th>
					<th>Delivery date</th>
					<th>Verification date</th>
					<th>Installation date</th>
					<th>Spare parts</th>
					<th>Warranty period</th>
					<th>Lifetime</th>
					<th>Service frequency</th>
					<th>Service contract</th> -->
				</tr>
			</thead>
			<tbody>
				 <?php $row=1; ?>
			<?php foreach($items as $item): ?>
				<tr>

					<th><?php echo $row; ?></th>
					<td class="text-left"><?php echo $item->name; ?></td>
					<td class="text-left"><?php echo $item->model; ?></td>
					<td class="text-left"><?php echo $location[$item->location]; ?></td>
					<td class="text-left"><?php echo date('d M Y', strtotime($item->installation_date)); ?></td>

				<!-- <td> 		Item: <?php echo $item->name; ?>

					 			<br>Model: <?php echo $item->model; ?>

								<br>Serial No: <?php echo $item->serial_number; ?>

				</td>

				<td>		Procurement Type: <?php echo $procurement_type[$item->procurement_type]; ?>

								<br>Purchase Date: <?php echo date('d M Y', strtotime($item->purchase_date)); ?>

								<br>Delivery Date: <?php echo date('d M Y', strtotime($item->delivery_date)); ?>

								<br>Verification Date: <?php echo date('d M Y', strtotime($item->verification_date)); ?>

				</td>

				<td>		Warranty: <?php echo $item->warranty. ' years'; ?>

								<br>Spare Parts: <?php echo $yes_no[$item->spare_parts]; ?>

								<br>Useful Life: <?php echo $item->life_span . ' years'; ?>

								<br>Service Frequency: <?php echo $service_frequency[$item->service_frequency]; ?>

								<br>Service Contract: <?php echo $yes_no[$item->service_contract]; ?>

				</td>

				<td>  	Location/User: <?php echo $item->location; ?>

								<br> Installation Date: <?php echo date('d M Y', strtotime($item->installation_date)); ?>

								<br>

			 </td> -->
				<td>
					<a class="btn btn-sm btn-warning" href="<?php echo URL::route('ictinventory.viewDetails', array($item->id)); ?>" >
						<span class="glyphicon glyphicon-eye-open"></span>
						View full details
					</a>
					<a class="btn btn-sm btn-info" href="<?php echo URL::route('ictinventory.edit', array($item->id)); ?>" >
							<span class="glyphicon glyphicon-edit"></span>
							<?php echo trans('messages.edit'); ?>

					</a>
					<button class="btn btn-sm btn-danger delete-item-link"
							data-toggle="modal" data-target=".confirm-delete-modal"
							data-id="<?php echo URL::route('ictinventory.delete', array($item->id)); ?>">
							<span class="glyphicon glyphicon-trash"></span>
							<?php echo trans('messages.delete'); ?>

					</button>
				  </td>

				</tr>
				<?php $row++; ?>
			<?php endforeach; ?>
			</tbody>
  		</table>
	</div>

		<?php Session::put('SOURCE_URL', URL::full());?>
	</div>

</div>


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

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