|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/demo.aadityaguptaclasses.com/resources/js/panel/ |
Upload File : |
(function () {
"use strict";
$('body').on('click', '.js-exchange-btn', function (e) {
e.preventDefault();
Swal.fire({
html: $('#exchangePointsModal').html(),
showCancelButton: false,
showConfirmButton: false,
customClass: {
content: 'p-0 text-left',
},
width: '28rem',
});
});
$('body').on('click', '.js-apply-exchange', function (e) {
const $this = $(this);
$this.addClass('loadingbar primary').prop('disabled', true);
$.post('/panel/rewards/exchange', {}, function (result) {
if (result && result.code === 200) {
Swal.fire({
title: exchangeSuccessAlertTitleLang,
text: exchangeSuccessAlertDescLang,
showConfirmButton: false,
icon: 'success',
});
setTimeout(() => {
window.location.reload();
}, 1000);
}
}).fail(err => {
Swal.fire({
title: exchangeErrorAlertTitleLang,
text: exchangeErrorAlertDescLang,
showConfirmButton: false,
icon: 'error',
});
});
});
})(jQuery);