Skip to content

Commit 1b8121d

Browse files
Added consent and signers
1 parent 43f6c49 commit 1b8121d

3 files changed

Lines changed: 36 additions & 17 deletions

File tree

DocuSign.Workspaces/DocuSign.Workspaces/ClientApp/src/locales/en/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"Description": "Learn more about authentication options with Docusign",
144144
"LoginWithDevAccount": "Log in with your Docusign developer account",
145145
"ContinueWithTestAccount": "Continue with a test account",
146-
"GetFreeAccount": "If you don't have a Docusign developer account, you can get one for free!",
146+
"GetFreeAccount": "If you don't have a Docusign developer account, you can <a href=\"https://www.docusign.com/developers/sandbox/\" target=\"_blank\" rel=\"noreferrer noopener\">get one</a> for free!",
147147
"LoggingIn": "Logging in...",
148148
"Error": {
149149
"UnableToLoadAccountStatus": "Unable to load account status.",

DocuSign.Workspaces/DocuSign.Workspaces/ClientApp/src/loginModal/LoginModal.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
22
import { useTranslation } from 'react-i18next';
3+
import parse from 'html-react-parser';
34
import './LoginModal.scss';
45

56
function LoginModal({
@@ -275,7 +276,7 @@ function LoginModal({
275276
}
276277

277278
if (!consentGranted) {
278-
await requestConsent('Admin');
279+
await requestConsent('Individual');
279280
return;
280281
}
281282

@@ -381,7 +382,7 @@ function LoginModal({
381382
</div>
382383
</label>
383384
</div>
384-
<p className="auth-modal__note">{t('LoginModal.GetFreeAccount')}</p>
385+
<p className="auth-modal__note">{parse(t('LoginModal.GetFreeAccount'))}</p>
385386
</div>
386387
<div className="auth-modal__actions">
387388
<button className="secondary-btn" type="button" onClick={onClose}>

DocuSign.Workspaces/DocuSign.Workspaces/Domain/Workspaces/WealthManagementClient.cs

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public async Task<List<EnvelopeModel>> AddSelectedDocumentsForClientPackage(Work
3838

3939
var envelopeModel = await UpdateEachEnvelopWithDocument(
4040
envelopeId: envelopeId,
41-
document: document);
41+
document: document,
42+
model: createModel);
4243

4344
envelopes.Add(envelopeModel);
4445
}
@@ -90,7 +91,7 @@ await docuSignApiProvider.WorkspaceUploadRequest.CreateWorkspaceUploadRequestAsy
9091
return envelopeResponse.EnvelopeId;
9192
}
9293

93-
private async Task<EnvelopeModel> UpdateEachEnvelopWithDocument(string envelopeId, Document document)
94+
private async Task<EnvelopeModel> UpdateEachEnvelopWithDocument(string envelopeId, Document document, WorkspaceAddDocumentsModel model)
9495
{
9596
var accountsApi = new AccountsApi(docuSignApiProvider.ApiClient);
9697
var response = await accountsApi.GetAccountIdentityVerificationAsync(accountRepository.AccountId);
@@ -155,22 +156,39 @@ private async Task<EnvelopeModel> UpdateEachEnvelopWithDocument(string envelopeI
155156
],
156157
};
157158

158-
var signer1 = new Signer
159+
var recipients = new Recipients
159160
{
160-
Name = "signerName",
161-
Email = "signerEmail@mail.com",
162-
RoutingOrder = "1",
163-
Status = "Created",
164-
DeliveryMethod = "Email",
165-
RecipientId = "1",
166-
Tabs = signer1Tabs,
167-
IdentityVerification = recipientIdentityVerification,
161+
Signers =
162+
[
163+
new Signer
164+
{
165+
Name = model.PrimaryOwnerFirstName + " " + model.PrimaryOwnerLastName,
166+
Email = model.PrimaryOwnerEmail,
167+
RoutingOrder = "1",
168+
Status = "Created",
169+
DeliveryMethod = "Email",
170+
RecipientId = "1",
171+
Tabs = signer1Tabs,
172+
IdentityVerification = recipientIdentityVerification,
173+
}
174+
]
168175
};
169176

170-
var recipients = new Recipients
177+
if (!string.IsNullOrEmpty(model.SecondaryOwnerEmail))
171178
{
172-
Signers = [signer1]
173-
};
179+
recipients.Signers.Add(new Signer
180+
{
181+
Name = model.PrimaryOwnerFirstName + " " + model.PrimaryOwnerLastName,
182+
Email = model.PrimaryOwnerEmail,
183+
RoutingOrder = "1",
184+
Status = "Created",
185+
DeliveryMethod = "Email",
186+
RecipientId = "2",
187+
Tabs = signer1Tabs,
188+
IdentityVerification = recipientIdentityVerification,
189+
});
190+
}
191+
174192
env.Recipients = recipients;
175193

176194
await docuSignApiProvider.EnvelopApi.UpdateDocumentsAsync(accountRepository.AccountId, envelopeId, env);

0 commit comments

Comments
 (0)