d.length == 0) {
            showModalDialog("modal0", "Error", "Please select a group.");
            return;
        } else {
            const isGroupAssigned = assignedGroups.some((group) => group.id === groupId);
            if (isGroupAssigned) {
                showModalDialog("modal0", "Error", "The group is already in the list.");
                return;
            }

            assignedGroups.push({
                "id": groupId,
                "groupIdentifier": groupsSelect.options[groupsSele