perbaikan pdf array, memisahkan test feces, urine, others berdasarkan chapid, membuat laporan hasil menjadi garis border

This commit is contained in:
mikael-zakaria 2024-12-08 15:14:05 +08:00
parent 0a687cf760
commit 8958d08dfe
11 changed files with 226 additions and 1046 deletions

View File

@ -93,5 +93,5 @@ $routes->group('fo', ['filter' => 'role:fo'], static function ($routes) {
// Printers
$routes->get('prints/single_sample/(:any)/(:any)', 'PrinterController::printSingleSampleBarcode/$1/$2');
$routes->get('prints/all_sample', 'PrinterController::printAllSampleBarcode');
$routes->get('prints/all_sample/(:any)', 'PrinterController::printAllSampleBarcode/$1');
$routes->get('prints/result_test/(:any)', 'PrinterController::printResultTest/$1');

File diff suppressed because it is too large Load Diff

View File

@ -57,6 +57,7 @@
<?= $this->section('script') ?>
<script>
let curDate = new Date().toJSON().slice(0, 10);
$('.date1').val(curDate);
$('.date2').val(curDate);
@ -146,7 +147,7 @@ function index() {
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table" + datafilter +" ' >" +
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
$("#table-body").append(datarow);
}
$('#myTable').DataTable();
@ -198,7 +199,8 @@ function viewAccess(access) {
$('#modal').modal('show');
});
}
function resultPdfAccess(access) {
function resultPdfAccess(access, event) {
event.stopPropagation(); // Mencegah klik pada <tr> dieksekusi
let url = '<?=base_url();?>prints/result_test/'+access;
window.open(url, '_blank');
}

View File

@ -28,7 +28,7 @@ $name = $row['NAME'];
<tr>
<td></td> <td></td> <td>All</td>
<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printAllLabel()'> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick="printAllLabel(<?=$accessnumber;?>)"> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collectAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Coll.</h6></button>
<!-- <button class='badge bg-black text-white m-0 px-2 py-1' onclick='uncollectAll(<?=$accessnumber;?>)'>un-collect</button> -->
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceiveAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -58,7 +58,7 @@ $name = $row['NAME'];
}
echo "<td>$sampletext</td>";
echo "<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printSingleLabel($sampletype, $accessnumber)'><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, \"$sampletext\")'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -75,8 +75,7 @@ $name = $row['NAME'];
</div>
</div>
<script>
function printSingleLabel(sample, access) {
function printSingleLabel(access, sample) {
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
fetch(url)
@ -96,9 +95,8 @@ function printSingleLabel(sample, access) {
console.error('Error:', error);
});
}
function printAllLabel() {
const url = '<?=base_url();?>prints/all_sample';
function printAllLabel(access) {
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
fetch(url)
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)

View File

@ -146,7 +146,7 @@ function index() {
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table" + datafilter +" ' >" +
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
$("#table-body").append(datarow);
}
$('#myTable').DataTable();
@ -198,7 +198,8 @@ function viewAccess(access) {
$('#modal').modal('show');
});
}
function resultPdfAccess(access) {
function resultPdfAccess(access, event) {
event.stopPropagation(); // Mencegah klik pada <tr> dieksekusi
let url = '<?=base_url();?>prints/result_test/'+access;
window.open(url, '_blank');
}

View File

@ -28,7 +28,7 @@ $name = $row['NAME'];
<tr>
<td></td> <td></td> <td>All</td>
<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printAllLabel()'> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick="printAllLabel(<?=$accessnumber;?>)"> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collectAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Coll.</h6></button>
<!-- <button class='badge bg-black text-white m-0 px-2 py-1' onclick='uncollectAll(<?=$accessnumber;?>)'>un-collect</button> -->
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceiveAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -58,7 +58,7 @@ $name = $row['NAME'];
}
echo "<td>$sampletext</td>";
echo "<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printSingleLabel($sampletype, $accessnumber)'><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, \"$sampletext\")'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -75,8 +75,7 @@ $name = $row['NAME'];
</div>
</div>
<script>
function printSingleLabel(sample, access) {
function printSingleLabel(access, sample) {
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
fetch(url)
@ -96,9 +95,8 @@ function printSingleLabel(sample, access) {
console.error('Error:', error);
});
}
function printAllLabel() {
const url = '<?=base_url();?>prints/all_sample';
function printAllLabel(access) {
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
fetch(url)
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)

View File

@ -146,7 +146,7 @@ function index() {
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table" + datafilter +" ' >" +
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
$("#table-body").append(datarow);
}
$('#myTable').DataTable();
@ -198,7 +198,8 @@ function viewAccess(access) {
$('#modal').modal('show');
});
}
function resultPdfAccess(access) {
function resultPdfAccess(access, event) {
event.stopPropagation(); // Mencegah klik pada <tr> dieksekusi
let url = '<?=base_url();?>prints/result_test/'+access;
window.open(url, '_blank');
}

View File

@ -28,7 +28,7 @@ $name = $row['NAME'];
<tr>
<td></td> <td></td> <td>All</td>
<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printAllLabel()'> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick="printAllLabel(<?=$accessnumber;?>)"> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collectAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Coll.</h6></button>
<!-- <button class='badge bg-black text-white m-0 px-2 py-1' onclick='uncollectAll(<?=$accessnumber;?>)'>un-collect</button> -->
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceiveAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -58,7 +58,7 @@ $name = $row['NAME'];
}
echo "<td>$sampletext</td>";
echo "<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printSingleLabel($sampletype, $accessnumber)'><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, \"$sampletext\")'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -75,8 +75,7 @@ $name = $row['NAME'];
</div>
</div>
<script>
function printSingleLabel(sample, access) {
function printSingleLabel(access, sample) {
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
fetch(url)
@ -96,9 +95,8 @@ function printSingleLabel(sample, access) {
console.error('Error:', error);
});
}
function printAllLabel() {
const url = '<?=base_url();?>prints/all_sample';
function printAllLabel(access) {
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
fetch(url)
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)

View File

@ -146,7 +146,7 @@ function index() {
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table" + datafilter +" ' >" +
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + accessnumber + '</td> <td>' + patname + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
"<td role='button' class='"+bgcolor+" text-center align-middle'>"+stattext+"</td>" +
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
"<td role='button' class='text-center align-middle' onclick='resultPdfAccess("+accessnumber+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
$("#table-body").append(datarow);
}
$('#myTable').DataTable();
@ -198,7 +198,8 @@ function viewAccess(access) {
$('#modal').modal('show');
});
}
function resultPdfAccess(access) {
function resultPdfAccess(access, event) {
event.stopPropagation(); // Mencegah klik pada <tr> dieksekusi
let url = '<?=base_url();?>prints/result_test/'+access;
window.open(url, '_blank');
}

View File

@ -28,7 +28,7 @@ $name = $row['NAME'];
<tr>
<td></td> <td></td> <td>All</td>
<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printAllLabel()'> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick="printAllLabel(<?=$accessnumber;?>)"> <h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6> </button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collectAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Coll.</h6></button>
<!-- <button class='badge bg-black text-white m-0 px-2 py-1' onclick='uncollectAll(<?=$accessnumber;?>)'>un-collect</button> -->
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceiveAll(<?=$accessnumber;?>)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -58,7 +58,7 @@ $name = $row['NAME'];
}
echo "<td>$sampletext</td>";
echo "<td>
<button type='button' class='btn btn-dark m-0 px-2 py-1' onclick='printSingleLabel($sampletype, $accessnumber)'><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-dark m-0 px-2 py-1' " . "onclick='printSingleLabel($accessnumber, \"$sampletext\")'" . "><h6 class='p-0 m-0'><i class='bi bi-printer'></i></h6></button>
<button type='button' class='btn btn-success m-0 px-2 py-1' onclick='collect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Coll.</h6></button>
<button type='button' class='btn btn-warning m-0 px-2 py-1' onclick='uncollect($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Coll.</h6></button>
<button type='button' class='btn btn-primary m-0 px-2 py-1' onclick='unreceive($sampletype, $accessnumber)'><h6 class='p-0 m-0'>Un-Rec.</h6></button>
@ -75,8 +75,7 @@ $name = $row['NAME'];
</div>
</div>
<script>
function printSingleLabel(sample, access) {
function printSingleLabel(access, sample) {
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
fetch(url)
@ -96,9 +95,8 @@ function printSingleLabel(sample, access) {
console.error('Error:', error);
});
}
function printAllLabel() {
const url = '<?=base_url();?>prints/all_sample';
function printAllLabel(access) {
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
fetch(url)
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)

View File

@ -82,10 +82,15 @@ table.information {
table.result tr{
border:solid 1px rgba(0, 0, 0, 0.055);
}
table.result tr:nth-child(odd) {
/* table.result tr:nth-child(odd) {
background-color: #f2f2f2;
/* border:solid 1px rgba(0, 0, 0, 0.055); */
border:solid 1px rgba(0, 0, 0, 0.61);
} */
table.result tr {
/* background-color: #f2f2f2; */
border:solid 1px #e6e2e2;
}
.chapter {