pbmc-cmod/app/Views/dashboard_viewAccess.php

71 lines
2.4 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-borderless">
<thead class="align-top text-start">
<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>
</thead>
</table>
</div>
<div class="col-12">
<div class="card bg-light">
<div class="card-body">
<div class="card-title">Sample List</div>
<table class='table'>
<tr> <th class='text-center'>Coll.</th> <th class='text-center'>Recv.</th> <th>Sample Name</th> <th>Action</th> </tr>
<?php
foreach($data as $row) {
$sampletype = $row['SAMPLETYPE'];
$sampletext = $row['SHORTTEXT'];
$tubestatus = $row['TUBESTATUS'];
$collstatus = $row['COLLSTATUS'];
echo "<tr>";
echo "<input type='hidden' name='samptype[$sampletype]' value='0' />\r\n";
if($collstatus==1) { echo " <td class='text-center'>V</td>"; }
else { echo "<tr> <td class='text-center'>X</td>"; }
if($tubestatus==4) { echo "<td class='text-center'>V</td>"; }
else { echo"<td class='text-center'>X</td>"; }
echo "<td>$sampletext</td> <td> <span class='badge bg-black text-white'>reprint</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
}
?>