user akses
This commit is contained in:
Vendored
+4
@@ -9,6 +9,10 @@ body{
|
||||
font-family: "Ubuntu", "Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif;
|
||||
}
|
||||
|
||||
.navy-link, .breadcrumb-item a{
|
||||
color:navy !important;
|
||||
}
|
||||
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
padding: 0;
|
||||
|
||||
Vendored
+162
@@ -181,3 +181,165 @@ calculateDebt = () =>{
|
||||
$(document).on("change", ".calculate_field_debt", function(){
|
||||
calculateDebt();
|
||||
});
|
||||
|
||||
|
||||
$('.skpd_search').select2({
|
||||
placeholder: 'Pilih SKPD',
|
||||
ajax: {
|
||||
url: '/skpd-search',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('.prog_search').select2({
|
||||
placeholder: 'Pilih Program',
|
||||
ajax: {
|
||||
url: '/item-search-prog',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('.keg_search').select2({
|
||||
placeholder: 'Pilih Kegiatan',
|
||||
ajax: {
|
||||
url: '/item-search-keg',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('.sk_search').select2({
|
||||
placeholder: 'Pilih Sub Kegiatan',
|
||||
ajax: {
|
||||
url: '/item-search-sk',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('.rsk_search').select2({
|
||||
placeholder: 'Pilih Rinci Sub Kegiatan',
|
||||
ajax: {
|
||||
url: '/item-search-rsk',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click",".modalButton",function (e){
|
||||
$("#overlayLoader").removeClass("d-flex");
|
||||
$("#overlayLoader").addClass("d-flex");
|
||||
$('.modal-body').html("<table class='table table-striped' width='100%'><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr></table>");
|
||||
$(".modal-dialog").removeClass("modal-xl modal-lg")
|
||||
$(".modal-dialog").addClass($(this).attr("modal-target"));
|
||||
$('#modal-default')
|
||||
.modal('show')
|
||||
.find('.modal-body')
|
||||
.load($(this).attr('href'),function(){
|
||||
$("#overlayLoader").removeClass("d-flex");
|
||||
$("#overlayLoader").hide();
|
||||
});
|
||||
if ($(this).attr('title')!== null) {
|
||||
$('.modal-title').html($(this).attr('title'));
|
||||
}
|
||||
if ($(this).attr('size')!== null){
|
||||
$('.modal-dialog').addClass($(this).attr('size'));
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(document).on("submit",".form-delete",function (e){
|
||||
e.preventDefault();
|
||||
let test = Swal.fire({
|
||||
title: 'Data akan dihapus?',
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Ya',
|
||||
denyButtonText: "Tidak",
|
||||
icon: "warning",
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
e.currentTarget.submit();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var url = window.location;
|
||||
url = url + "";
|
||||
const allLinks = document.querySelectorAll('.nav-item a');
|
||||
// const currentLink = [...allLinks].filter(e => {
|
||||
// return url.indexOf(e.href) > -1) {
|
||||
// return e.href == url;
|
||||
// }
|
||||
// });
|
||||
let currentLink = "";
|
||||
allLinks.forEach((val, idx) => {
|
||||
if (url.indexOf(val.href) > -1){
|
||||
currentLink = val;
|
||||
}
|
||||
})
|
||||
|
||||
$(currentLink).addClass("active")
|
||||
$(".has-treeview").removeClass("menu-open active");
|
||||
$(currentLink).closest(".has-treeview").addClass("menu-open active");
|
||||
$($(currentLink).closest(".has-treeview")).children("a.nav-link").addClass("active");
|
||||
$($(currentLink).closest(".nav-treeview")).closest("li.nav-item").addClass("menu-open");
|
||||
$($(currentLink).closest(".nav-treeview")).parentsUntil(".nav-sidebar > .nav-treeview").addClass('menu-open');
|
||||
Reference in New Issue
Block a user