MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / fetchTenantDetails

Function fetchTenantDetails

apps/OpenSign/src/pages/PdfRequestFiles.jsx:234–264  ·  view source on GitHub ↗
(contactId)

Source from the content-addressed store, hash-verified

232
233
234 const fetchTenantDetails = async (contactId) => {
235 const user = JSON.parse(
236 localStorage.getItem(
237 `Parse/${localStorage.getItem("parseAppId")}/currentUser`
238 )
239 );
240 try {
241 const tenantDetails = await getTenantDetails(
242 user?.objectId, // userId
243 contactId // contactId
244 );
245 if (tenantDetails && tenantDetails === "user does not exist!") {
246 alert(t("user-not-exist"));
247 } else if (tenantDetails) {
248 const signatureType = tenantDetails?.SignatureType || [];
249 const filterSignTypes = signatureType?.filter(
250 (x) => x.enabled === true
251 );
252 if (tenantDetails?.RequestBody) {
253 setTenantMailTemplate({
254 body: tenantDetails?.RequestBody,
255 subject: tenantDetails?.RequestSubject
256 });
257 }
258
259 return filterSignTypes;
260 }
261 } catch (e) {
262 alert(t("user-not-exist"));
263 }
264 };
265 //function for get document details for perticular signer with signer'object id
266 const getDocumentDetails = async (
267 docId,

Callers 1

getDocumentDetailsFunction · 0.70

Calls 1

getTenantDetailsFunction · 0.90

Tested by

no test coverage detected