@ieeesa-npm/groups 0.13.5 → 0.13.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -416,6 +416,7 @@ var GroupRosterType;
416
416
  (function (GroupRosterType) {
417
417
  GroupRosterType["INDIVIDUAL"] = "Individual";
418
418
  GroupRosterType["SYSTEM_USER"] = "User";
419
+ GroupRosterType["ENTITY"] = "Entity";
419
420
  })(GroupRosterType || (GroupRosterType = {}));
420
421
 
421
422
  /* eslint-disable no-unused-vars */
@@ -1164,7 +1165,10 @@ class GroupsService {
1164
1165
  * @memberof GroupsService
1165
1166
  */
1166
1167
  getBusinessRuleOfSelectedGroup() {
1167
- return this.getLoadedGroupTypes()?.find((group) => group?.configFieldId === this.getSelectedGroupInfo()?.groupType)?.configFieldValue?.businessRule;
1168
+ const businessRule = this.getLoadedGroupTypes()?.find((group) => group?.configFieldId === this.getSelectedGroupInfo()?.groupType)?.configFieldValue?.businessRule;
1169
+ if (businessRule?.rosterType === GroupRosterType.ENTITY)
1170
+ businessRule.rosterType = GroupRosterType.INDIVIDUAL;
1171
+ return businessRule;
1168
1172
  }
1169
1173
  /**
1170
1174
  * Enables or disables the form submit button based on passed parameters.
@@ -2668,13 +2672,7 @@ class EditUserRolesComponent {
2668
2672
  */
2669
2673
  onEditUserRoleFormSubmit(form) {
2670
2674
  form[0]?.markAllAsTouched();
2671
- const isAllOtherControlsValid = Object.keys(form[0].controls)
2672
- .filter((controlName) => controlName !== 'representingOrg')
2673
- .every((controlName) => form[0].get(controlName)?.status === FormStatus?.VALID);
2674
- if ((form[0].get('representingOrg')?.status === FormStatus?.INVALID &&
2675
- isAllOtherControlsValid &&
2676
- this.representingOrganizations.length > 0) ||
2677
- form[0].status === FormStatus?.VALID) {
2675
+ if (form[0].status === FormStatus?.VALID) {
2678
2676
  this.groupsService
2679
2677
  .editGroupsUserRole(this.getEditUserRolePayload(form[0]?.getRawValue()))
2680
2678
  .pipe(takeUntil(this.destroy$))
@@ -3373,13 +3371,7 @@ class AddUserRosterComponent {
3373
3371
  */
3374
3372
  onAddUserFormSubmit(form) {
3375
3373
  form[0]?.markAllAsTouched();
3376
- const isAllOtherControlsValid = Object.keys(form[0].controls)
3377
- .filter((controlName) => controlName !== 'representingOrg')
3378
- .every((controlName) => form[0].get(controlName)?.status === FormStatus?.VALID);
3379
- if ((form[0].get('representingOrg')?.status === FormStatus?.INVALID &&
3380
- isAllOtherControlsValid &&
3381
- this.selectedOrganizations.length > 0) ||
3382
- form[0].status === FormStatus?.VALID) {
3374
+ if (form[0].status === FormStatus.VALID) {
3383
3375
  this.groupService
3384
3376
  .addNewGroupUser(this.getAddNewUserPayload(form[0]?.getRawValue()))
3385
3377
  .pipe(takeUntil$1(this.destroy$))