$(document).ready((function(){$(document).on("click","#is_change_password",(function(e){$(e.currentTarget).is(":checked")?$("input[type=password]").closest(".form-group").removeClass("hidden").fadeIn():$("input[type=password]").closest(".form-group").addClass("hidden").fadeOut()})),$(document).on("click",".btn-trigger-add-credit",(function(e){e.preventDefault(),$("#add-credit-modal").modal("show")})),$("#confirm-add-credit-button").closest(".modal-content").find("form").prop("action"),$(document).on("click","#confirm-add-credit-button",(function(e){e.preventDefault();var o=$(e.currentTarget);o.addClass("button-loading"),$.ajax({type:"POST",cache:!1,url:o.closest(".modal-content").find("form").prop("action"),data:o.closest(".modal-content").find("form").serialize(),success:function(e){e.error?Botble.showNotice("error",e.message):(Botble.showNotice("success",e.message),$("#add-credit-modal").modal("hide"),$("#credit-histories").load($(".page-content form").prop("action")+" #credit-histories > *")),o.removeClass("button-loading")},error:function(e){Botble.handleError(e),o.removeClass("button-loading")}})})),$(document).on("click",".show-timeline-dropdown",(function(e){e.preventDefault(),$($(e.currentTarget).data("target")).slideToggle(),$(e.currentTarget).closest(".comment-log-item").toggleClass("bg-white")}))}));
