Compare commits

..
Author SHA1 Message Date
prafull-opensignlabs c1be197346 Merge pull request #316 from OpenSignLabs/fix_emailresetdate
fix: Adapter prototype don't match expected prototype
2025-02-19 19:22:54 +00:00
3 changed files with 18 additions and 5 deletions
@@ -782,7 +782,8 @@ function Placeholder(props) {
//enable dragging functionality only if isAlllowModify true on tab that widget and hold 1sec
if (
props.isAlllowModify &&
props?.assignedWidgetId.includes(props.pos.key)
props?.assignedWidgetId.includes(props.pos.key) &&
props.data?.signerObjId === props.signerObjId
) {
//if 'isTouchDevice' then handle dragging functionality conditionaly
if (isTouchDevice) {
@@ -794,7 +795,8 @@ function Placeholder(props) {
} else if (
//condition when 'isAlllowModify' is true and user add new widgets then handle dragging functionality like signyourself flow
props.isAlllowModify &&
!props?.assignedWidgetId.includes(props.pos.key)
!props?.assignedWidgetId.includes(props.pos.key) &&
props.data?.signerObjId === props.signerObjId
) {
return !isDraggingEnabled;
} else {
+12 -3
View File
@@ -105,20 +105,29 @@ export const updateMailCount = async (extUserId, plan, monthchange) => {
try {
const contractUser = await query.first({ useMasterKey: true });
if (contractUser) {
const _extRes = JSON.parse(JSON.stringify(contractUser));
let updateDate = new Date();
if (_extRes?.LastEmailCountReset?.iso) {
updateDate = new Date(_extRes?.LastEmailCountReset?.iso);
const newDate = new Date();
// Update the month while keeping the same day and year
updateDate.setMonth(newDate.getMonth());
updateDate.setFullYear(newDate.getFullYear());
}
contractUser.increment('EmailCount', 1);
if (plan === 'freeplan') {
if (monthchange) {
contractUser.set('LastEmailCountReset', new Date());
contractUser.set('LastEmailCountReset', updateDate);
contractUser.set('MonthlyFreeEmails', 1);
} else {
if (contractUser?.get('MonthlyFreeEmails')) {
contractUser.increment('MonthlyFreeEmails', 1);
if (contractUser?.get('LastEmailCountReset')) {
contractUser.set('LastEmailCountReset', new Date());
contractUser.set('LastEmailCountReset', updateDate);
}
} else {
contractUser.set('MonthlyFreeEmails', 1);
contractUser.set('LastEmailCountReset', new Date());
contractUser.set('LastEmailCountReset', updateDate);
}
}
}
+2
View File
@@ -148,6 +148,8 @@ export const config = {
: {}),
filesAdapter: fsAdapter,
auth: { google: { enabled: true }, sso: SSOAuth },
// for fix Adapter prototype don't match expected prototype
push: { queueOptions: { disablePushWorker: true } },
};
// Client-keys like the javascript key or the .NET key are not necessary with parse-server
// If you wish you require them, you can set them as options in the initialization above: