mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
feat: create duplicate template functionality feat: add support of csv and xlsx for bulk contacts import feat: add info text for forms and dashboard button feat: implement functionality to delete a PDF page while editing the document feat: show completed documents in which signers included but not owner in completed reports feat: add delete folder button in opensign drive feat: introduce Bcc email support for sending completed documents feat: allow merging multiple pdf while drafting document and template feat: add 'My Initials' tab for auto-signing in request-sign flow feat: add support for redirect URL to navigate after document completion feat: introduce privacy policy and digital signature terms before signing documents. feat: add feature to allow adding new pages to existing document feat: add save signature, initials, stamp functionality in sign pad for logged in user feat: add preferences menu feat: add save custom email template, notifyonsignature, set timezone, allow signature types in preferences feat: secure local url feat: implement Italian language translation feat: implement German language translation feat: update menu name from report to documents and shift contactbook in main menu feat: provide edit contact functionality fix: unable to delete folder when all its documents are deleted fix: fields.push is not function fix: document loading issue in opensign drive fix: adjust the guest signature flow to display the document in full screen, eliminating any blank space which is displayed below the place holder in mobile view fix: resolve issue of instance of pdfdict or pdfstream but got undefined build(deps): update dependencies refactor: change note text from add contact form
322 lines
9.0 KiB
JavaScript
322 lines
9.0 KiB
JavaScript
export default function reportJson(id, userId) {
|
|
const currentUserId = userId;
|
|
|
|
switch (id) {
|
|
// draft documents report
|
|
case 'ByHuevtCFY':
|
|
return {
|
|
reportName: 'Draft Documents',
|
|
params: {
|
|
Type: { $ne: 'Folder' },
|
|
IsCompleted: { $ne: true },
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
SignedUrl: { $exists: false },
|
|
CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'Placeholders',
|
|
'IsSignyourself',
|
|
],
|
|
};
|
|
|
|
// Need your sign report
|
|
case '4Hhwbp482K':
|
|
return {
|
|
reportName: 'Need your sign',
|
|
params: {
|
|
Type: { $ne: 'Folder' },
|
|
IsCompleted: { $ne: true },
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
SignedUrl: { $ne: null },
|
|
ExpiryDate: { $gt: { __type: 'Date', iso: new Date().toISOString() } },
|
|
Placeholders: { $ne: null },
|
|
Signers: {
|
|
$inQuery: {
|
|
where: { UserId: { __type: 'Pointer', className: '_User', objectId: currentUserId } },
|
|
className: 'contracts_Contactbook',
|
|
},
|
|
},
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'ExtUserPtr.Email',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'Signers.UserId',
|
|
'AuditTrail',
|
|
'Placeholders',
|
|
'SignedUrl',
|
|
'ExpiryDate',
|
|
],
|
|
};
|
|
// In progess report
|
|
case '1MwEuxLEkF':
|
|
return {
|
|
reportName: 'In-progress documents',
|
|
params: {
|
|
Type: { $ne: 'Folder' },
|
|
SignedUrl: { $ne: null },
|
|
Placeholders: { $ne: null },
|
|
IsCompleted: { $ne: true },
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
ExpiryDate: { $gt: { __type: 'Date', iso: new Date().toISOString() } },
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'ExtUserPtr.Email',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'AuditTrail',
|
|
'AuditTrail.UserPtr',
|
|
'ExpiryDate',
|
|
'SendMail',
|
|
'Placeholders',
|
|
'SignedUrl',
|
|
],
|
|
};
|
|
// completed documents report
|
|
case 'kQUoW4hUXz':
|
|
return {
|
|
reportName: 'Completed Documents',
|
|
params: {
|
|
Type: { $ne: 'Folder' },
|
|
IsCompleted: true,
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
// CreatedBy: {
|
|
// __type: 'Pointer',
|
|
// className: '_User',
|
|
// objectId: currentUserId,
|
|
// },
|
|
$or: [
|
|
// Condition 1: If `CreatedBy` exists, no need for `Signers` filter
|
|
{ CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId } },
|
|
// Condition 2: If `CreatedBy` does not exist, apply the `Signers` filter
|
|
{
|
|
Signers: {
|
|
$inQuery: {
|
|
where: {
|
|
UserId: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
},
|
|
className: 'contracts_Contactbook',
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'SignedUrl',
|
|
'ExtUserPtr.Name',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'TimeToCompleteDays',
|
|
'Placeholders',
|
|
'IsSignyourself',
|
|
'IsCompleted',
|
|
],
|
|
};
|
|
// declined documents report
|
|
case 'UPr2Fm5WY3':
|
|
return {
|
|
reportName: 'Declined Documents',
|
|
params: {
|
|
Type: null,
|
|
IsArchive: { $ne: true },
|
|
IsDeclined: true,
|
|
CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'Placeholders',
|
|
'DeclineReason',
|
|
'SignedUrl',
|
|
],
|
|
};
|
|
// Expired Documents report
|
|
case 'zNqBHXHsYH':
|
|
return {
|
|
reportName: 'Expired Documents',
|
|
params: {
|
|
IsCompleted: { $ne: true },
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
Type: { $ne: 'Folder' },
|
|
SignedUrl: { $ne: null },
|
|
ExpiryDate: { $lt: { __type: 'Date', iso: new Date().toISOString() } },
|
|
CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'Placeholders',
|
|
'SignedUrl',
|
|
'ExpiryDate',
|
|
],
|
|
};
|
|
// Recently sent for signatures report show on dashboard
|
|
case 'd9k3UfYHBc':
|
|
return {
|
|
reportName: 'Recently sent for signatures',
|
|
params: {
|
|
Type: { $ne: 'Folder' },
|
|
SignedUrl: { $ne: null },
|
|
Placeholders: { $ne: null },
|
|
IsCompleted: { $ne: true },
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
ExpiryDate: { $gt: { __type: 'Date', iso: new Date().toISOString() } },
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'ExtUserPtr.Email',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'AuditTrail',
|
|
'AuditTrail.UserPtr',
|
|
'ExpiryDate',
|
|
'Placeholders',
|
|
'SignedUrl',
|
|
],
|
|
};
|
|
// Recent signature requests report show on dashboard
|
|
case '5Go51Q7T8r':
|
|
return {
|
|
reportName: 'Recent signature requests',
|
|
params: {
|
|
Type: { $ne: 'Folder' },
|
|
SignedUrl: { $ne: null },
|
|
IsCompleted: { $ne: true },
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
ExpiryDate: { $gt: { __type: 'Date', iso: new Date().toISOString() } },
|
|
Placeholders: { $ne: null },
|
|
Signers: {
|
|
$inQuery: {
|
|
where: { UserId: { __type: 'Pointer', className: '_User', objectId: currentUserId } },
|
|
className: 'contracts_Contactbook',
|
|
},
|
|
},
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'ExtUserPtr.Email',
|
|
'Signers.Name',
|
|
'Signers.UserId',
|
|
'AuditTrail',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'Placeholders',
|
|
'SignedUrl',
|
|
'ExpiryDate',
|
|
],
|
|
};
|
|
// Drafts report show on dashboard
|
|
case 'kC5mfynCi4':
|
|
return {
|
|
reportName: 'Drafts',
|
|
params: {
|
|
Type: { $ne: 'Folder' },
|
|
IsCompleted: { $ne: true },
|
|
IsDeclined: { $ne: true },
|
|
IsArchive: { $ne: true },
|
|
SignedUrl: { $exists: false },
|
|
CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
},
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'Placeholders',
|
|
],
|
|
};
|
|
// contact book report
|
|
case 'contacts':
|
|
return {
|
|
reportName: 'Contactbook',
|
|
reportClass: 'contracts_Contactbook',
|
|
params: {
|
|
CreatedBy: { __type: 'Pointer', className: '_User', objectId: currentUserId },
|
|
IsDeleted: { $ne: true },
|
|
},
|
|
keys: ['Name', 'Email', 'Phone'],
|
|
};
|
|
// Templates report
|
|
case '6TeaPr321t':
|
|
return {
|
|
reportName: 'Templates',
|
|
reportClass: 'contracts_Template',
|
|
params: { Type: { $ne: 'Folder' }, IsArchive: { $ne: true } },
|
|
keys: [
|
|
'Name',
|
|
'Note',
|
|
'Folder.Name',
|
|
'URL',
|
|
'ExtUserPtr.Name',
|
|
'Signers.Name',
|
|
'Signers.Email',
|
|
'Signers.Phone',
|
|
'Placeholders',
|
|
'IsPublic',
|
|
'SharedWith.Name',
|
|
'SendinOrder',
|
|
'SignatureType',
|
|
'NotifyOnSignatures',
|
|
],
|
|
};
|
|
default:
|
|
return null;
|
|
}
|
|
}
|