feat: assigned bookings per period (#17940)

* wip

* bring in users median status for selected range

* merge

* i18n

* routed to talbe period scroll x-y infinite

* insights i18n + hover card on user

* add search by name or email

* wip download button

* fix type error

* type fix

* type errors + status

* type error
This commit is contained in:
sean-brydon authored and GitHub committed 2024-12-11 08:12:06 +00:00
1 parent 931f3d3396
commit fc6e39c78a
13 files changed
+1101 -61

No files matched your search

@@ -0,0 +1,48 @@
import { TableNew, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@calcom/ui";
interface DataTableSkeletonProps {
columns: number;
rows?: number;
columnWidths?: number[];
}
export function DataTableSkeleton({ columns, rows = 10, columnWidths = [] }: DataTableSkeletonProps) {
return (
<div
className="grid h-[75dvh]"
style={{ gridTemplateRows: "auto 1fr auto", gridTemplateAreas: "'header' 'body' 'footer'" }}>
<div
className="scrollbar-thin border-subtle relative h-full overflow-auto rounded-md border"
style={{ gridArea: "body" }}>
<TableNew>
<TableHeader className="bg-subtle sticky top-0 z-10">
<TableRow>
{[...Array(columns)].map((_, index) => (
<TableHead key={`skeleton-header-${index}`}>
<div
className="bg-subtle h-4 animate-pulse rounded-md"
style={{ width: columnWidths[index] ? `${columnWidths[index]}px` : "200px" }}
/>
</TableHead>
))}
</TableRow>
</TableHeader>
<TableBody>
{[...Array(rows)].map((_, rowIndex) => (
<TableRow key={`skeleton-row-${rowIndex}`}>
{[...Array(columns)].map((_, colIndex) => (
<TableCell key={`skeleton-cell-${rowIndex}-${colIndex}`}>
<div
className="bg-subtle h-6 animate-pulse rounded-md"
style={{ width: columnWidths[colIndex] ? `${columnWidths[colIndex]}px` : "200px" }}
/>
</TableCell>
))}
</TableRow>
))}
</TableBody>
</TableNew>
</div>
</div>
);
}
@@ -4,4 +4,5 @@ export { DataTablePagination } from "./DataTablePagination";
export { DataTableFilters } from "./filters";
export { useFetchMoreOnBottomReached } from "./useFetchMoreOnBottomReached";
export { DataTable } from "./DataTable";
export { DataTableSkeleton } from "./DataTableSkeleton";
export type { DataTableProps } from "./DataTable";