Skip to content

The Open Source DocuSign Alternative.

Merge branch 'main' into feat/separate-document-page

David Nguyen48321f2f62c2
diff --cc apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx
index ff2291c54,4bcb25a6c..5bfd85645
--- a/apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx
+++ b/apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx
@@@ -108,88 -108,86 +108,86 @@@ export const ResendDocumentActionItem
};
return (
- <>
- <Dialog open={isOpen} onOpenChange={setIsOpen}>
- <DialogTrigger asChild>
- <DropdownMenuItem disabled={isDisabled} onSelect={(e) => e.preventDefault()}>
- <History className="mr-2 h-4 w-4" />
- Resend
- </DropdownMenuItem>
- </DialogTrigger>
-
- <DialogContent className="sm:max-w-sm" hideClose>
- <DialogHeader>
- <DialogTitle asChild>
- <h1 className="text-center text-xl">Who do you want to remind?</h1>
- </DialogTitle>
- </DialogHeader>
-
- <Form {...form}>
- <form id={FORM_ID} onSubmit={handleSubmit(onFormSubmit)} className="px-3">
- <FormField
- control={form.control}
- name="recipients"
- render={({ field: { value, onChange } }) => (
- <>
- {recipients.map((recipient) => (
- <FormItem
- key={recipient.id}
- className="flex flex-row items-center justify-between gap-x-3"
+ <Dialog open={isOpen} onOpenChange={setIsOpen}>
+ <DialogTrigger asChild>
+ <DropdownMenuItem disabled={isDisabled} onSelect={(e) => e.preventDefault()}>
+ <History className="mr-2 h-4 w-4" />
+ Resend
+ </DropdownMenuItem>
+ </DialogTrigger>
+
+ <DialogContent className="sm:max-w-sm" hideClose>
+ <DialogHeader>
- <DialogTitle>
++ <DialogTitle asChild>
+ <h1 className="text-center text-xl">Who do you want to remind?</h1>
+ </DialogTitle>
+ </DialogHeader>
+
+ <Form {...form}>
+ <form id={FORM_ID} onSubmit={handleSubmit(onFormSubmit)} className="px-3">
+ <FormField
+ control={form.control}
+ name="recipients"
+ render={({ field: { value, onChange } }) => (
+ <>
+ {recipients.map((recipient) => (
+ <FormItem
+ key={recipient.id}
+ className="flex flex-row items-center justify-between gap-x-3"
+ >
+ <FormLabel
+ className={cn('my-2 flex items-center gap-2 font-normal', {
+ 'opacity-50': !value.includes(recipient.id),
+ })}
>
- <FormLabel
- className={cn('my-2 flex items-center gap-2 font-normal', {
- 'opacity-50': !value.includes(recipient.id),
- })}
- >
- <StackAvatar
- key={recipient.id}
- type={getRecipientType(recipient)}
- fallbackText={recipientAbbreviation(recipient)}
- />
- {recipient.email}
- </FormLabel>
-
- <FormControl>
- <Checkbox
- className="h-5 w-5 rounded-full data-[state=checked]:border-black data-[state=checked]:bg-black "
- checkClassName="text-white"
- value={recipient.id}
- checked={value.includes(recipient.id)}
- onCheckedChange={(checked: boolean) =>
- checked
- ? onChange([...value, recipient.id])
- : onChange(value.filter((v) => v !== recipient.id))
- }
- />
- </FormControl>
- </FormItem>
- ))}
- </>
- )}
- />
- </form>
- </Form>
-
- <DialogFooter>
- <div className="flex w-full flex-1 flex-nowrap gap-4">
- <DialogClose asChild>
- <Button
- type="button"
- className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
- variant="secondary"
- disabled={isSubmitting}
- >
- Cancel
- </Button>
- </DialogClose>
-
- <Button className="flex-1" loading={isSubmitting} type="submit" form={FORM_ID}>
- Send reminder
+ <StackAvatar
+ key={recipient.id}
+ type={getRecipientType(recipient)}
+ fallbackText={recipientAbbreviation(recipient)}
+ />
+ {recipient.email}
+ </FormLabel>
+
+ <FormControl>
+ <Checkbox
+ className="h-5 w-5 rounded-full data-[state=checked]:border-black data-[state=checked]:bg-black "
+ checkClassName="text-white"
+ value={recipient.id}
+ checked={value.includes(recipient.id)}
+ onCheckedChange={(checked: boolean) =>
+ checked
+ ? onChange([...value, recipient.id])
+ : onChange(value.filter((v) => v !== recipient.id))
+ }
+ />
+ </FormControl>
+ </FormItem>
+ ))}
+ </>
+ )}
+ />
+ </form>
+ </Form>
+
+ <DialogFooter>
+ <div className="flex w-full flex-1 flex-nowrap gap-4">
+ <DialogClose asChild>
+ <Button
+ type="button"
+ className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
+ variant="secondary"
+ disabled={isSubmitting}
+ >
+ Cancel
</Button>
- </div>
- </DialogFooter>
- </DialogContent>
- </Dialog>
- </>
+ </DialogClose>
+
+ <Button className="flex-1" loading={isSubmitting} type="submit" form={FORM_ID}>
+ Send reminder
+ </Button>
+ </div>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
);
};
diff --cc packages/lib/constants/feature-flags.ts
index 6815b73b0,d33db549e..ac476bc70
--- a/packages/lib/constants/feature-flags.ts
+++ b/packages/lib/constants/feature-flags.ts
@@@ -16,9 -21,7 +21,9 @@@ export const FEATURE_FLAG_POLL_INTERVA
* Does not take any person or group properties into account.
*/
export const LOCAL_FEATURE_FLAGS: Record<string, boolean> = {
- app_billing: process.env.NEXT_PUBLIC_FEATURE_BILLING_ENABLED === 'true',
+ app_billing: NEXT_PUBLIC_FEATURE_BILLING_ENABLED() === 'true',
+ app_teams: true,
+ app_document_page_view_history_sheet: false,
marketing_header_single_player_mode: false,
} as const;
diff --cc packages/lib/server-only/document/delete-document.ts
index 473177b9b,a5cf96cdd..5974be3f0
--- a/packages/lib/server-only/document/delete-document.ts
+++ b/packages/lib/server-only/document/delete-document.ts
@@@ -8,10 -8,8 +8,11 @@@ import DocumentCancelTemplate from '@do
import { prisma } from '@documenso/prisma';
import { DocumentStatus } from '@documenso/prisma/client';
+ import { NEXT_PUBLIC_WEBAPP_URL } from '../../constants/app';
import { FROM_ADDRESS, FROM_NAME } from '../../constants/email';
+import { DOCUMENT_AUDIT_LOG_TYPE } from '../../types/document-audit-logs';
+import type { RequestMetadata } from '../../universal/extract-request-metadata';
+import { createDocumentAuditLogData } from '../../utils/document-audit-logs';
export type DeleteDocumentOptions = {
id: number;