git add folder assets

This commit is contained in:
KhatamNugraha
2023-09-07 11:44:29 +07:00
parent 809925aacb
commit 0aa41f9f7a
2616 changed files with 28961 additions and 1 deletions

View File

@ -0,0 +1 @@
"use strict";var KTUsersUpdatePermissions=function(){const t=document.getElementById("kt_modal_update_role"),e=t.querySelector("#kt_modal_update_role_form"),n=new bootstrap.Modal(t);return{init:function(){(()=>{var o=FormValidation.formValidation(e,{fields:{role_name:{validators:{notEmpty:{message:"Role name is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}});t.querySelector('[data-kt-roles-modal-action="close"]').addEventListener("click",(t=>{t.preventDefault(),Swal.fire({text:"Are you sure you would like to close?",icon:"warning",showCancelButton:!0,buttonsStyling:!1,confirmButtonText:"Yes, close it!",cancelButtonText:"No, return",customClass:{confirmButton:"btn btn-primary",cancelButton:"btn btn-active-light"}}).then((function(t){t.value&&n.hide()}))})),t.querySelector('[data-kt-roles-modal-action="cancel"]').addEventListener("click",(t=>{t.preventDefault(),Swal.fire({text:"Are you sure you would like to cancel?",icon:"warning",showCancelButton:!0,buttonsStyling:!1,confirmButtonText:"Yes, cancel it!",cancelButtonText:"No, return",customClass:{confirmButton:"btn btn-primary",cancelButton:"btn btn-active-light"}}).then((function(t){t.value?(e.reset(),n.hide()):"cancel"===t.dismiss&&Swal.fire({text:"Your form has not been cancelled!.",icon:"error",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}))}));const i=t.querySelector('[data-kt-roles-modal-action="submit"]');i.addEventListener("click",(function(t){t.preventDefault(),o&&o.validate().then((function(t){console.log("validated!"),"Valid"==t?(i.setAttribute("data-kt-indicator","on"),i.disabled=!0,setTimeout((function(){i.removeAttribute("data-kt-indicator"),i.disabled=!1,Swal.fire({text:"Form has been successfully submitted!",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}}).then((function(t){t.isConfirmed&&n.hide()}))}),2e3)):Swal.fire({text:"Sorry, looks like there are some errors detected, please try again.",icon:"error",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}))}))})(),(()=>{const t=e.querySelector("#kt_roles_select_all"),n=e.querySelectorAll('[type="checkbox"]');t.addEventListener("change",(t=>{n.forEach((e=>{e.checked=t.target.checked}))}))})()}}}();KTUtil.onDOMContentLoaded((function(){KTUsersUpdatePermissions.init()}));

View File

@ -0,0 +1 @@
"use strict";var KTUsersViewRole=function(){var t,e,o=()=>{const r=e.querySelectorAll('[type="checkbox"]'),c=document.querySelector('[data-kt-view-roles-table-select="delete_selected"]');r.forEach((t=>{t.addEventListener("click",(function(){setTimeout((function(){n()}),50)}))})),c.addEventListener("click",(function(){Swal.fire({text:"Are you sure you want to delete selected customers?",icon:"warning",showCancelButton:!0,buttonsStyling:!1,confirmButtonText:"Yes, delete!",cancelButtonText:"No, cancel",customClass:{confirmButton:"btn fw-bold btn-danger",cancelButton:"btn fw-bold btn-active-light-primary"}}).then((function(c){c.value?Swal.fire({text:"You have deleted all selected customers!.",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn fw-bold btn-primary"}}).then((function(){r.forEach((e=>{e.checked&&t.row($(e.closest("tbody tr"))).remove().draw()}));e.querySelectorAll('[type="checkbox"]')[0].checked=!1})).then((function(){n(),o()})):"cancel"===c.dismiss&&Swal.fire({text:"Selected customers was not deleted.",icon:"error",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn fw-bold btn-primary"}})}))}))};const n=()=>{const t=document.querySelector('[data-kt-view-roles-table-toolbar="base"]'),o=document.querySelector('[data-kt-view-roles-table-toolbar="selected"]'),n=document.querySelector('[data-kt-view-roles-table-select="selected_count"]'),r=e.querySelectorAll('tbody [type="checkbox"]');let c=!1,l=0;r.forEach((t=>{t.checked&&(c=!0,l++)})),c?(n.innerHTML=l,t.classList.add("d-none"),o.classList.remove("d-none")):(t.classList.remove("d-none"),o.classList.add("d-none"))};return{init:function(){(e=document.querySelector("#kt_roles_view_table"))&&(e.querySelectorAll("tbody tr").forEach((t=>{const e=t.querySelectorAll("td"),o=moment(e[3].innerHTML,"DD MMM YYYY, LT").format();e[3].setAttribute("data-order",o)})),t=$(e).DataTable({info:!1,order:[],pageLength:5,lengthChange:!1,columnDefs:[{orderable:!1,targets:0},{orderable:!1,targets:4}]}),document.querySelector('[data-kt-roles-table-filter="search"]').addEventListener("keyup",(function(e){t.search(e.target.value).draw()})),e.querySelectorAll('[data-kt-roles-table-filter="delete_row"]').forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault();const o=e.target.closest("tr"),n=o.querySelectorAll("td")[1].innerText;Swal.fire({text:"Are you sure you want to delete "+n+"?",icon:"warning",showCancelButton:!0,buttonsStyling:!1,confirmButtonText:"Yes, delete!",cancelButtonText:"No, cancel",customClass:{confirmButton:"btn fw-bold btn-danger",cancelButton:"btn fw-bold btn-active-light-primary"}}).then((function(e){e.value?Swal.fire({text:"You have deleted "+n+"!.",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn fw-bold btn-primary"}}).then((function(){t.row($(o)).remove().draw()})):"cancel"===e.dismiss&&Swal.fire({text:customerName+" was not deleted.",icon:"error",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn fw-bold btn-primary"}})}))}))})),o())}}}();KTUtil.onDOMContentLoaded((function(){KTUsersViewRole.init()}));