@optimiser/common 1.0.386 → 1.0.387

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.
@@ -1860,7 +1860,7 @@ function CheckDataBeforeAdd(updateObj, objectSchema, db) {
1860
1860
  switch (_c.label) {
1861
1861
  case 0:
1862
1862
  fieldSchema = objectSchema.Fields.find(function (x) { return x.Name == fldName; });
1863
- if (!fieldSchema) return [3 /*break*/, 7];
1863
+ if (!fieldSchema) return [3 /*break*/, 9];
1864
1864
  cityfield = void 0;
1865
1865
  if (fieldSchema.LookupObject == "City") {
1866
1866
  cityfield = updateObj[fldName];
@@ -1901,7 +1901,14 @@ function CheckDataBeforeAdd(updateObj, objectSchema, db) {
1901
1901
  if (fieldSchema.UIDataType == 'formula')
1902
1902
  delete updateObj[fldName];
1903
1903
  _c.label = 7;
1904
- case 7: return [2 /*return*/];
1904
+ case 7:
1905
+ // QPC-9020 for State and Country Field Server Side Validation
1906
+ return [4 /*yield*/, ValidateStateCountryField({ fieldSchema: fieldSchema, updateObj: updateObj, objectSchema: objectSchema, db: db, cityfield: cityfield })];
1907
+ case 8:
1908
+ // QPC-9020 for State and Country Field Server Side Validation
1909
+ _c.sent();
1910
+ _c.label = 9;
1911
+ case 9: return [2 /*return*/];
1905
1912
  }
1906
1913
  });
1907
1914
  };
@@ -1937,10 +1944,10 @@ function CheckDataBeforeUpdate(updateObj, objectData, objectSchema, db) {
1937
1944
  case 0:
1938
1945
  if (!(fldName == '_id')) return [3 /*break*/, 1];
1939
1946
  delete updateObj[fldName];
1940
- return [3 /*break*/, 5];
1947
+ return [3 /*break*/, 7];
1941
1948
  case 1:
1942
1949
  fieldSchema = objectSchema.Fields.find(function (x) { return x.Name == fldName; });
1943
- if (!fieldSchema) return [3 /*break*/, 5];
1950
+ if (!fieldSchema) return [3 /*break*/, 7];
1944
1951
  cityfield = void 0;
1945
1952
  if (fieldSchema.LookupObject == "City") {
1946
1953
  cityfield = updateObj[fldName];
@@ -1968,7 +1975,14 @@ function CheckDataBeforeUpdate(updateObj, objectData, objectSchema, db) {
1968
1975
  case 4:
1969
1976
  _c.sent();
1970
1977
  _c.label = 5;
1971
- case 5: return [2 /*return*/];
1978
+ case 5:
1979
+ // QPC-9020 for State and Country Field Server Side Validation
1980
+ return [4 /*yield*/, ValidateStateCountryField({ fieldSchema: fieldSchema, updateObj: updateObj, objectSchema: objectSchema, db: db, cityfield: cityfield })];
1981
+ case 6:
1982
+ // QPC-9020 for State and Country Field Server Side Validation
1983
+ _c.sent();
1984
+ _c.label = 7;
1985
+ case 7: return [2 /*return*/];
1972
1986
  }
1973
1987
  });
1974
1988
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimiser/common",
3
- "version": "1.0.386",
3
+ "version": "1.0.387",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {