add new template form

This commit is contained in:
prafull-opensignlabs
2023-12-12 17:57:11 +05:30
parent f5c0694e32
commit 2b345ff840
19 changed files with 1165 additions and 47 deletions
@@ -39,6 +39,14 @@ exports.up = async Parse => {
description: '',
objectId: '8mZzFxbG1z',
},
{
icon: 'fas fa-file-signature',
title: 'New template',
target: '_self',
pageType: 'form',
description: '',
objectId: 'template',
},
],
},
{
@@ -0,0 +1,40 @@
/**
*
* @param {Parse} Parse
*/
exports.up = async Parse => {
const className = 'contracts_Template';
const schema = new Parse.Schema(className);
schema.addString('Name');
schema.addString('URL');
schema.addString('Note');
schema.addString('Description');
schema.addArray('Signers');
schema.addBoolean('IsArchive');
schema.addArray('Placeholders');
schema.addPointer('Folder', 'contracts_Template');
schema.addString('Type');
schema.addPointer('CreatedBy', '_User');
schema.addPointer('ExtUserPtr', 'contracts_Users');
schema.addBoolean('EnablePhoneOTP')
schema.addBoolean('EnableEmailOTP')
schema.addBoolean('SendinOrder')
schema.addBoolean('SentToOthers')
schema.addBoolean('AutomaticReminders')
return schema.save();
};
/**
*
* @param {Parse} Parse
*/
exports.down = async Parse => {
const className = 'contracts_Template';
const schema = new Parse.Schema(className);
return schema.purge().then(() => schema.delete());
};