Compare commits

..
Author SHA1 Message Date
nxglabs 98aa69b884 Merge pull request #307 from OpenSignLabs/raktima-patch-10
fix: comment text widget display code in create template and draft template
2025-02-19 08:20:10 +00:00
2 changed files with 5 additions and 16 deletions
@@ -782,8 +782,7 @@ 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.data?.signerObjId === props.signerObjId
props?.assignedWidgetId.includes(props.pos.key)
) {
//if 'isTouchDevice' then handle dragging functionality conditionaly
if (isTouchDevice) {
@@ -795,8 +794,7 @@ 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.data?.signerObjId === props.signerObjId
!props?.assignedWidgetId.includes(props.pos.key)
) {
return !isDraggingEnabled;
} else {
+3 -12
View File
@@ -105,29 +105,20 @@ 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', updateDate);
contractUser.set('LastEmailCountReset', new Date());
contractUser.set('MonthlyFreeEmails', 1);
} else {
if (contractUser?.get('MonthlyFreeEmails')) {
contractUser.increment('MonthlyFreeEmails', 1);
if (contractUser?.get('LastEmailCountReset')) {
contractUser.set('LastEmailCountReset', updateDate);
contractUser.set('LastEmailCountReset', new Date());
}
} else {
contractUser.set('MonthlyFreeEmails', 1);
contractUser.set('LastEmailCountReset', updateDate);
contractUser.set('LastEmailCountReset', new Date());
}
}
}