mirror of
https://github.com/hanzo-apps/dataroom.git
synced 2026-11-02 22:04:20 +00:00
This feature allows users to set a private, internal name for Data Rooms that is only visible to the owner. This helps distinguish between multiple data rooms that share the same public-facing name. Changes: - Add internalName field to Dataroom schema - Create database migration for the new field - Update API endpoints to support creating/updating internal names - Search now includes internal names - Update add-dataroom-modal with internal name input - Display internal name in dataroom cards and headers - Add internal name form in settings page
51 lines
1.8 KiB
TypeScript
51 lines
1.8 KiB
TypeScript
import { DataroomHeader } from "@/components/datarooms/dataroom-header";
|
|
import { DataroomNavigation } from "@/components/datarooms/dataroom-navigation";
|
|
import { GroupHeader } from "@/components/datarooms/groups/group-header";
|
|
import { GroupNavigation } from "@/components/datarooms/groups/group-navigation";
|
|
import AppLayout from "@/components/layouts/app";
|
|
import DataroomVisitorsTable from "@/components/visitors/dataroom-visitors-table";
|
|
|
|
import { useDataroom } from "@/lib/swr/use-dataroom";
|
|
import { useDataroomGroup } from "@/lib/swr/use-dataroom-groups";
|
|
|
|
export default function DataroomGroupPage() {
|
|
const { dataroom } = useDataroom();
|
|
const { viewerGroup } = useDataroomGroup();
|
|
|
|
if (!dataroom || !viewerGroup) {
|
|
return <div>Loading...</div>;
|
|
}
|
|
|
|
return (
|
|
<AppLayout>
|
|
<div className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
|
|
<header>
|
|
<DataroomHeader
|
|
title={dataroom.name}
|
|
description={dataroom.pId}
|
|
internalName={dataroom.internalName}
|
|
actions={[]}
|
|
/>
|
|
|
|
<DataroomNavigation dataroomId={dataroom.id} />
|
|
</header>
|
|
|
|
<GroupHeader dataroomId={dataroom.id} groupName={viewerGroup.name} />
|
|
<div className="mx-auto grid w-full items-start gap-6 md:grid-cols-[180px_1fr] lg:grid-cols-[250px_1fr]">
|
|
<GroupNavigation
|
|
dataroomId={dataroom.id}
|
|
viewerGroupId={viewerGroup?.id!}
|
|
/>
|
|
<div className="grid gap-6">
|
|
<DataroomVisitorsTable
|
|
dataroomId={dataroom.id}
|
|
groupId={viewerGroup.id}
|
|
name={viewerGroup.name}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</AppLayout>
|
|
);
|
|
}
|