Update Activity dan Sertifikat

This commit is contained in:
mikael-zakaria 2026-03-09 00:42:37 +07:00
parent a1cc45141e
commit 17052c5bf4
2 changed files with 26 additions and 20 deletions

View File

@ -454,7 +454,7 @@ class Certificates extends BaseController {
$html = view($template, [ 'certificate' => $certificate]);
$dompdf->loadHtml($html);
// $dompdf->set_option('isRemoteEnabled', true);
$dompdf->set_option('isRemoteEnabled', true);
$dompdf->setPaper('A4', $orientation);
$dompdf->render();

View File

@ -216,7 +216,7 @@ if(isset($data)) {
<label class="form-label border-start border-5 border-primary ps-1">Certificate</label>
<div class="row">
<div class="col-md-6 mb-2">
<!-- <div class="col-md-6 mb-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="calibration" id="calibration" value="1" <?= in_array('CC', $cert_types) ? 'checked' : '' ?>>
<label class="form-check-label" for="calibration">
@ -232,7 +232,7 @@ if(isset($data)) {
Installation Certificate
</label>
</div>
</div>
</div> -->
<div class="col-md-6 mb-2">
<div class="form-check">
@ -243,7 +243,7 @@ if(isset($data)) {
</div>
</div>
<div class="col-md-6 mb-2">
<!-- <div class="col-md-6 mb-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="offreport" value="1" id="offreport" <?= (in_array('BAI', $cert_types) || in_array('BAP', $cert_types)) ? 'checked' : '' ?>>
<label class="form-check-label" for="offreport">
@ -259,7 +259,7 @@ if(isset($data)) {
User Training Certificate
</label>
</div>
</div>
</div> -->
</div>
</div>
@ -801,25 +801,25 @@ $(document).ready(function() {
$('#acttypeid').change(function() {
if (this.value == '5') {
$("#maintenance").prop('disabled', false);
$("#calibration").prop('disabled', true);
$("#installation").prop('disabled', true);
$("#offreport").prop('disabled', true);
$("#training").prop('disabled', true);
// $("#calibration").prop('disabled', true);
// $("#installation").prop('disabled', true);
// $("#offreport").prop('disabled', true);
// $("#training").prop('disabled', true);
}
else if (this.value == '3') {
$("#maintenance").prop('disabled', true);
$("#calibration").prop('disabled', false);
$("#installation").prop('disabled', false);
$("#offreport").prop('disabled', false);
$("#training").prop('disabled', false);
// $("#calibration").prop('disabled', false);
// $("#installation").prop('disabled', false);
// $("#offreport").prop('disabled', false);
// $("#training").prop('disabled', false);
}
else {
// Ini akan menjadi default jika #acttypeid kosong atau bukan 5 dan 3
$("#maintenance").prop('disabled', true);
$("#calibration").prop('disabled', true);
$("#installation").prop('disabled', true);
$("#offreport").prop('disabled', true);
$("#training").prop('disabled', true);
// $("#calibration").prop('disabled', true);
// $("#installation").prop('disabled', true);
// $("#offreport").prop('disabled', true);
// $("#training").prop('disabled', true);
}
}).trigger('change');
});
@ -982,12 +982,18 @@ $('#status').change(function() {
else { $(".closedate").prop('disabled', false); $("#opendate").prop('disabled', false);}
})
// $('#acttypeid').change(function() {
// if (this.value=='5'){ $("#maintenance").prop('disabled', false); $("#calibration").prop('disabled', true); $("#installation").prop('disabled', true); $("#offreport").prop('disabled', true); $("#training").prop('disabled', true);}
// else if (this.value=='3'){ $("#maintenance").prop('disabled', true); $("#calibration").prop('disabled', false); $("#installation").prop('disabled', false); $("#offreport").prop('disabled', false); $("#training").prop('disabled', false); }
// else { $("#maintenance").prop('disabled', true); $("#calibration").prop('disabled', true); $("#installation").prop('disabled', true); $("#offreport").prop('disabled', true); $("#training").prop('disabled', true);}
// })
$('#acttypeid').change(function() {
if (this.value=='5'){ $("#maintenance").prop('disabled', false); $("#calibration").prop('disabled', true); $("#installation").prop('disabled', true); $("#offreport").prop('disabled', true); $("#training").prop('disabled', true);}
else if (this.value=='3'){ $("#maintenance").prop('disabled', true); $("#calibration").prop('disabled', false); $("#installation").prop('disabled', false); $("#offreport").prop('disabled', false); $("#training").prop('disabled', false); }
else { $("#maintenance").prop('disabled', true); $("#calibration").prop('disabled', true); $("#installation").prop('disabled', true); $("#offreport").prop('disabled', true); $("#training").prop('disabled', true);}
if (this.value=='5'){ $("#maintenance").prop('disabled', false); }
else if (this.value=='3'){ $("#maintenance").prop('disabled', true);}
else { $("#maintenance").prop('disabled', true);}
})
// reportdate change => opendate.value = reportdate.value
$('#reportdate').change(function() {
$('#opendate').val(this.value);