B2B-87: add company statistics consent (#29)
* B2B-87: add company statistics consent * add toggle for company statistics consent under profile * add toggle for company statistics consent under profile * add audit logging to accounts * change policy * add audit logging to accounts * remove full account data query and just query the entire account every time * add comment about consent toggle * make constants hardcoded, as dynamic ones do not work * add back pending check --------- Co-authored-by: Helena <helena@Helenas-MacBook-Pro.local>
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
export const SIDEBAR_WIDTH = '16rem';
|
||||
export const SIDEBAR_WIDTH_MOBILE = '18rem';
|
||||
export const SIDEBAR_WIDTH_ICON = '4rem';
|
||||
|
||||
export const SIDEBAR_WIDTH_PROPERTY = 'w-[16rem]';
|
||||
export const SIDEBAR_WIDTH_MOBILE_PROPERTY = 'w-[18rem]';
|
||||
export const SIDEBAR_WIDTH_ICON_PROPERTY = 'w-[4rem]';
|
||||
|
||||
@@ -32,8 +32,16 @@ const DialogContent: React.FC<
|
||||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
||||
customClose?: React.JSX.Element;
|
||||
preventAutoFocus?: boolean;
|
||||
disableClose?: boolean;
|
||||
}
|
||||
> = ({ className, children, customClose, preventAutoFocus, ...props }) => (
|
||||
> = ({
|
||||
className,
|
||||
children,
|
||||
customClose,
|
||||
disableClose,
|
||||
preventAutoFocus,
|
||||
...props
|
||||
}) => (
|
||||
<DialogPortal>
|
||||
<DialogOverlay />
|
||||
<DialogPrimitive.Content
|
||||
@@ -47,16 +55,26 @@ const DialogContent: React.FC<
|
||||
onCloseAutoFocus={
|
||||
preventAutoFocus ? (e) => e.preventDefault() : props.onOpenAutoFocus
|
||||
}
|
||||
onInteractOutside={
|
||||
disableClose ? (e) => e.preventDefault() : props.onInteractOutside
|
||||
}
|
||||
onPointerDownOutside={
|
||||
disableClose ? (e) => e.preventDefault() : props.onPointerDownOutside
|
||||
}
|
||||
onEscapeKeyDown={
|
||||
disableClose ? (e) => e.preventDefault() : props.onEscapeKeyDown
|
||||
}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs transition-opacity hover:opacity-70 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
|
||||
{customClose || (
|
||||
<>
|
||||
<Cross2Icon className="h-4 w-4" />
|
||||
<span className="sr-only">Close</span>
|
||||
</>
|
||||
)}
|
||||
{!disableClose &&
|
||||
(customClose || (
|
||||
<>
|
||||
<Cross2Icon className="h-4 w-4" />
|
||||
<span className="sr-only">Close</span>
|
||||
</>
|
||||
))}
|
||||
</DialogPrimitive.Close>
|
||||
</DialogPrimitive.Content>
|
||||
</DialogPortal>
|
||||
@@ -114,13 +132,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
||||
|
||||
export {
|
||||
Dialog,
|
||||
DialogPortal,
|
||||
DialogOverlay,
|
||||
DialogTrigger,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
DialogDescription,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogOverlay,
|
||||
DialogPortal,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user