Merge pull request #392 from OpenSignLabs/staging

fix: default value is not update for textbox widget in create document from template
This commit is contained in:
prafull-opensignlabs
2025-03-19 10:30:07 +00:00
parent 22d27abb76
commit 760a388b13
40 changed files with 1601 additions and 1609 deletions
@@ -1,4 +1,13 @@
async function DocumentBeforesave(request) {
if (!request.original) {
const TimeToCompleteDays = request.object.get('TimeToCompleteDays') || 15;
const RemindOnceInEvery = request?.object?.get('RemindOnceInEvery') || 5;
const AutoReminder = request?.object?.get('AutomaticReminders') || false;
const reminderCount = TimeToCompleteDays / RemindOnceInEvery;
if (AutoReminder && reminderCount > 15) {
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'only 15 reminder allowed');
}
}
try {
// below code is used to update document when user sent document or self signed
const document = request.object;