DOMContentLoaded", function () {
        refreshGroupsTable();

        const btnSave = document.getElementById("btnSave");
        btnSave.addEventListener("click", function (evt) {
            btnSaveClick(evt);
        });
    });

    function btnSaveClick(evt) {
        evt.preventDefault();

        const loadingIcon = document.getElementById("loadingIcon");

        let assignedGroupsIds = [];
        assignedGroups.forEach(function (assignedGroup) {
            assignedGroupsIds.push(parseInt(assign