HEX
Server: LiteSpeed
System: Linux sv4.hami.host 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: armgroup (1008)
PHP: 8.2.32
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, mail, socket_create, socket_create_listen, socket_create_pair, link, dl, openlog, syslog, stream_socket_server, curl_multi_init
Upload Files
File: /home/armgroup/public_html/store/js/admin-custom.js
window.addEventListener('showIziToast', event => {
    iziToast[event.detail.status]({
        message: event.detail.message,
        title: event.detail.title,
        position: event.detail.position,
    });
});

$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});

function setDefaultChartJsOptions(title = null, beginAtZero = false, displayLegend = true, numberFormat = false, stacked = true, fontFamily = 'Vazir') {
    return {
        title: {
            display: title ? true : false,
            text: title,
            fontSize: 18,
            fontFamily: fontFamily,
        },
        scales: {
            yAxes: [{
                stacked: stacked,
                ticks: {
                    beginAtZero: beginAtZero,
                    fontFamily: fontFamily,
                    callback: function(value, index, values) {
                        return numberFormat ? value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") : value;
                    }
                }
            }],
            xAxes: [{
                stacked: stacked,
                ticks: {
                    fontFamily: fontFamily
                }
            }]
        },
        legend: {
            display: displayLegend,
            position: 'bottom',
            labels: {
                fontFamily: fontFamily
            }
        },
        tooltips: {
            titleFontFamily: fontFamily,
            bodyFontFamily: fontFamily,
            footerFontFamily: fontFamily,
            callbacks: {
                label: function(tooltipItem, data) {
                    var label = data.datasets[tooltipItem.datasetIndex].label || '';

                    if (label) {
                        label += ': ';
                    }
                    if(numberFormat)
                        label += (Math.round(tooltipItem.yLabel * 100) / 100).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
                    else
                        label += Math.round(tooltipItem.yLabel * 100) / 100;

                    return label;
                }
            }
        },
    }
}

$(document).on('click', '.toggle-password', function () {
    $(this).toggleClass("fa-eye fa-eye-slash");
    var input = $($(this).attr("toggle"));
    if (input.attr("type") == "password") {
        input.attr("type", "text");
    } else {
        input.attr("type", "password");
    }
});