This commit is contained in:
Dwi Swandhana
2026-07-19 21:25:03 +07:00
parent 4450076726
commit 335355a5ba
@@ -3,10 +3,16 @@
-->
@extends('dokter.ppdsdeveloper')
@push('script')
<script type="text/javascript">
$(function () {
var focusPeriksaId = @json((string) ($focusPeriksaId ?? ''));
@push('script')
<script type="text/javascript">
$(function () {
if (window.mikroExpertiseAutoOpenInitialized) {
console.warn('[mikro-expertise] duplicate script initialization skipped');
return;
}
window.mikroExpertiseAutoOpenInitialized = true;
var focusPeriksaId = @json((string) ($focusPeriksaId ?? ''));
var focusNoFoto = @json((string) ($focusNoFoto ?? ''));
var returnUrl = @json($expertiseReturnUrl ?? url('/'));
var shouldOpenOnLoad = @json((bool) ($openExpertiseOnLoad ?? false));
@@ -161,6 +167,8 @@
if (autoOpenAttempts >= maxAutoOpenAttempts) {
console.error('[mikro-expertise] openFocusedPeriksa:max attempts, showing divawal');
$('#divawal').show();
} else {
setTimeout(openFocusedPeriksa, 500);
}
return;
}
@@ -187,6 +195,8 @@
if (autoOpenAttempts >= maxAutoOpenAttempts) {
console.error('[mikro-expertise] openFocusedPeriksa:max trigger attempts, showing divawal');
$('#divawal').show();
} else {
setTimeout(openFocusedPeriksa, 500);
}
}, 150);
}
@@ -222,7 +232,12 @@
requestFilteredLoad();
});
$('#btnkembali2').off('click.mikro-expertise').on('click.mikro-expertise', function () {
setTimeout(function () {
console.log('[mikro-expertise] ready fallback load');
requestFilteredLoad();
}, 0);
$('#btnkembali2').off('click.mikro-expertise').on('click.mikro-expertise', function () {
window.location.href = returnUrl;
});
});