Compare commits

..
Author SHA1 Message Date
prafull-opensignlabs a4e02a1cd1 Merge pull request #313 from OpenSignLabs/patch
fix: default signature display in signpad issue
fix: show signer name after send mail using templateflow
fix: resolve dragging issue in signyour-self flow and some ui changes
2025-02-19 19:01:42 +00:00
2 changed files with 16 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);
}
}
}