mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-05 01:07:39 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1be197346 |
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user