perbaikan nama <tr> tabel dan dashboard access
This commit is contained in:
parent
35f480c341
commit
e39ea6544a
@ -40,7 +40,7 @@ class FoController extends BaseController {
|
||||
|
||||
$data['accessnumber'] = $accessnumber;
|
||||
|
||||
return view('admin/dashboard_viewAccess', $data);
|
||||
return view('fo/dashboard_viewAccess', $data);
|
||||
}
|
||||
|
||||
public function changePass() {
|
||||
|
||||
@ -40,7 +40,7 @@ class SamplingController extends BaseController {
|
||||
|
||||
$data['accessnumber'] = $accessnumber;
|
||||
|
||||
return view('admin/dashboard_viewAccess', $data);
|
||||
return view('sampling/dashboard_viewAccess', $data);
|
||||
}
|
||||
|
||||
public function changePass() {
|
||||
|
||||
@ -40,7 +40,7 @@ class UserController extends BaseController {
|
||||
|
||||
$data['accessnumber'] = $accessnumber;
|
||||
|
||||
return view('admin/dashboard_viewAccess', $data);
|
||||
return view('user/dashboard_viewAccess', $data);
|
||||
}
|
||||
|
||||
public function changePass() {
|
||||
|
||||
@ -28,17 +28,17 @@
|
||||
|
||||
<div class="table-responsive mt-3">
|
||||
<table id="myTable" class="table table-hover">
|
||||
<thead>
|
||||
<th>Order</th>
|
||||
<th>MR</th>
|
||||
<th>Patient</th>
|
||||
<th>Request</th>
|
||||
<th>Hosp</th>
|
||||
<thead class='text-start'>
|
||||
<th class='text-start' width="10%">Order Date</th>
|
||||
<th width="12%">Patient#</th>
|
||||
<th width="17%">Patient Name</th>
|
||||
<th class='text-start' width="10%">Access#</th>
|
||||
<th width="9%">Visit#</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
<tbody id="table-body" class='text-start'>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -109,6 +109,7 @@ function index() {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||
patnumber = patnumber.substring(patnumber.length - 10);
|
||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||
patname = data[i].NAME;
|
||||
hon = data[i].HOSTORDERNUMBER;
|
||||
@ -148,7 +149,7 @@ function index() {
|
||||
stattext = 'Validated';
|
||||
}
|
||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||
'<td>' + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + '</td> <td>' + accessnumber + '</td> <td>' + hon + '</td> <td>' + tests + '</td>' +
|
||||
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</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+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||
$("#table-body").append(datarow);
|
||||
|
||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
||||
<div class="col">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<th width='18%'>Access#</th>
|
||||
<th width='18%'>Access Number</th>
|
||||
<th>:</th>
|
||||
<td width='31%'><?=$accessnumber;?></td>
|
||||
|
||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>MR#</th>
|
||||
<th>Patient Number</th>
|
||||
<th>:</th>
|
||||
<td><?=$patnumber;?></td>
|
||||
|
||||
|
||||
@ -28,17 +28,17 @@
|
||||
|
||||
<div class="table-responsive mt-3">
|
||||
<table id="myTable" class="table table-hover">
|
||||
<thead>
|
||||
<th>Order</th>
|
||||
<th>MR</th>
|
||||
<th>Patient</th>
|
||||
<th>Request</th>
|
||||
<th>Hosp</th>
|
||||
<thead class='text-start'>
|
||||
<th class='text-start' width="10%">Order Date</th>
|
||||
<th width="12%">Patient#</th>
|
||||
<th width="17%">Patient Name</th>
|
||||
<th class='text-start' width="10%">Access#</th>
|
||||
<th width="9%">Visit#</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
<tbody id="table-body" class='text-start'>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -59,12 +59,12 @@
|
||||
let curDate = new Date().toJSON().slice(0, 10);
|
||||
$('.date1').val(curDate);
|
||||
$('.date2').val(curDate);
|
||||
index();
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.key === 'F5') { event.preventDefault(); index(); }
|
||||
});
|
||||
|
||||
index();
|
||||
function index() {
|
||||
let url = '<?=base_url('');?>api/dashboard/index';
|
||||
date1 = $('.date1').val();
|
||||
@ -109,6 +109,7 @@ function index() {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||
patnumber = patnumber.substring(patnumber.length - 10);
|
||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||
patname = data[i].NAME;
|
||||
hon = data[i].HOSTORDERNUMBER;
|
||||
@ -128,7 +129,7 @@ function index() {
|
||||
stattext = 'Collected';
|
||||
} else if(stat == 'PartRecv') {
|
||||
bgcolor = 'bg-soft-blue';
|
||||
datafilter = "data-filterrow='2'";
|
||||
datafilter = "data-filterrow='3'";
|
||||
stattext = 'Part Received';
|
||||
} else if(stat == 'Recv') {
|
||||
bgcolor = 'bg-blue';
|
||||
@ -147,8 +148,8 @@ function index() {
|
||||
datafilter = "data-filterrow='7'";
|
||||
stattext = 'Validated';
|
||||
}
|
||||
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>' +
|
||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</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+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||
$("#table-body").append(datarow);
|
||||
|
||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
||||
<div class="col">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<th width='18%'>Access#</th>
|
||||
<th width='18%'>Access Number</th>
|
||||
<th>:</th>
|
||||
<td width='31%'><?=$accessnumber;?></td>
|
||||
|
||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>MR#</th>
|
||||
<th>Patient Number</th>
|
||||
<th>:</th>
|
||||
<td><?=$patnumber;?></td>
|
||||
|
||||
@ -91,7 +91,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($accessnumber, \"$sampletext\")'" . "><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, $sampletype)'" . "><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>
|
||||
@ -109,10 +109,10 @@ $name = $row['NAME'];
|
||||
</div>
|
||||
<script>
|
||||
function printSingleLabel(access, sample) {
|
||||
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
|
||||
const url = '<?=base_url();?>printLabel/single/'+access.toString()+'/'+sample.toString();
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
if (data['status']) {
|
||||
@ -129,12 +129,11 @@ function printSingleLabel(access, sample) {
|
||||
});
|
||||
}
|
||||
function printAllLabel(access) {
|
||||
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
|
||||
const url = '<?=base_url();?>printLabel/all/'+access.toString();
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
if (data['status']) {
|
||||
console.log(data['message']);
|
||||
} else {
|
||||
@ -142,7 +141,6 @@ function printAllLabel(access) {
|
||||
message = data['message']+"\n"+data['error'];
|
||||
alert(message);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
|
||||
@ -28,17 +28,17 @@
|
||||
|
||||
<div class="table-responsive mt-3">
|
||||
<table id="myTable" class="table table-hover">
|
||||
<thead>
|
||||
<th>Order</th>
|
||||
<th>MR</th>
|
||||
<th>Patient</th>
|
||||
<th>Request</th>
|
||||
<th>Hosp</th>
|
||||
<thead class='text-start'>
|
||||
<th class='text-start' width="10%">Order Date</th>
|
||||
<th width="12%">Patient#</th>
|
||||
<th width="17%">Patient Name</th>
|
||||
<th class='text-start' width="10%">Access#</th>
|
||||
<th width="9%">Visit#</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
<tbody id="table-body" class='text-start'>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -59,12 +59,12 @@
|
||||
let curDate = new Date().toJSON().slice(0, 10);
|
||||
$('.date1').val(curDate);
|
||||
$('.date2').val(curDate);
|
||||
index();
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.key === 'F5') { event.preventDefault(); index(); }
|
||||
});
|
||||
|
||||
index();
|
||||
function index() {
|
||||
let url = '<?=base_url('');?>api/dashboard/index';
|
||||
date1 = $('.date1').val();
|
||||
@ -109,6 +109,7 @@ function index() {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||
patnumber = patnumber.substring(patnumber.length - 10);
|
||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||
patname = data[i].NAME;
|
||||
hon = data[i].HOSTORDERNUMBER;
|
||||
@ -128,7 +129,7 @@ function index() {
|
||||
stattext = 'Collected';
|
||||
} else if(stat == 'PartRecv') {
|
||||
bgcolor = 'bg-soft-blue';
|
||||
datafilter = "data-filterrow='2'";
|
||||
datafilter = "data-filterrow='3'";
|
||||
stattext = 'Part Received';
|
||||
} else if(stat == 'Recv') {
|
||||
bgcolor = 'bg-blue';
|
||||
@ -147,8 +148,8 @@ function index() {
|
||||
datafilter = "data-filterrow='7'";
|
||||
stattext = 'Validated';
|
||||
}
|
||||
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>' +
|
||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</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+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||
$("#table-body").append(datarow);
|
||||
|
||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
||||
<div class="col">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<th width='18%'>Access#</th>
|
||||
<th width='18%'>Access Number</th>
|
||||
<th>:</th>
|
||||
<td width='31%'><?=$accessnumber;?></td>
|
||||
|
||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>MR#</th>
|
||||
<th>Patient Number</th>
|
||||
<th>:</th>
|
||||
<td><?=$patnumber;?></td>
|
||||
|
||||
@ -91,7 +91,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($accessnumber, \"$sampletext\")'" . "><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, $sampletype)'" . "><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>
|
||||
@ -109,10 +109,10 @@ $name = $row['NAME'];
|
||||
</div>
|
||||
<script>
|
||||
function printSingleLabel(access, sample) {
|
||||
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
|
||||
const url = '<?=base_url();?>printLabel/single/'+access.toString()+'/'+sample.toString();
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
if (data['status']) {
|
||||
@ -129,12 +129,11 @@ function printSingleLabel(access, sample) {
|
||||
});
|
||||
}
|
||||
function printAllLabel(access) {
|
||||
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
|
||||
const url = '<?=base_url();?>printLabel/all/'+access.toString();
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
if (data['status']) {
|
||||
console.log(data['message']);
|
||||
} else {
|
||||
@ -142,7 +141,6 @@ function printAllLabel(access) {
|
||||
message = data['message']+"\n"+data['error'];
|
||||
alert(message);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
|
||||
@ -28,17 +28,17 @@
|
||||
|
||||
<div class="table-responsive mt-3">
|
||||
<table id="myTable" class="table table-hover">
|
||||
<thead>
|
||||
<th>Order</th>
|
||||
<th>MR</th>
|
||||
<th>Patient</th>
|
||||
<th>Request</th>
|
||||
<th>Hosp</th>
|
||||
<thead class='text-start'>
|
||||
<th class='text-start' width="10%">Order Date</th>
|
||||
<th width="12%">Patient#</th>
|
||||
<th width="17%">Patient Name</th>
|
||||
<th class='text-start' width="10%">Access#</th>
|
||||
<th width="9%">Visit#</th>
|
||||
<th>Test</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
<tbody id="table-body" class='text-start'>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -59,12 +59,12 @@
|
||||
let curDate = new Date().toJSON().slice(0, 10);
|
||||
$('.date1').val(curDate);
|
||||
$('.date2').val(curDate);
|
||||
index();
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.key === 'F5') { event.preventDefault(); index(); }
|
||||
});
|
||||
|
||||
index();
|
||||
function index() {
|
||||
let url = '<?=base_url('');?>api/dashboard/index';
|
||||
date1 = $('.date1').val();
|
||||
@ -109,6 +109,7 @@ function index() {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
colldate = data[i].COLLECTIONDATE.substr(0,10);
|
||||
patnumber = data[i].PATNUMBER.substr(-16,16);
|
||||
patnumber = patnumber.substring(patnumber.length - 10);
|
||||
accessnumber = data[i].SP_ACCESSNUMBER;
|
||||
patname = data[i].NAME;
|
||||
hon = data[i].HOSTORDERNUMBER;
|
||||
@ -128,7 +129,7 @@ function index() {
|
||||
stattext = 'Collected';
|
||||
} else if(stat == 'PartRecv') {
|
||||
bgcolor = 'bg-soft-blue';
|
||||
datafilter = "data-filterrow='2'";
|
||||
datafilter = "data-filterrow='3'";
|
||||
stattext = 'Part Received';
|
||||
} else if(stat == 'Recv') {
|
||||
bgcolor = 'bg-blue';
|
||||
@ -147,8 +148,8 @@ function index() {
|
||||
datafilter = "data-filterrow='7'";
|
||||
stattext = 'Validated';
|
||||
}
|
||||
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>' +
|
||||
let datarow = "<tr onclick='viewAccess("+accessnumber+")' class='align-middle main_table'" + datafilter +" >" +
|
||||
"<td class='text-start'>" + colldate + '</td> <td>' + patnumber + '</td> <td>' + patname + "</td> <td class='text-start'>" + accessnumber + '</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+ ",event" +")'> <h4 class='p-0 m-0'><i class='bi bi-filetype-pdf'></i></h4> </td>" +'</tr>';
|
||||
$("#table-body").append(datarow);
|
||||
|
||||
@ -15,7 +15,7 @@ $name = $row['NAME'];
|
||||
<div class="col">
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<th width='18%'>Access#</th>
|
||||
<th width='18%'>Access Number</th>
|
||||
<th>:</th>
|
||||
<td width='31%'><?=$accessnumber;?></td>
|
||||
|
||||
@ -25,7 +25,7 @@ $name = $row['NAME'];
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>MR#</th>
|
||||
<th>Patient Number</th>
|
||||
<th>:</th>
|
||||
<td><?=$patnumber;?></td>
|
||||
|
||||
@ -91,7 +91,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($accessnumber, \"$sampletext\")'" . "><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, $sampletype)'" . "><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>
|
||||
@ -109,10 +109,10 @@ $name = $row['NAME'];
|
||||
</div>
|
||||
<script>
|
||||
function printSingleLabel(access, sample) {
|
||||
const url = '<?=base_url();?>prints/single_sample/'+access.toString()+'/'+sample.toString();
|
||||
const url = '<?=base_url();?>printLabel/single/'+access.toString()+'/'+sample.toString();
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
if (data['status']) {
|
||||
@ -129,12 +129,11 @@ function printSingleLabel(access, sample) {
|
||||
});
|
||||
}
|
||||
function printAllLabel(access) {
|
||||
const url = '<?=base_url();?>prints/all_sample/'+access.toString();
|
||||
const url = '<?=base_url();?>printLabel/all/'+access.toString();
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json()) // Mengonversi response menjadi JSON (atau gunakan .text() jika formatnya teks)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
if (data['status']) {
|
||||
console.log(data['message']);
|
||||
} else {
|
||||
@ -142,7 +141,6 @@ function printAllLabel(access) {
|
||||
message = data['message']+"\n"+data['error'];
|
||||
alert(message);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user