mirror of
https://github.com/documenso/documenso.git
synced 2025-11-25 06:01:35 +10:00
feat: document 2fa
This commit is contained in:
@ -88,6 +88,8 @@ export async function loader({ params, request }: Route.LoaderArgs) {
|
||||
|
||||
const fields = template.fields.filter((field) => field.recipientId === directTemplateRecipientId);
|
||||
|
||||
const isEnterpriseDocument = Boolean(organisationClaim);
|
||||
|
||||
return superLoaderJson({
|
||||
token,
|
||||
user,
|
||||
@ -96,12 +98,21 @@ export async function loader({ params, request }: Route.LoaderArgs) {
|
||||
fields,
|
||||
hidePoweredBy,
|
||||
allowEmbedSigningWhitelabel,
|
||||
isEnterpriseDocument,
|
||||
});
|
||||
}
|
||||
|
||||
export default function EmbedDirectTemplatePage() {
|
||||
const { token, user, template, recipient, fields, hidePoweredBy, allowEmbedSigningWhitelabel } =
|
||||
useSuperLoaderData<typeof loader>();
|
||||
const {
|
||||
token,
|
||||
user,
|
||||
template,
|
||||
recipient,
|
||||
fields,
|
||||
hidePoweredBy,
|
||||
allowEmbedSigningWhitelabel,
|
||||
isEnterpriseDocument,
|
||||
} = useSuperLoaderData<typeof loader>();
|
||||
|
||||
return (
|
||||
<DocumentSigningProvider
|
||||
@ -116,6 +127,7 @@ export default function EmbedDirectTemplatePage() {
|
||||
documentAuthOptions={template.authOptions}
|
||||
recipient={recipient}
|
||||
user={user}
|
||||
isEnterprise={isEnterpriseDocument}
|
||||
>
|
||||
<DocumentSigningRecipientProvider recipient={recipient}>
|
||||
<EmbedDirectTemplateClientPage
|
||||
|
||||
@ -109,6 +109,8 @@ export async function loader({ params, request }: Route.LoaderArgs) {
|
||||
})
|
||||
: [];
|
||||
|
||||
const isEnterpriseDocument = Boolean(organisationClaim);
|
||||
|
||||
return superLoaderJson({
|
||||
token,
|
||||
user,
|
||||
@ -119,6 +121,7 @@ export async function loader({ params, request }: Route.LoaderArgs) {
|
||||
completedFields,
|
||||
hidePoweredBy,
|
||||
allowEmbedSigningWhitelabel,
|
||||
isEnterpriseDocument,
|
||||
});
|
||||
}
|
||||
|
||||
@ -133,6 +136,7 @@ export default function EmbedSignDocumentPage() {
|
||||
completedFields,
|
||||
hidePoweredBy,
|
||||
allowEmbedSigningWhitelabel,
|
||||
isEnterpriseDocument,
|
||||
} = useSuperLoaderData<typeof loader>();
|
||||
|
||||
return (
|
||||
@ -148,6 +152,7 @@ export default function EmbedSignDocumentPage() {
|
||||
documentAuthOptions={document.authOptions}
|
||||
recipient={recipient}
|
||||
user={user}
|
||||
isEnterprise={isEnterpriseDocument}
|
||||
>
|
||||
<EmbedSignDocumentClientPage
|
||||
token={token}
|
||||
|
||||
Reference in New Issue
Block a user