mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-30 15:24:22 +00:00
61 lines
1.9 KiB
TypeScript
61 lines
1.9 KiB
TypeScript
"use client";
|
|
|
|
import { Card, CardBody, Divider } from "@nextui-org/react";
|
|
import { CircleUserRound } from "lucide-react";
|
|
|
|
import { DateWithTime, SnippetChip } from "@/components/ui/entities";
|
|
import { UserDataWithRoles } from "@/types/users/users";
|
|
|
|
const TenantIdCopy = ({ id }: { id: string }) => {
|
|
return (
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-sm font-semibold text-default-600">
|
|
Active organization ID:
|
|
</p>
|
|
<SnippetChip value={id} />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export const UserBasicInfoCard = ({
|
|
user,
|
|
tenantId,
|
|
}: {
|
|
user: UserDataWithRoles;
|
|
tenantId: string;
|
|
}) => {
|
|
const { name, email, company_name, date_joined } = user.attributes;
|
|
|
|
return (
|
|
<Card className="dark:bg-prowler-blue-400">
|
|
<CardBody>
|
|
<div className="space-y-3">
|
|
<CircleUserRound className="h-8 w-8" />
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-sm font-semibold text-default-600">Name:</p>
|
|
<span className="text-sm">{name}</span>
|
|
</div>
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-sm font-semibold text-default-600">Email:</p>
|
|
<span className="text-sm">{email}</span>
|
|
</div>
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-sm font-semibold text-default-600">Company:</p>
|
|
<span className="text-sm">{company_name}</span>
|
|
</div>
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-sm font-semibold text-default-600">
|
|
Date Joined:
|
|
</p>
|
|
<span className="text-sm">
|
|
<DateWithTime inline dateTime={date_joined} />
|
|
</span>
|
|
</div>
|
|
<Divider className="my-2" />
|
|
<TenantIdCopy id={tenantId} />
|
|
</div>
|
|
</CardBody>
|
|
</Card>
|
|
);
|
|
};
|