mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
fix: envelope cc issues (#2158)
This commit is contained in:
@ -336,7 +336,7 @@ export const EnvelopeDistributeDialog = ({
|
|||||||
<Trans>Message</Trans>{' '}
|
<Trans>Message</Trans>{' '}
|
||||||
<span className="text-muted-foreground">(Optional)</span>
|
<span className="text-muted-foreground">(Optional)</span>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger type="button">
|
||||||
<InfoIcon className="mx-2 h-4 w-4" />
|
<InfoIcon className="mx-2 h-4 w-4" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent className="text-muted-foreground p-4">
|
<TooltipContent className="text-muted-foreground p-4">
|
||||||
|
|||||||
@ -184,10 +184,10 @@ export const DocumentSigningPageViewV2 = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="embed--DocumentWidgetFooter">
|
<div className="embed--DocumentWidgetFooter mt-auto">
|
||||||
{/* Footer of left sidebar. */}
|
{/* Footer of left sidebar. */}
|
||||||
{!isEmbed && (
|
{!isEmbed && (
|
||||||
<div className="mt-auto px-4">
|
<div className="px-4">
|
||||||
<Button asChild variant="ghost" className="w-full justify-start">
|
<Button asChild variant="ghost" className="w-full justify-start">
|
||||||
<Link to="/">
|
<Link to="/">
|
||||||
<ArrowLeftIcon className="mr-2 h-4 w-4" />
|
<ArrowLeftIcon className="mr-2 h-4 w-4" />
|
||||||
|
|||||||
@ -616,13 +616,14 @@ export default function EnvelopeEditorFieldsPageRenderer() {
|
|||||||
transform: 'translateX(-50%)',
|
transform: 'translateX(-50%)',
|
||||||
zIndex: 50,
|
zIndex: 50,
|
||||||
}}
|
}}
|
||||||
className="text-muted-foreground grid w-max grid-cols-5 gap-x-1 gap-y-0.5 rounded-md border bg-white p-1 shadow-sm"
|
// Don't use darkmode for this component, it should look the same for both light/dark modes.
|
||||||
|
className="grid w-max grid-cols-5 gap-x-1 gap-y-0.5 rounded-md border border-gray-300 bg-white p-1 text-gray-500 shadow-sm"
|
||||||
>
|
>
|
||||||
{fieldButtonList.map((field) => (
|
{fieldButtonList.map((field) => (
|
||||||
<button
|
<button
|
||||||
key={field.type}
|
key={field.type}
|
||||||
onClick={() => createFieldFromPendingTemplate(pendingFieldCreation, field.type)}
|
onClick={() => createFieldFromPendingTemplate(pendingFieldCreation, field.type)}
|
||||||
className="hover:text-foreground col-span-1 w-full flex-shrink-0 rounded-sm px-2 py-1 text-xs hover:bg-gray-100"
|
className="col-span-1 w-full flex-shrink-0 rounded-sm px-2 py-1 text-xs hover:bg-gray-100 hover:text-gray-600"
|
||||||
>
|
>
|
||||||
{t(field.name)}
|
{t(field.name)}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -212,7 +212,7 @@ export const EnvelopeEditorRecipientForm = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const hasDocumentBeenSent = recipients.some(
|
const hasDocumentBeenSent = recipients.some(
|
||||||
(recipient) => recipient.sendStatus === SendStatus.SENT,
|
(recipient) => recipient.role !== RecipientRole.CC && recipient.sendStatus === SendStatus.SENT,
|
||||||
);
|
);
|
||||||
|
|
||||||
const canRecipientBeModified = (recipientId?: number) => {
|
const canRecipientBeModified = (recipientId?: number) => {
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
import type { Envelope, Recipient } from '@prisma/client';
|
import type { Envelope, Recipient } from '@prisma/client';
|
||||||
import { DocumentStatus, EnvelopeType, SendStatus, SigningStatus } from '@prisma/client';
|
import {
|
||||||
|
DocumentStatus,
|
||||||
|
EnvelopeType,
|
||||||
|
RecipientRole,
|
||||||
|
SendStatus,
|
||||||
|
SigningStatus,
|
||||||
|
} from '@prisma/client';
|
||||||
import { match } from 'ts-pattern';
|
import { match } from 'ts-pattern';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
@ -156,8 +162,9 @@ export const canEnvelopeItemsBeModified = (
|
|||||||
if (
|
if (
|
||||||
recipients.some(
|
recipients.some(
|
||||||
(recipient) =>
|
(recipient) =>
|
||||||
recipient.signingStatus === SigningStatus.SIGNED ||
|
recipient.role !== RecipientRole.CC &&
|
||||||
recipient.sendStatus === SendStatus.SENT,
|
(recipient.signingStatus === SigningStatus.SIGNED ||
|
||||||
|
recipient.sendStatus === SendStatus.SENT),
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -19,7 +19,7 @@ const TooltipContent = React.forwardRef<
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-popover text-popover-foreground animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md',
|
'bg-popover z-9999 text-popover-foreground animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
Reference in New Issue
Block a user