@optimiser/common 1.0.388 → 1.0.390
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -1
- package/dist/lib/utility.d.ts +1 -1
- package/dist/lib/utility.js +20 -8
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
package/dist/lib/utility.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ declare function MakeUserPasswordInvalid(options: AnyObjectInterface): void;
|
|
|
88
88
|
declare function ConvertJsonToXLXS(data: AnyObjectInterface, params: AnyObjectInterface | undefined, filePath: string): Promise<void>;
|
|
89
89
|
declare function SendResetPasswordMail(db: Db, userDetails: AnyObjectInterface, type?: string): Promise<unknown>;
|
|
90
90
|
declare function SendMailToSupport(mailData: AnyObjectInterface, callback: callBackInterface): void;
|
|
91
|
-
declare function MailTemplateStructure(content: string, HasDontReplyContent?: boolean):
|
|
91
|
+
declare function MailTemplateStructure(content: string, HasDontReplyContent?: boolean, isActivityTemplate?: boolean): void;
|
|
92
92
|
declare function SendMailToCustomer(mailData: AnyObjectInterface, callback: callBackInterface): void;
|
|
93
93
|
declare function parseMSPCookie(cookie: AnyObjectInterface): any;
|
|
94
94
|
declare function isEmptyObj(object: AnyObjectInterface): boolean;
|
package/dist/lib/utility.js
CHANGED
|
@@ -2106,6 +2106,10 @@ function BuildGridFieldProjection(project, field, group) {
|
|
|
2106
2106
|
//project[fldName] = JSON.parse(field.Schema.Formula);
|
|
2107
2107
|
project[fldName] = ToParseFormulaField(field.Schema.Formula);
|
|
2108
2108
|
break;
|
|
2109
|
+
case "texteditor":
|
|
2110
|
+
alias = fldName + constants_1.default.SummaryAlias;
|
|
2111
|
+
project[alias] = 1;
|
|
2112
|
+
break;
|
|
2109
2113
|
default:
|
|
2110
2114
|
project[fldName] = 1;
|
|
2111
2115
|
break;
|
|
@@ -2431,12 +2435,8 @@ function FilterConditions(condition, match, fields) {
|
|
|
2431
2435
|
matchValue = { '$regex': '^(?!' + obj.Value + '$)', '$options': 'i' };
|
|
2432
2436
|
break;
|
|
2433
2437
|
case "GREATER_THAN":
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
// matchValue = { '$gt': moment(obj.Value).endOf('day').toDate() };
|
|
2437
|
-
// } else
|
|
2438
|
-
matchValue = { '$gt': obj.Value };
|
|
2439
|
-
}
|
|
2438
|
+
//QPC-9260 Abrar
|
|
2439
|
+
matchValue = { '$gt': obj.Value };
|
|
2440
2440
|
break;
|
|
2441
2441
|
case "LESS_THAN":
|
|
2442
2442
|
// if (["date", "datetime"].includes(uiDataType)) {
|
|
@@ -3455,8 +3455,14 @@ function SendMailToSupport(mailData, callback) {
|
|
|
3455
3455
|
});
|
|
3456
3456
|
}
|
|
3457
3457
|
exports.SendMailToSupport = SendMailToSupport;
|
|
3458
|
-
function MailTemplateStructure(content, HasDontReplyContent) {
|
|
3459
|
-
|
|
3458
|
+
function MailTemplateStructure(content, HasDontReplyContent, isActivityTemplate) {
|
|
3459
|
+
if (isActivityTemplate === void 0) { isActivityTemplate = false; }
|
|
3460
|
+
if (isActivityTemplate) {
|
|
3461
|
+
ACTIVITY_MAIL_TEMPLATE(content);
|
|
3462
|
+
}
|
|
3463
|
+
else {
|
|
3464
|
+
COMMON_MAIL_TEMPLATE(content, HasDontReplyContent);
|
|
3465
|
+
}
|
|
3460
3466
|
/* `<body style='background-color: #eee;'>
|
|
3461
3467
|
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="background:#eee;">
|
|
3462
3468
|
<tr>
|
|
@@ -5738,3 +5744,9 @@ function ValidateStateCountryField(_a) {
|
|
|
5738
5744
|
});
|
|
5739
5745
|
});
|
|
5740
5746
|
}
|
|
5747
|
+
var ACTIVITY_MAIL_TEMPLATE = function (content) {
|
|
5748
|
+
return "<html xmlns:v=\"urn:schemas-microsoft-com:vml\">\n <head>\n <style> v:* { behavior: url(#default#VML); }</style >\n </head>\n <body style='background-color: #fff;'>\n <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n <!-- <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#fff;\"> -->\n <tr>\n <td align=\"center\" valign=\"top\">\n <table width=\"650\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#fff;\">\n <tr>\n <td align=\"center\" valign=\"top\" bgcolor=\"#fff\" style=\"background-color: #fff; text-align: left; padding-right: 0px; padding-left: 0px; font-size:16px; font-family:Arial, Helvetica, sans-serif; color:#000000;\">\n ".concat(content, "\n <p style=\"margin-bottom: 1em;\">\n Thanks,<br>\n ").concat(constants_1.default.ProjectName, " team\n </p>\n </td>\n </tr> \n </table>\n <tr>\n <td>\n <tr>\n <td style=\"text-align: center;\">\n <table style=\"margin: 0 auto;\">\n <tr>\n <td style=\"padding: 3px; font-size:13px; font-family:Arial, Helvetica, sans-serif;\">Powered By</td>\n <td style=\"padding: 3px;\"><a target=\"_blank\" href=\"https://www.optimiser.com\"><img src=\"https://platform.optimiser.com/images/MainLogo.png\" style=\"height: 45px;\"></a></td>\n </tr>\n </table>\n </td>\n </tr>\n </td>\n </tr>\n </td>\n </tr>\n </table>\n </body>");
|
|
5749
|
+
};
|
|
5750
|
+
var COMMON_MAIL_TEMPLATE = function (content, HasDontReplyContent) {
|
|
5751
|
+
return "<html xmlns:v=\"urn:schemas-microsoft-com:vml\">\n <head>\n <style> v:* { behavior: url(#default#VML); }</style >\n </head>\n <body style='background-color: #fff;'>\n <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n <!-- <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#fff;\"> -->\n <tr>\n <td align=\"center\" valign=\"top\">\n <table width=\"650\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#fff;\">\n <tr>\n <td align=\"left\" valign=\"top\" bgcolor=\"#ffffff\" style=\"padding-top:16px; padding-bottom:12px; padding-left: 20px; padding-right: 20px; background-color: #fff; border-bottom: 1px solid #fff;\">\n <img src=\"https://platform.optimiser.com/images/MainLogo.png\" alt=\"Optimiser\"/>\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" bgcolor=\"#fff\" style=\"background-color: #fff; text-align: left; padding-right: 0px; padding-left: 0px; font-size:16px; font-family:Arial, Helvetica, sans-serif; color:#000000;\">\n ".concat(content, "\n <p style=\"margin-bottom: 1em;\">\n Thanks,<br>\n ").concat(constants_1.default.ProjectName, " team\n </p>\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" bgcolor=\"##075DA8\" style=\" border-top: 1px solid #dee2e6; background-color: #075DA8;\">\n <p style=\"font-size:13px; font-family:Arial, Helvetica, sans-serif; color:#fff; margin:1.8em; font-weight:normal;\">\n <a href=\"https://www.optimiser.com/\" style=\"color:#fff; text-decoration:underline; \">www.optimiser.com</a> | <a href=\"mailto:support@optimiser.com\" style=\"color:#fff; text-decoration:underline; \">support@optimiser.com</a> | \n +44 (0)203 972 1666\n </p>\n </td>\n </tr>\n ").concat(HasDontReplyContent ? "<tr>\n <td align=\"center\" valign=\"top\" bgcolor=\"#fff\" style=\"margin-top: 1em;background-color: #fff; text-align: left; padding-right: 0px; padding-left: 0px; font-size:13px; font-family:Arial, Helvetica, sans-serif; color:#000000;\">\n <p style=\"margin-top: 1em;\">\n ##DonotReplyContent##\n </p>\n </td>\n </tr>" : '', " \n </table>\n </td>\n </tr>\n </table>\n </body>");
|
|
5752
|
+
};
|