|
3 | 3 |
|
4 | 4 | angular = 'default' in angular ? angular['default'] : angular;
|
5 | 5 |
|
6 |
| - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
7 |
| - return typeof obj; |
8 |
| - } : function (obj) { |
9 |
| - return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
10 |
| - }; |
11 |
| - |
12 |
| - var classCallCheck = function (instance, Constructor) { |
13 |
| - if (!(instance instanceof Constructor)) { |
14 |
| - throw new TypeError("Cannot call a class as a function"); |
15 |
| - } |
16 |
| - }; |
| 6 | + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
17 | 7 |
|
18 |
| - var createClass = function () { |
19 |
| - function defineProperties(target, props) { |
20 |
| - for (var i = 0; i < props.length; i++) { |
21 |
| - var descriptor = props[i]; |
22 |
| - descriptor.enumerable = descriptor.enumerable || false; |
23 |
| - descriptor.configurable = true; |
24 |
| - if ("value" in descriptor) descriptor.writable = true; |
25 |
| - Object.defineProperty(target, descriptor.key, descriptor); |
26 |
| - } |
27 |
| - } |
| 8 | + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); |
28 | 9 |
|
29 |
| - return function (Constructor, protoProps, staticProps) { |
30 |
| - if (protoProps) defineProperties(Constructor.prototype, protoProps); |
31 |
| - if (staticProps) defineProperties(Constructor, staticProps); |
32 |
| - return Constructor; |
33 |
| - }; |
34 |
| - }(); |
| 10 | + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } |
35 | 11 |
|
36 | 12 | var find = function find(list, match) {
|
37 | 13 | for (var i = 0; i < list.length; i++) {
|
|
72 | 48 |
|
73 | 49 | var StateIndicatorsService = function () {
|
74 | 50 | function StateIndicatorsService($q, smartId, STOCK_STATUSES, lgasService, statesService, zonesService, thresholdsService, productListService) {
|
75 |
| - classCallCheck(this, StateIndicatorsService); |
| 51 | + _classCallCheck(this, StateIndicatorsService); |
76 | 52 |
|
77 | 53 | this.$q = $q;
|
78 | 54 | this.smartId = smartId;
|
|
84 | 60 | this.productListService = productListService;
|
85 | 61 | }
|
86 | 62 |
|
87 |
| - createClass(StateIndicatorsService, [{ |
| 63 | + _createClass(StateIndicatorsService, [{ |
88 | 64 | key: 'stateRequiredAllocationsByZone',
|
89 | 65 | value: function stateRequiredAllocationsByZone(stockCounts) {
|
90 | 66 | var _this = this;
|
|
137 | 113 | var location = getLocation(lgas, states, zones, stockCount);
|
138 | 114 | var locationThresholds = void 0;
|
139 | 115 | if (location && location.level === 'zone') {
|
140 |
| - // Temporary fix for https://github.com/fielded/nav-integrated-national-dashboard/issues/265 |
141 |
| - // This should be removed when https://github.com/fielded/nav-etl/issues/136 is fixed |
142 |
| - locationThresholds = _this2.thresholdsService.calculateThresholds(location, stockCount, products, requiredAllocations[location._id], { version: 'last' }); |
| 116 | + locationThresholds = _this2.thresholdsService.calculateThresholds(location, stockCount, products, requiredAllocations[location._id]); |
143 | 117 | } else {
|
144 | 118 | locationThresholds = _this2.thresholdsService.calculateThresholds(location, stockCount, products);
|
145 | 119 | }
|
|
278 | 252 | return this.$q.all(promises).then(decorateStockCounts.bind(null, nonZoneStockCounts, zoneStockCounts));
|
279 | 253 | }
|
280 | 254 | }]);
|
| 255 | + |
281 | 256 | return StateIndicatorsService;
|
282 | 257 | }();
|
283 | 258 |
|
|
0 commit comments