@optimiser/common 1.0.417 → 1.0.419

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.
Files changed (2) hide show
  1. package/dist/lib/utility.js +4 -7
  2. package/package.json +59 -59
@@ -564,7 +564,7 @@ exports.UpdateRecentViewFields = UpdateRecentViewFields;
564
564
  //Sync child object
565
565
  function SyncChildObjectData(pageData, objectID, db) {
566
566
  return __awaiter(this, void 0, void 0, function () {
567
- var objectName, i, group, objectData, childID, childData, childFieldsObj, syncFields, _loop_5, i_3, childFieldsObj, _loop_6, i_4, insertedChildData, childResult, parentFieldObj;
567
+ var objectName, i, group, objectData, childID, childData, childFieldsObj, syncFields, _loop_5, i_3, childFieldsObj, _loop_6, i_4, insertedChildData, insertedChildID, parentFieldObj;
568
568
  return __generator(this, function (_a) {
569
569
  switch (_a.label) {
570
570
  case 0:
@@ -689,16 +689,16 @@ function SyncChildObjectData(pageData, objectID, db) {
689
689
  return [4 /*yield*/, db.collection(group.ChildObject).insertOne(childFieldsObj)];
690
690
  case 11:
691
691
  insertedChildData = _a.sent();
692
- childResult = insertedChildData.ops[0];
692
+ insertedChildID = insertedChildData.insertedId;
693
693
  if (!(group.ParentObjectField != undefined)) return [3 /*break*/, 13];
694
694
  parentFieldObj = {};
695
- parentFieldObj[group.ParentObjectField] = childResult._id;
695
+ parentFieldObj[group.ParentObjectField] = insertedChildID;
696
696
  return [4 /*yield*/, db.collection(objectName).updateOne({ _id: objectID }, { $set: parentFieldObj })];
697
697
  case 12:
698
698
  _a.sent();
699
699
  _a.label = 13;
700
700
  case 13:
701
- SyncFieldInSameCollectionByObjectID(group.ChildObject, childResult._id, db);
701
+ SyncFieldInSameCollectionByObjectID(group.ChildObject, insertedChildID, db);
702
702
  _a.label = 14;
703
703
  case 14:
704
704
  i++;
@@ -5872,9 +5872,6 @@ function CheckProfilePermissions(permissionType, objectName, pageName, msp_d, db
5872
5872
  else if (((_e = item.ModuleData) === null || _e === void 0 ? void 0 : _e.CheckOnlyControlPanel) && item.Operations.includes('Control Panel')) {
5873
5873
  isAllowed = true;
5874
5874
  }
5875
- else if (item.ModuleID == "report" && item.Operations.includes('Create-Edit')) {
5876
- isAllowed = true;
5877
- }
5878
5875
  break;
5879
5876
  }
5880
5877
  }
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
- {
2
- "name": "@optimiser/common",
3
- "version": "1.0.417",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "compile": "tsc",
8
- "push": "tsc && npm version patch -git-tag-version false && npm publish"
9
- },
10
- "files": [
11
- "dist/*"
12
- ],
13
- "author": "",
14
- "license": "ISC",
15
- "dependencies": {
16
- "@types/geoip-lite": "^1.4.0",
17
- "@types/promise.allsettled": "^1.0.3",
18
- "@types/request": "^2.48.5",
19
- "@types/sanitize-html": "^2.11.0",
20
- "@types/sequelize": "^4.28.9",
21
- "@types/unzipper": "^0.10.3",
22
- "@types/uuid": "^8.3.0",
23
- "aws-sdk": "^2.786.0",
24
- "axios": "^0.21.4",
25
- "bson": "^4.2.0",
26
- "exceljs": "^4.3.0",
27
- "express": "^4.17.1",
28
- "express-validator": "^6.9.2",
29
- "firebase-admin": "^12.0.0",
30
- "geoip-lite": "^1.4.2",
31
- "google-libphonenumber": "^3.2.30",
32
- "ioredis": "^4.17.3",
33
- "libphonenumber-js": "^1.9.51",
34
- "moment": "^2.25.3",
35
- "moment-timezone": "^0.5.27",
36
- "mongo-sanitize": "^1.1.0",
37
- "mongodb": "^3.6.2",
38
- "nodemailer": "^6.4.11",
39
- "promise.allsettled": "^1.0.2",
40
- "qrcode": "^1.5.3",
41
- "request": "^2.88.2",
42
- "sanitize-html": "^2.13.0",
43
- "sequelize": "^6.3.5",
44
- "typescript": "^5.3.3",
45
- "unzipper": "^0.10.11",
46
- "uuid": "^8.3.1"
47
- },
48
- "devDependencies": {
49
- "@types/aws-sdk": "^2.7.0",
50
- "@types/bson": "^4.0.2",
51
- "@types/exceljs": "^1.3.0",
52
- "@types/express": "^4.17.8",
53
- "@types/ioredis": "^4.17.4",
54
- "@types/moment": "^2.13.0",
55
- "@types/moment-timezone": "^0.5.30",
56
- "@types/mongodb": "^3.5.27",
57
- "@types/nodemailer": "^6.4.0"
58
- }
59
- }
1
+ {
2
+ "name": "@optimiser/common",
3
+ "version": "1.0.419",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "compile": "tsc",
8
+ "push": "tsc && npm version patch -git-tag-version false && npm publish"
9
+ },
10
+ "files": [
11
+ "dist/*"
12
+ ],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "dependencies": {
16
+ "@types/geoip-lite": "^1.4.0",
17
+ "@types/promise.allsettled": "^1.0.3",
18
+ "@types/request": "^2.48.5",
19
+ "@types/sanitize-html": "^2.11.0",
20
+ "@types/sequelize": "^4.28.9",
21
+ "@types/unzipper": "^0.10.3",
22
+ "@types/uuid": "^8.3.0",
23
+ "aws-sdk": "^2.786.0",
24
+ "axios": "^0.21.4",
25
+ "bson": "^4.2.0",
26
+ "exceljs": "^4.3.0",
27
+ "express": "^4.17.1",
28
+ "express-validator": "^6.9.2",
29
+ "firebase-admin": "^12.0.0",
30
+ "geoip-lite": "^1.4.2",
31
+ "google-libphonenumber": "^3.2.30",
32
+ "ioredis": "^4.17.3",
33
+ "libphonenumber-js": "^1.9.51",
34
+ "moment": "^2.25.3",
35
+ "moment-timezone": "^0.5.27",
36
+ "mongo-sanitize": "^1.1.0",
37
+ "mongodb": "^3.6.2",
38
+ "nodemailer": "^6.4.11",
39
+ "promise.allsettled": "^1.0.2",
40
+ "qrcode": "^1.5.3",
41
+ "request": "^2.88.2",
42
+ "sanitize-html": "^2.13.0",
43
+ "sequelize": "^6.3.5",
44
+ "typescript": "^5.3.3",
45
+ "unzipper": "^0.10.11",
46
+ "uuid": "^8.3.1"
47
+ },
48
+ "devDependencies": {
49
+ "@types/aws-sdk": "^2.7.0",
50
+ "@types/bson": "^4.0.2",
51
+ "@types/exceljs": "^1.3.0",
52
+ "@types/express": "^4.17.8",
53
+ "@types/ioredis": "^4.17.4",
54
+ "@types/moment": "^2.13.0",
55
+ "@types/moment-timezone": "^0.5.30",
56
+ "@types/mongodb": "^3.5.27",
57
+ "@types/nodemailer": "^6.4.0"
58
+ }
59
+ }