$(document).ready(function() {

    let currentWindowPath = window.location.search;

    console.log(currentWindowPath);
    console.log('-----------------------------');

    $('.sidebar-content .nav-link').each(function () {

        if(currentWindowPath === '')  currentWindowPath = '/';

        console.log($(this).attr('href'));

        if (currentWindowPath == $(this).attr('href')) {
            $(this).addClass('active')
            $(this).parents('.nav-item-submenu').addClass('nav-item-open');
            $(this).parents('.nav-group-sub').css("display", "block");
        }
    });

})