pbmc-cmod/app/Views/dashboard_viewAccess.php

93 lines
3.6 KiB
PHP

<?php
if(isset($data[0])) {
$row = $data[0];
$patnumber = $row['PATNUMBER'];
$host = $row['HOSTORDERNUMBER'];
$name = $row['NAME'];
?>
<style>
span.badge { cursor:pointer; }
</style>
<div class="modal-header bg-orange">
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12">
<table class="table table-sm table-borderless">
<tr> <th>Access#</th> <th>:</th> <td><?=$accessnumber;?></td> </tr>
<tr> <th>Pat#</th> <th>:</th> <td><?=$patnumber;?></td> </tr>
<tr> <th>Nama</th> <th>:</th> <td><?=$name;?></td> </tr>
<tr> <th>Status</th> <th>:</th> <td><span class="badge bg-orange">Pending</span></td> </tr>
</table>
</div>
<div class="col-12">
<div class="card bg-secondary">
<div class="card-body">
<div class="card-title"><h3>Sample List</h3></div>
<table class='table'>
<tr> <th class='text-center'>Coll.</th> <th class='text-center'>Recv.</th> <th>Sample Name</th> <th></th> </tr>
<?php
foreach($data as $row) {
$sampletype = $row['SAMPLETYPE'];
$sampletext = $row['SHORTTEXT'];
$tubestatus = $row['TUBESTATUS'];
$collstatus = $row['COLLSTATUS'];
echo "\r\n <tr>";
echo "<input type='hidden' name='samptype[$sampletype]' value='0' />\r\n";
if($collstatus==1) { echo " <td class='text-center'><input type='checkbox' class='form-check-input' id='physics' checked disabled></td>"; }
else { echo "<tr> <td class='text-center'><input type='checkbox' class='form-check-input' id='physics' disabled></td>"; }
if($tubestatus==4) { echo "<td class='text-center'><input type='checkbox' class='form-check-input' id='physics' checked disabled></td>"; }
else { echo"<td class='text-center'><input type='checkbox' class='form-check-input' id='physics' disabled></td>"; }
echo "<td>$sampletext</td>";
echo "<td class='text-center'>
<span class='badge bg-black text-white'>reprint</span>
<span class='badge bg-black text-white'>collect</span>
<span class='badge bg-black text-white'>un-collect</span>
<span class='badge bg-black text-white'>un-receive</span>
</td> ";
echo " </tr>";
}
?>
<tr>
<td></td> <td></td> <td>Collection</td>
<td class='text-center'>
<span class='badge bg-black text-white'>reprint</span>
<span class='badge bg-black text-white'>collect</span>
<span class='badge bg-black text-white'>un-collect</span>
<span class='badge bg-black text-white'>un-receive</span>
</td>
</tr>
<tr>
<td></td> <td></td> <td>All</td>
<td class='text-center'>
<span class='badge bg-black text-white'>reprint</span>
<span class='badge bg-black text-white'>collect</span>
<span class='badge bg-black text-white'>un-collect</span>
<span class='badge bg-black text-white'>un-receive</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Understood</button>
</div> -->
<?php
} else {
?>
<div class="modal-header bg-black text-white">
<h1 class="modal-title fs-5" id="exampleModalToggleLabel">Detail Request </h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" ></button>
</div>
<div class="modal-body">
<h3>Data not found</h3>
</div>
<?php
}
?>