mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-19 22:25:51 +02:00
v2.12.0
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
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import { cloudServerUrl, planCredits } from '../../Utils.js';
|
||||
import {
|
||||
cloudServerUrl,
|
||||
} from '../../Utils.js';
|
||||
const serverUrl = cloudServerUrl; //process.env.SERVER_URL;
|
||||
const APPID = process.env.APP_ID;
|
||||
const masterKEY = process.env.MASTER_KEY;
|
||||
@@ -43,7 +45,6 @@ async function saveUser(userDetails) {
|
||||
}
|
||||
export default async function usersignup(request) {
|
||||
const userDetails = request.params.userDetails;
|
||||
const subscription = request.params.subscription;
|
||||
const user = await saveUser(userDetails);
|
||||
|
||||
try {
|
||||
@@ -120,10 +121,10 @@ export default async function usersignup(request) {
|
||||
if (userDetails && userDetails.jobTitle) {
|
||||
newObj.set('JobTitle', userDetails.jobTitle);
|
||||
}
|
||||
const extRes = await newObj.save(null, { useMasterKey: true });
|
||||
if (subscription) {
|
||||
await saveSubscription(extRes.id, user.id, tenantRes.id, subscription);
|
||||
if (userDetails && userDetails?.timezone) {
|
||||
newObj.set('Timezone', userDetails.timezone);
|
||||
}
|
||||
const extRes = await newObj.save(null, { useMasterKey: true });
|
||||
return { message: 'User sign up', sessionToken: user.sessionToken };
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -131,39 +132,3 @@ export default async function usersignup(request) {
|
||||
}
|
||||
}
|
||||
|
||||
async function saveSubscription(extUserId, UserId, tenantId, subscription) {
|
||||
const SubscriptionId = subscription?.data?.subscription?.subscription_id || '';
|
||||
const Next_billing_date = subscription?.data?.subscription?.next_billing_at || '';
|
||||
const planCode = subscription?.data?.subscription?.plan?.plan_code || '';
|
||||
const credits = planCredits?.[planCode] || 0;
|
||||
|
||||
try {
|
||||
const createSubscription = new Parse.Object('contracts_Subscriptions');
|
||||
createSubscription.set('SubscriptionId', SubscriptionId);
|
||||
createSubscription.set('SubscriptionDetails', subscription);
|
||||
createSubscription.set('ExtUserPtr', {
|
||||
__type: 'Pointer',
|
||||
className: 'contracts_Users',
|
||||
objectId: extUserId,
|
||||
});
|
||||
createSubscription.set('CreatedBy', {
|
||||
__type: 'Pointer',
|
||||
className: '_User',
|
||||
objectId: UserId,
|
||||
});
|
||||
createSubscription.set('TenantId', {
|
||||
__type: 'Pointer',
|
||||
className: 'partners_Tenant',
|
||||
objectId: tenantId,
|
||||
});
|
||||
createSubscription.set('Next_billing_date', new Date(Next_billing_date));
|
||||
createSubscription.set('PlanCode', planCode);
|
||||
if (credits > 0) {
|
||||
createSubscription.set('AllowedCredits', credits);
|
||||
createSubscription.set('PlanCredits', credits);
|
||||
}
|
||||
await createSubscription.save(null, { useMasterKey: true });
|
||||
} catch (err) {
|
||||
console.log('err in save subscription pgsignup', err);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user