update
This commit is contained in:
No files matched your search
@@ -255,24 +255,10 @@
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<select id="cekbln" class="form-control">
|
||||
<option value="ALL">ALL</option>
|
||||
<option value="01">Jan</option>
|
||||
<option value="02">Feb</option>
|
||||
<option value="03">Mar</option>
|
||||
<option value="04">Apr</option>
|
||||
<option value="05">May</option>
|
||||
<option value="06">Jun</option>
|
||||
<option value="07">Jul</option>
|
||||
<option value="08">Aug</option>
|
||||
<option value="09">Sep</option>
|
||||
<option value="10">Oct</option>
|
||||
<option value="11">Nov</option>
|
||||
<option value="12">Dec</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" class="form-control" id="cekthn" value="{{ $tahunne }}">
|
||||
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button class="btn btn-warning btn-flat" type="button" id="btnviewdata">View Report</button>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('dokter.ppdsdeveloper')
|
||||
@extends(Session::get('previlage') == 'developer' ? 'dokter.ppdsdeveloper' : 'dokter.ppds')
|
||||
|
||||
@push('styles')
|
||||
<style>
|
||||
#divawal {
|
||||
display: none !important;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
@@ -11,7 +11,106 @@
|
||||
@push('script')
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#divawal').hide();
|
||||
var focusPeriksaId = @json((string) ($focusPeriksaId ?? ''));
|
||||
var returnUrl = @json($expertiseReturnUrl ?? url('/'));
|
||||
var shouldOpenOnLoad = @json((bool) ($openExpertiseOnLoad ?? false));
|
||||
var initialListMode = @json($initialListMode ?? 'searchbydate');
|
||||
var initialStartDate = @json($initialStartDate ?? '');
|
||||
var initialEndDate = @json($initialEndDate ?? '');
|
||||
var autoOpenAttempts = 0;
|
||||
var maxAutoOpenAttempts = 12;
|
||||
var hasOpenedTarget = false;
|
||||
|
||||
function setInitialFilters() {
|
||||
if ($('#mulai').length) {
|
||||
$('#mulai').val(initialStartDate);
|
||||
}
|
||||
if ($('#akhir').length) {
|
||||
$('#akhir').val(initialEndDate);
|
||||
}
|
||||
if ($('#valjenis').length) {
|
||||
$('#valjenis').val(initialListMode);
|
||||
}
|
||||
if ($('#master_set01').length) {
|
||||
$('#master_set01').val(initialListMode);
|
||||
}
|
||||
if ($('#valcari').length) {
|
||||
$('#valcari').val('');
|
||||
}
|
||||
}
|
||||
|
||||
function findExpertiseButton(boundIndex) {
|
||||
var row = $('#gridpemeriksaan').find('[role="row"][boundindex="' + boundIndex + '"]').first();
|
||||
if (!row.length) {
|
||||
return $();
|
||||
}
|
||||
|
||||
return row.find('button, input, .jqx-button').filter(function () {
|
||||
var text = $.trim($(this).text());
|
||||
var value = $.trim($(this).val());
|
||||
return text === 'Expertise' || value === 'Expertise';
|
||||
}).first();
|
||||
}
|
||||
|
||||
function openFocusedPeriksa() {
|
||||
if (!shouldOpenOnLoad || hasOpenedTarget || !focusPeriksaId) {
|
||||
return;
|
||||
}
|
||||
|
||||
var rows = $('#gridpemeriksaan').jqxGrid('getrows') || [];
|
||||
var matchedRow = null;
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
if (String(rows[i].id) === focusPeriksaId) {
|
||||
matchedRow = rows[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!matchedRow) {
|
||||
autoOpenAttempts++;
|
||||
if (autoOpenAttempts >= maxAutoOpenAttempts) {
|
||||
$('#divawal').show();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var boundIndex = matchedRow.boundindex;
|
||||
$('#gridpemeriksaan').jqxGrid('selectrow', boundIndex);
|
||||
$('#gridpemeriksaan').jqxGrid('ensurerowvisible', boundIndex);
|
||||
|
||||
setTimeout(function () {
|
||||
var button = findExpertiseButton(boundIndex);
|
||||
if (button.length) {
|
||||
hasOpenedTarget = true;
|
||||
button.trigger('click');
|
||||
return;
|
||||
}
|
||||
|
||||
autoOpenAttempts++;
|
||||
if (autoOpenAttempts >= maxAutoOpenAttempts) {
|
||||
$('#divawal').show();
|
||||
}
|
||||
}, 150);
|
||||
}
|
||||
|
||||
$('#gridpemeriksaan').off('bindingcomplete.mikro-expertise').on('bindingcomplete.mikro-expertise', function () {
|
||||
openFocusedPeriksa();
|
||||
});
|
||||
|
||||
$('#btnkembali2').off('click.mikro-expertise').on('click.mikro-expertise', function () {
|
||||
window.location.href = returnUrl;
|
||||
});
|
||||
|
||||
setInitialFilters();
|
||||
|
||||
setTimeout(function () {
|
||||
if (typeof openedpage === 'function') {
|
||||
openedpage();
|
||||
} else {
|
||||
$('#divawal').show();
|
||||
}
|
||||
}, 250);
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user