@optimiser/common 1.0.353 → 1.0.355
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/lib/utility.js +7 -4
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -1842,7 +1842,7 @@ function CheckDataBeforeAdd(updateObj, objectSchema, db) {
|
|
|
1842
1842
|
updateObj[fldName] = val;
|
|
1843
1843
|
return [3 /*break*/, 7];
|
|
1844
1844
|
case 6:
|
|
1845
|
-
if (fieldSchema.UIDataType == 'formula'
|
|
1845
|
+
if (fieldSchema.UIDataType == 'formula')
|
|
1846
1846
|
delete updateObj[fldName];
|
|
1847
1847
|
_a.label = 7;
|
|
1848
1848
|
case 7: return [2 /*return*/];
|
|
@@ -1885,7 +1885,7 @@ function CheckDataBeforeUpdate(updateObj, objectData, objectSchema, db) {
|
|
|
1885
1885
|
case 1:
|
|
1886
1886
|
fieldSchema = objectSchema.Fields.find(function (x) { return x.Name == fldName; });
|
|
1887
1887
|
if (!fieldSchema) return [3 /*break*/, 5];
|
|
1888
|
-
if (!(fieldSchema.UIDataType == 'autoincrement' || fieldSchema.UIDataType == 'formula'
|
|
1888
|
+
if (!(fieldSchema.UIDataType == 'autoincrement' || fieldSchema.UIDataType == 'formula')) return [3 /*break*/, 2];
|
|
1889
1889
|
delete updateObj[fldName];
|
|
1890
1890
|
return [3 /*break*/, 5];
|
|
1891
1891
|
case 2:
|
|
@@ -2866,6 +2866,8 @@ function SyncUserDetailsWithMasterDB(userData, callback, dbMaster) {
|
|
|
2866
2866
|
updateQuery.FirstName = userData.FirstName;
|
|
2867
2867
|
updateQuery.LastName = userData.LastName;
|
|
2868
2868
|
updateQuery.Email = userData.Email;
|
|
2869
|
+
//QPC-7971: to sync username in master db
|
|
2870
|
+
updateQuery.UserName = userData.UserName;
|
|
2869
2871
|
updateQuery.UserStatus = userData.UserStatus;
|
|
2870
2872
|
updateQuery.UserProfileID = userData.UserProfileID;
|
|
2871
2873
|
updateQuery.Timezone = userData.Timezone;
|
|
@@ -3328,11 +3330,12 @@ function SendResetPasswordMail(db, userDetails, type) {
|
|
|
3328
3330
|
mailObj.to = Email;
|
|
3329
3331
|
if (type == "forgotPass") {
|
|
3330
3332
|
mailObj.subject = constants_1.default.ProjectName + " password reset request";
|
|
3331
|
-
mailObj.html = MailTemplateStructure("<p style=\"margin-top: 1em;\">Hello " + FirstName + ",</p>\n <p>We have received a request to reset your Optimiser password. Please click on the link below to reset your password.</p>\n <br>\n <p style=\"word-break: break-all;\">\n
|
|
3333
|
+
mailObj.html = MailTemplateStructure("<p style=\"margin-top: 1em;\">Hello " + FirstName + ",</p>\n <p>We have received a request to reset your Optimiser password. Please click on the link below to reset your password.</p>\n <br>\n <p style=\"word-break: break-all;\">\n <a href='" + constants_1.default.ProjectDomain + "?page=SetPassword&uid=" + hash + "'>" + constants_1.default.ProjectDomain + "?page=SetPassword&uid=" + hash + "</a>\n </p>\n <br>\n <p>If you do not wish to reset your password, please ignore this email.</p>");
|
|
3332
3334
|
}
|
|
3333
3335
|
else {
|
|
3334
3336
|
mailObj.subject = "Welcome to " + constants_1.default.ProjectName + ": Please activate your account";
|
|
3335
|
-
|
|
3337
|
+
//QPC-7971: called MailTemplateStructure for email body. and updated the link
|
|
3338
|
+
mailObj.html = MailTemplateStructure("<p style=\"margin-top: 1em;\">Hello " + FirstName + ",</p>\n <p>Congratulations! We are pleased to advise that your user profile has been created and is ready to use. Just click on the link below to set up your password then you\u2019ll be ready to go.</p>\n <br>\n <p style=\"word-break: break-all;\">\n <a href='" + constants_1.default.ProjectDomain + "?page=SetPassword&uid=" + hash + "'>" + constants_1.default.ProjectDomain + "?page=SetPassword&uid=" + hash + "</a>\n </p>\n <br>\n <p>We hope that you enjoy your Optimiser platform; if you ever require assistance, our Support Team will be happy to help.</p>\n <p>Email : <a href=\"mailto:support@optimiser.com\">support@optimiser.com</a>, Phone : +44 (0)203 972 1666</p>\n <br>");
|
|
3336
3339
|
}
|
|
3337
3340
|
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
3338
3341
|
mail_1.SendMail(mailObj).then(function (status) {
|