Skip to content

Commit

Permalink
Fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaShakthi97 committed Feb 19, 2024
1 parent 6231c66 commit 9f1a8b1
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -95,7 +95,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => {
};

const filterOutExistingGroupsFromAllGroups = (
allGroups: RolesInterface[],
allGroups: RolesInterface[],
existingGroups: ApplicationRoleGroupInterface[]
) => {
const filteredGroups: RolesInterface[] = [];
Expand All @@ -104,27 +104,27 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => {
allGroups.forEach((item: RolesInterface) => {
const itemIndex: number = existingGroups.findIndex(
(existingGroup: ApplicationRoleGroupInterface) => existingGroup?.name === item?.displayName);

// No matching index found.
if (itemIndex === -1) {
filteredGroups.push(item);
}
});

setGroupsList(filteredGroups);
setInitialGroupList(filteredGroups);
}
};

const assignGroupsToRole = () => {
const selectedGroups: ApplicationRoleGroupInterface[] = [];

tempGroupList.forEach((group: RolesInterface) => {
selectedGroups.push({
name: group.displayName
});
});

handleGroupAdd(selectedGroups);
};

Expand Down Expand Up @@ -172,7 +172,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => {
* The following method handles the onChange event of the
* checkbox field of an unassigned item.
*/
const handleUnassignedItemCheckboxChange = (group: RolesInterface) => {
const handleUnassignedItemCheckboxChange = (group: RolesInterface) => {
const checkedGroups: RolesInterface[] = [ ...checkedUnassignedListItems ];

if (checkedGroups?.includes(group)) {
Expand Down Expand Up @@ -231,7 +231,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => {
</Modal.Header>
<Modal.Content className="content-container" scrolling>
{
!isLoading
!isLoading
? (
<TransferComponent
selectionComponent
Expand Down Expand Up @@ -265,7 +265,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => {
style={ { height: "100%" } }
handleItemChange={ () => handleUnassignedItemCheckboxChange(group) }
key={ index }
listItem={ groupName?.length > 1
listItem={ groupName?.length > 1
? groupName[1] : group?.displayName }
listItemId={ group.id }
listItemIndex={ index }
Expand All @@ -282,7 +282,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => {
)
: (
<ContentLoader />
)
)
}
</Modal.Content>
<Modal.Actions>
Expand Down

0 comments on commit 9f1a8b1

Please sign in to comment.