@@ -43,6 +43,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
4343import { ButtonTooltip } from "@/components/ui/tooltip" ;
4444
4545import { CustomFieldData } from "./custom-fields-panel" ;
46+ import { type ItemPermission } from "./dataroom-link-sheet" ;
4647import DomainSection from "./domain-section" ;
4748import { LinkOptions } from "./link-options" ;
4849import TagSection from "./tags/tag-section" ;
@@ -89,6 +90,8 @@ export const DEFAULT_LINK_PROPS = (
8990 uploadFolderId : null ,
9091 uploadFolderName : "Home" ,
9192 enableIndexFile : false ,
93+ permissions : { } ,
94+ permissionGroupId : null ,
9295} ) ;
9396
9497export type DEFAULT_LINK_TYPE = {
@@ -129,6 +132,8 @@ export type DEFAULT_LINK_TYPE = {
129132 uploadFolderId : string | null ;
130133 uploadFolderName : string ;
131134 enableIndexFile : boolean ;
135+ permissions ?: ItemPermission | null ; // For dataroom links file permissions
136+ permissionGroupId ?: string | null ;
132137} ;
133138
134139export default function LinkSheet ( {
@@ -250,10 +255,8 @@ export default function LinkSheet({
250255 enableAgreement : preset . enableAgreement || prev . enableAgreement ,
251256 agreementId : preset . agreementId || prev . agreementId ,
252257 enableScreenshotProtection :
253- preset . enableScreenshotProtection ||
254- prev . enableScreenshotProtection ,
255- enableNotification :
256- ! ! preset . enableNotification ,
258+ preset . enableScreenshotProtection || prev . enableScreenshotProtection ,
259+ enableNotification : ! ! preset . enableNotification ,
257260 } ;
258261 } ) ;
259262
@@ -443,7 +446,7 @@ export default function LinkSheet({
443446
444447 return (
445448 < Sheet open = { isOpen } onOpenChange = { ( open : boolean ) => setIsOpen ( open ) } >
446- < SheetContent className = "flex w-[90%] flex-col justify-between border-l border-gray-200 bg-background px-4 text-foreground dark:border-gray-800 dark:bg-gray-900 sm:w-[600px ] sm:max-w-2xl md:px-5" >
449+ < SheetContent className = "flex w-[90%] flex-col justify-between border-l border-gray-200 bg-background px-4 text-foreground dark:border-gray-800 dark:bg-gray-900 sm:w-[800px ] sm:max-w-4xl md:px-5" >
447450 < SheetHeader className = "text-start" >
448451 < SheetTitle >
449452 { currentLink
@@ -458,7 +461,7 @@ export default function LinkSheet({
458461 >
459462 < ScrollArea className = "flex-grow" >
460463 < div className = "h-0 flex-1" >
461- < div className = "flex flex-1 flex-col justify-between" >
464+ < div className = "flex flex-1 flex-col justify-between pb-6 " >
462465 < div className = "divide-y divide-gray-200" >
463466 < Tabs
464467 value = { data . audienceType }
@@ -493,7 +496,7 @@ export default function LinkSheet({
493496
494497 < TabsContent value = { LinkAudienceType . GENERAL } >
495498 { /* GENERAL LINK */ }
496- < div className = "space-y-6 pb-10 pt-2" >
499+ < div className = "space-y-6 pt-2" >
497500 < div className = "space-y-2" >
498501 < Label htmlFor = "link-name" > Link Name</ Label >
499502 < Input
@@ -516,12 +519,6 @@ export default function LinkSheet({
516519 editLink = { ! ! currentLink }
517520 />
518521 </ div >
519- < div className = "space-y-2" >
520- < TagSection
521- { ...{ data, setData } }
522- teamId = { teamInfo ?. currentTeam ?. id as string }
523- />
524- </ div >
525522
526523 { /* Preset Selector - only show when creating a new link */ }
527524 { ! currentLink &&
@@ -582,7 +579,7 @@ export default function LinkSheet({
582579
583580 < TabsContent value = { LinkAudienceType . GROUP } >
584581 { /* GROUP LINK */ }
585- < div className = "space-y-6 pb-10 pt-2" >
582+ < div className = "space-y-6 pt-2" >
586583 < div className = "space-y-2" >
587584 < div className = "flex w-full items-center justify-between" >
588585 < Label htmlFor = "group-id" > Group </ Label >
@@ -672,12 +669,6 @@ export default function LinkSheet({
672669 editLink = { ! ! currentLink }
673670 />
674671 </ div >
675- < div className = "space-y-2" >
676- < TagSection
677- { ...{ data, setData } }
678- teamId = { teamInfo ?. currentTeam ?. id as string }
679- />
680- </ div >
681672
682673 { /* Preset Selector for Group links - only show when creating a new link */ }
683674 { ! currentLink &&
@@ -737,6 +728,15 @@ export default function LinkSheet({
737728 </ TabsContent >
738729 </ Tabs >
739730 </ div >
731+
732+ < Separator className = "mb-6 mt-2" />
733+
734+ < div className = "space-y-2" >
735+ < TagSection
736+ { ...{ data, setData } }
737+ teamId = { teamInfo ?. currentTeam ?. id as string }
738+ />
739+ </ div >
740740 </ div >
741741 </ div >
742742 </ ScrollArea >
0 commit comments