Skip to content

Commit

Permalink
fix(page-members): add member column count (#1796)
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet authored Dec 19, 2024
1 parent c5246ab commit d9172a7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { memo, useEffect, useMemo, useRef } from 'react'
import { useParams } from 'react-router-dom'
import { ENVIRONMENT_LOGS_URL, ENVIRONMENT_STAGES_URL } from '@qovery/shared/routes'
import { Icon, Indicator, Link, LoaderSpinner, TablePrimitives } from '@qovery/shared/ui'
import { Icon, Indicator, Link, LoaderDots, TablePrimitives } from '@qovery/shared/ui'
import { HeaderPreCheckLogs } from '../header-pre-check-logs/header-pre-check-logs'
import { type EnvironmentPreCheckLogId, usePreCheckLogs } from '../hooks/use-pre-check-logs/use-pre-check-logs'
import { RowPreCheckLogs } from './row-pre-check-logs/row-pre-check-logs'
Expand Down Expand Up @@ -61,8 +61,9 @@ export function ListPreCheckLogs({ environment, environmentStatus, preCheckStage
return (
<div className="h-full p-1">
<HeaderPreCheckLogs preCheckStage={preCheckStage} />
<div className="flex h-[calc(100%-44px)] w-full justify-center border border-t-0 border-neutral-500 bg-neutral-600 pt-11">
<LoaderSpinner className="h-6 w-6" theme="dark" />
<div className="flex h-[calc(100%-44px)] w-full flex-col items-center justify-center gap-5 border border-t-0 border-neutral-500 bg-neutral-600 pt-11">
<LoaderDots />
<p className="text-neutral-300">Pre-check logs are loading…</p>
</div>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useEffect, useState } from 'react'
import { NeedHelp } from '@qovery/shared/assistant/feature'
import { MemberRoleEnum } from '@qovery/shared/enums'
import { Button, Heading, Icon, Section, Table, type TableFilterProps } from '@qovery/shared/ui'
import { pluralize } from '@qovery/shared/util-js'
import RowMember from './row-member/row-member'

export interface PageOrganizationMembersProps {
Expand All @@ -25,37 +26,6 @@ export interface PageOrganizationMembersProps {
onAddMember?: () => void
}

const membersHead = [
{
title: 'Member',
className: 'px-4 py-2 border-r border-neutral-200 h-full',
},
{
title: 'Roles',
filter: [
{
search: true,
title: 'Filter by role',
key: 'role_name',
},
],
},
{
title: 'Last activity',
className: 'px-4',
sort: {
key: 'last_activity_at',
},
},
{
title: 'Member since',
className: 'px-4',
sort: {
key: 'created_at',
},
},
]

const inviteMembersHead = [
{
title: 'Pending members',
Expand Down Expand Up @@ -93,6 +63,37 @@ export function PageOrganizationMembers(props: PageOrganizationMembersProps) {
resendInvite,
} = props

const membersHead = [
{
title: `${pluralize(members.length, 'Member', 'Members')} (${members.length})`,
className: 'px-4 py-2 border-r border-neutral-200 h-full',
},
{
title: 'Roles',
filter: [
{
search: true,
title: 'Filter by role',
key: 'role_name',
},
],
},
{
title: 'Last activity',
className: 'px-4',
sort: {
key: 'last_activity_at',
},
},
{
title: 'Member since',
className: 'px-4',
sort: {
key: 'created_at',
},
},
]

const columnsWidth = '35% 22% 21% 21%'

const [filterMembers, setFilterMembers] = useState<TableFilterProps[]>([])
Expand Down

0 comments on commit d9172a7

Please sign in to comment.