Skip to content

Commit

Permalink
Merge pull request wso2#4572 from Achintha444/master
Browse files Browse the repository at this point in the history
Fix alignment issue in sub0org invited user list page
  • Loading branch information
Achintha Isuru authored Nov 13, 2023
2 parents 5fa8f22 + 64939d2 commit 2deaf1e
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 31 deletions.
7 changes: 7 additions & 0 deletions .changeset/olive-eels-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@wso2is/console": patch
"@wso2is/myaccount": patch
"@wso2is/theme": patch
---

Fix alignment issue in sub0org invited user list page
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export const AdvanceForm: FunctionComponent<AdvanceFormPropsInterface> = forward
listen={ (value: string) => setSelfSignUpURL(value) }
width={ 16 }
data-testid={ `${ componentId }-self-signup-url` }
validation={ validateTemplatableURLs }
/>
</Form>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ import { hasRequiredScopes } from "@wso2is/core/helpers";
import { AlertLevels, IdentifiableComponentInterface, TestableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
import {
AnimatedAvatar,
AppAvatar,
ConfirmationModal,
DataTable,
EmptyPlaceholder,
LinkButton,
TableColumnInterface
TableColumnInterface,
UserAvatar
} from "@wso2is/react-components";
import { AxiosError } from "axios";
import React, { FunctionComponent, ReactElement, SyntheticEvent, useState } from "react";
Expand All @@ -36,11 +35,11 @@ import { Dispatch } from "redux";
import { Header, SemanticICONS } from "semantic-ui-react";
import { deleteInvite, resendInvite } from "../../../../../extensions/components/users/api";
import { InvitationStatus } from "../../../../../extensions/components/users/models";
import {
AppState,
FeatureConfigInterface,
UserListInterface,
getEmptyPlaceholderIllustrations
import {
AppState,
FeatureConfigInterface,
UserListInterface,
getEmptyPlaceholderIllustrations
} from "../../../../core";
import { UserAccountTypesMain } from "../../../constants";
import { deleteParentOrgInvite } from "../api/invite";
Expand Down Expand Up @@ -305,19 +304,18 @@ export const GuestUsersList: FunctionComponent<GuestUsersListInterface> = (
id: "email",
key: 0,
render: (invite: UserInviteInterface) => (
<Header as="h6" image>
<AppAvatar
image={ (
<AnimatedAvatar
name={ invite.email }
size="mini"
data-componentid={ `${ componentId }-item-image-inner` }
/>
) }
<Header
image
as="h6"
className="header-with-icon"
data-componentid={ `${ componentId }-item-image` }
>
<UserAvatar
data-componentid={ `${ componentId }-item-image-inner` }
name={ invite.email }
size="mini"
image={ invite.email }
spaced="right"
data-componentid={ `${ componentId }-item-image` }
data-suppress=""
/>
<Header.Content>
{ userTypeSelection === UserAccountTypesMain.EXTERNAL
Expand All @@ -337,7 +335,15 @@ export const GuestUsersList: FunctionComponent<GuestUsersListInterface> = (
render: (invite: UserInviteInterface) => {
const status: string = invite.status;

return status.charAt(0).toUpperCase() + status.substr(1).toLowerCase();
return (
<Header as="h6" data-componentid={ `${ componentId }-invite-status` }>
<Header.Content>
<Header.Subheader>
{ status.charAt(0).toUpperCase() + status.slice(1).toLowerCase() }
</Header.Subheader>
</Header.Content>
</Header>
);
},
textAlign: "left",
title: "Invitation Status"
Expand All @@ -359,10 +365,9 @@ export const GuestUsersList: FunctionComponent<GuestUsersListInterface> = (
<>
<DataTable<UserInviteInterface>
showSearch={ true }
padded
isLoading={ isGuestUsersRequestLoading }
loadingStateOptions={
{ count: 5, imageType: "square" }
{ count: 5, imageType: "circular" }
}
placeholders={
showPlaceholders()
Expand Down Expand Up @@ -400,7 +405,7 @@ export const GuestUsersList: FunctionComponent<GuestUsersListInterface> = (
data={ guestUsersList }
columns={ resolveTableColumns() }
onRowClick={ null }
showHeader={ true }
showHeader={ false }
transparent={ !isGuestUsersRequestLoading && (showPlaceholders() !== null) }
/>
{
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/features/users/components/users-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export const UsersList: React.FunctionComponent<UsersListProps> = (props: UsersL
spaced="right"
/>
<Header.Content>
<div className={ isNameAvailable ? "mt-2" : "" }>{ header as ReactNode }</div>
<div>{ header as ReactNode }</div>
{
(!isNameAvailable) &&
(
Expand Down
11 changes: 4 additions & 7 deletions apps/console/src/features/users/pages/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ const UsersPage: FunctionComponent<UsersPageInterface> = (
return (
<ListLayout
// TODO add sorting functionality.
className="mt-5"
className="sub-org-users-list"
advancedSearch={ advancedSearchFilter() }
currentListSize={ usersList.itemsPerPage }
listItemLimit={ listItemLimit }
Expand Down Expand Up @@ -926,17 +926,13 @@ const UsersPage: FunctionComponent<UsersPageInterface> = (

panes.push({
componentId: "users",
menuItem: {
content: t("console:manage.features.parentOrgInvitations.tab.usersTab")
},
menuItem: t("console:manage.features.parentOrgInvitations.tab.usersTab"),
render: renderUsersList
});

panes.push({
componentId: "invitations",
menuItem: {
content: t("console:manage.features.parentOrgInvitations.tab.invitationsTab")
},
menuItem: t("console:manage.features.parentOrgInvitations.tab.invitationsTab"),
render: renderInvitationsList
});

Expand All @@ -946,6 +942,7 @@ const UsersPage: FunctionComponent<UsersPageInterface> = (
const renderInvitationsList = (): ReactElement => {
return (
<ListLayout
className="sub-org-users-list"
advancedSearch={ advancedSearchFilter() }
currentListSize={ usersList?.itemsPerPage }
listItemLimit={ listItemLimit }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1993,3 +1993,11 @@
padding: 0;
}
}

/*-------------------
Users List
---------------------*/

.sub-org-users-list {
margin-top: 28px;
}

0 comments on commit 2deaf1e

Please sign in to comment.