B2B-30: rename teams and members to companies and employees

This commit is contained in:
devmc-ee
2025-06-15 10:28:26 +03:00
parent 05a512a942
commit 9d869becaa
19 changed files with 285 additions and 323 deletions

View File

@@ -149,7 +149,7 @@ async function PersonalAccountPage(props: { account: Account }) {
<SubscriptionsTable accountId={props.account.id} />
<div className={'divider-divider-x flex flex-col gap-y-2.5'}>
<Heading level={6}>Teams</Heading>
<Heading level={6}>Companies</Heading>
<div>
<AdminMembershipsTable memberships={memberships} />
@@ -205,16 +205,15 @@ async function TeamAccountPage(props: {
</span>
</div>
<Badge variant={'outline'}>Team Account</Badge>
<Badge variant={'outline'}>Company Account</Badge>
</div>
</div>
<div>
<div className={'flex flex-col gap-y-8'}>
<SubscriptionsTable accountId={props.account.id} />
<div className={'flex flex-col gap-y-2.5'}>
<Heading level={6}>Team Members</Heading>
<Heading level={6}>Company Employees</Heading>
<AdminMembersTable members={members} />
</div>

View File

@@ -132,7 +132,7 @@ function AccountsTableFilters(props: {
<SelectLabel>Account Type</SelectLabel>
<SelectItem value={'all'}>All accounts</SelectItem>
<SelectItem value={'team'}>Team</SelectItem>
<SelectItem value={'team'}>Company</SelectItem>
<SelectItem value={'personal'}>Personal</SelectItem>
</SelectGroup>
</SelectContent>
@@ -183,7 +183,7 @@ function getColumns(): ColumnDef<Account>[] {
id: 'type',
header: 'Type',
cell: ({ row }) => {
return row.original.is_personal_account ? 'Personal' : 'Team';
return row.original.is_personal_account ? 'Personal' : 'Company';
},
},
{
@@ -248,7 +248,7 @@ function getColumns(): ColumnDef<Account>[] {
<If condition={!isPersonalAccount}>
<AdminDeleteAccountDialog accountId={row.original.id}>
<DropdownMenuItem onSelect={(e) => e.preventDefault()}>
Delete Team Account
Delete Company Account
</DropdownMenuItem>
</AdminDeleteAccountDialog>
</If>

View File

@@ -36,10 +36,10 @@ export async function AdminDashboard() {
<Card>
<CardHeader>
<CardTitle>Team Accounts</CardTitle>
<CardTitle>Company Accounts</CardTitle>
<CardDescription>
The number of team accounts that have been created.
The number of company accounts that have been created.
</CardDescription>
</CardHeader>
@@ -49,43 +49,6 @@ export async function AdminDashboard() {
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Paying Customers</CardTitle>
<CardDescription>
The number of paying customers with active subscriptions.
</CardDescription>
</CardHeader>
<CardContent>
<div className={'flex justify-between'}>
<Figure>{data.subscriptions}</Figure>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Trials</CardTitle>
<CardDescription>
The number of trial subscriptions currently active.
</CardDescription>
</CardHeader>
<CardContent>
<div className={'flex justify-between'}>
<Figure>{data.trials}</Figure>
</div>
</CardContent>
</Card>
<div>
<p className={'text-muted-foreground w-max text-xs'}>
The above data is estimated and may not be 100% accurate.
</p>
</div>
</div>
);
}

View File

@@ -52,7 +52,7 @@ function getColumns(): ColumnDef<Memberships>[] {
{
header: 'Role',
cell: ({ row }) => {
return row.original.role;
return row.original.role === 'owner' ? 'HR' : 'Employee';
},
},
{