forked from documenso/documenso
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow editing pending documents (documenso#1346)
## Description Adds the ability for the document owner to edit recipients and their fields after the document has been sent. A recipient can only be updated or deleted if: - The recipient has not inserted any fields - Has not completed the document <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Added new localization messages to clarify user actions regarding document signing. - Enhanced French translations for improved user interaction. - **Improvements** - Updated localization strings in German and English for clearer feedback on signer and recipient statuses. - Improved overall structure of localization files for better maintainability. - **Dependency Updates** - Upgraded `next-axiom` and `remeda` libraries to their latest versions, potentially enhancing performance and stability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Mythie <[email protected]>
- Loading branch information
Showing
21 changed files
with
534 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
packages/email/templates/recipient-removed-from-document.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import config from '@documenso/tailwind-config'; | ||
|
||
import { | ||
Body, | ||
Container, | ||
Head, | ||
Hr, | ||
Html, | ||
Img, | ||
Preview, | ||
Section, | ||
Tailwind, | ||
Text, | ||
} from '../components'; | ||
import type { TemplateDocumentCancelProps } from '../template-components/template-document-cancel'; | ||
import TemplateDocumentImage from '../template-components/template-document-image'; | ||
import { TemplateFooter } from '../template-components/template-footer'; | ||
|
||
export type DocumentCancelEmailTemplateProps = Partial<TemplateDocumentCancelProps>; | ||
|
||
export const RecipientRemovedFromDocumentTemplate = ({ | ||
inviterName = 'Lucas Smith', | ||
documentName = 'Open Source Pledge.pdf', | ||
assetBaseUrl = 'http://localhost:3002', | ||
}: DocumentCancelEmailTemplateProps) => { | ||
const previewText = `${inviterName} has removed you from the document ${documentName}.`; | ||
|
||
const getAssetUrl = (path: string) => { | ||
return new URL(path, assetBaseUrl).toString(); | ||
}; | ||
|
||
return ( | ||
<Html> | ||
<Head /> | ||
<Preview>{previewText}</Preview> | ||
<Tailwind | ||
config={{ | ||
theme: { | ||
extend: { | ||
colors: config.theme.extend.colors, | ||
}, | ||
}, | ||
}} | ||
> | ||
<Body className="mx-auto my-auto bg-white font-sans"> | ||
<Section> | ||
<Container className="mx-auto mb-2 mt-8 max-w-xl rounded-lg border border-solid border-slate-200 p-4 backdrop-blur-sm"> | ||
<Section> | ||
<Img | ||
src={getAssetUrl('/static/logo.png')} | ||
alt="Documenso Logo" | ||
className="mb-4 h-6" | ||
/> | ||
|
||
<TemplateDocumentImage className="mt-6" assetBaseUrl={assetBaseUrl} /> | ||
|
||
<Section> | ||
<Text className="text-primary mx-auto mb-0 max-w-[80%] text-center text-lg font-semibold"> | ||
{inviterName} has removed you from the document | ||
<br />"{documentName}" | ||
</Text> | ||
</Section> | ||
</Section> | ||
</Container> | ||
|
||
<Hr className="mx-auto mt-12 max-w-xl" /> | ||
|
||
<Container className="mx-auto max-w-xl"> | ||
<TemplateFooter /> | ||
</Container> | ||
</Section> | ||
</Body> | ||
</Tailwind> | ||
</Html> | ||
); | ||
}; | ||
|
||
export default RecipientRemovedFromDocumentTemplate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.