Skip to content

Commit

Permalink
fix issue with Select Group and Role
Browse files Browse the repository at this point in the history
  • Loading branch information
DAcodedBEAT committed Dec 31, 2023
1 parent 7884a00 commit e6c99c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/skin/js/CRMJSOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ window.CRM.groups = {
window.CRM.groups
.getRoles(selectOptions.GroupID)
.done(function (rdata) {
rolesList = $.map(rdata.ListOptions, function (item) {
rolesList = $.map(rdata, function (item) {
var o = {
text: i18next.t(item.OptionName), // to translate the Teacher and Student in localize text
id: item.OptionId,
Expand Down Expand Up @@ -426,7 +426,7 @@ window.CRM.groups = {
bootbox.dialog(options).init(initFunction).show();

window.CRM.groups.get().done(function (rdata) {
groupsList = $.map(rdata.Groups, function (item) {
groupsList = $.map(rdata, function (item) {
var o = {
text: item.Name,
id: item.Id,
Expand All @@ -442,14 +442,14 @@ window.CRM.groups = {

$groupSelect2.on("select2:select", function (e) {
var targetGroupId = $(
"#targetGroupSelection option:selected",
"#targetGroupSelection option:selected"
).val();
$parent = $("#targetRoleSelection").parent();
$("#targetRoleSelection").empty();
window.CRM.groups
.getRoles(targetGroupId)
.done(function (rdata) {
rolesList = $.map(rdata.ListOptions, function (item) {
rolesList = $.map(rdata, function (item) {
var o = {
text: i18next.t(item.OptionName), // this is for the Teacher and Student role
id: item.OptionId,
Expand Down

0 comments on commit e6c99c9

Please sign in to comment.