x25 5.1.19 → 5.1.20

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/Account/request.js +12 -1
  2. package/package.json +1 -1
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.fetchInitialInformation = undefined;
7
7
 
8
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
9
+
8
10
  var _superagent = require("superagent");
9
11
 
10
12
  var _superagent2 = _interopRequireDefault(_superagent);
@@ -19,6 +21,15 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
24
+ var normalizeCompanies = function normalizeCompanies(companies) {
25
+ return companies.map(function (company) {
26
+ return _extends({}, company, {
27
+ CountyID: company.CountyID.Int32,
28
+ CityID: company.CityID.Int32
29
+ });
30
+ });
31
+ };
32
+
22
33
  var normalizeInitialInformation = function normalizeInitialInformation(info) {
23
34
  var Account = info.Account,
24
35
  IsConnected = info.IsConnected,
@@ -31,7 +42,7 @@ var normalizeInitialInformation = function normalizeInitialInformation(info) {
31
42
  IsConnected: IsConnected,
32
43
  Error: IsConnected ? _utility.noError : "Not connected",
33
44
  Counties: typeof Counties === "undefined" ? Immutable.List() : (0, _utility.normalizeArrayByField)(Counties, "Short").entities,
34
- Companies: typeof Companies === "undefined" ? Immutable.List() : (0, _utility.normalizeArray)(Companies).entities
45
+ Companies: typeof Companies === "undefined" ? Immutable.List() : (0, _utility.normalizeArray)(normalizeCompanies(Companies)).entities
35
46
  };
36
47
  };
37
48
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.19",
2
+ "version": "5.1.20",
3
3
  "name": "x25",
4
4
  "description": "x25",
5
5
  "scripts": {