From 9f1a8b1fcd3fa5a69d39e0fa6706a50bdaccd74c Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 19 Feb 2024 22:38:33 +0530 Subject: [PATCH] Fix lint issue --- .../components/assign-group-wizard.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/console/src/features/application-roles/components/assign-group-wizard.tsx b/apps/console/src/features/application-roles/components/assign-group-wizard.tsx index 5992e95aa24..eb515b07225 100644 --- a/apps/console/src/features/application-roles/components/assign-group-wizard.tsx +++ b/apps/console/src/features/application-roles/components/assign-group-wizard.tsx @@ -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 @@ -95,7 +95,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => { }; const filterOutExistingGroupsFromAllGroups = ( - allGroups: RolesInterface[], + allGroups: RolesInterface[], existingGroups: ApplicationRoleGroupInterface[] ) => { const filteredGroups: RolesInterface[] = []; @@ -104,13 +104,13 @@ 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); } @@ -118,13 +118,13 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => { const assignGroupsToRole = () => { const selectedGroups: ApplicationRoleGroupInterface[] = []; - + tempGroupList.forEach((group: RolesInterface) => { selectedGroups.push({ name: group.displayName }); }); - + handleGroupAdd(selectedGroups); }; @@ -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)) { @@ -231,7 +231,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => { { - !isLoading + !isLoading ? ( { 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 } @@ -282,7 +282,7 @@ const AssignGroupWizard = (props: AssignGroupProps): ReactElement => { ) : ( - ) + ) }