<script>
    $(function() {
        restore_detail("laporan", list_datatable);
    });

    function list_datatable(view = "home", e = "") {
        var load_url = "";
        if (view === "home") {
            load_url = "<?= route('kpi.laporan.view_home') ?>";
        } else {
            let id = "";
            if(typeof(e) == "object") {
                id =  $(e).attr('id');
            } else {
                id = e;
            }
            load_url = "<?= route('kpi.laporan.detail.view.detail') ?>" + "/" + id;
        }

        return $.get(load_url, function(data) {
            $("#div_laporan_kpi").html(data);
        });

    }
</script>

<div id="div_laporan_kpi" class="mt-2"></div>