@ricado/api-client 2.1.0 → 2.3.0
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/README.md +5 -7
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipBinController.js +622 -0
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
- package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +657 -0
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +25 -1
- package/lib/Controllers/Packhouse/Site/PackrunController.js +42 -0
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +24 -2
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +661 -0
- package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +628 -0
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +453 -0
- package/lib/Controllers/Packhouse/Site/index.js +15 -0
- package/lib/DataItems/PointValueItem.js +3 -3
- package/lib/Models/AccountPolicyModel.js +7 -7
- package/lib/Models/ApiAccountModel.js +7 -7
- package/lib/Models/CompanyModel.js +5 -5
- package/lib/Models/FirebaseTokenModel.js +8 -8
- package/lib/Models/Packhouse/Site/BinTipBinModel.js +367 -0
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +15 -15
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
- package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +481 -0
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
- package/lib/Models/Packhouse/Site/PackTypeModel.js +8 -8
- package/lib/Models/Packhouse/Site/PackingLineModel.js +539 -16
- package/lib/Models/Packhouse/Site/PackrunModel.js +81 -15
- package/lib/Models/Packhouse/Site/RejectBinModel.js +9 -9
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +271 -15
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +204 -38
- package/lib/Models/Packhouse/Site/ShiftModel.js +26 -19
- package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +599 -0
- package/lib/Models/Packhouse/Site/ShiftTaskModel.js +373 -0
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
- package/lib/Models/Packhouse/Site/VarietyModel.js +8 -8
- package/lib/Models/Packhouse/Site/index.js +15 -0
- package/lib/Models/RTUModel.js +6 -6
- package/lib/Models/RTUPluginModel.js +5 -5
- package/lib/Models/Site/AlarmGroupModel.js +7 -7
- package/lib/Models/Site/AlarmModel.js +17 -17
- package/lib/Models/Site/DefinitionModel.js +6 -6
- package/lib/Models/Site/PermanentObjectDataModel.js +8 -8
- package/lib/Models/Site/PermanentObjectModel.js +7 -7
- package/lib/Models/Site/PointModel.js +11 -11
- package/lib/Models/Site/TemporaryObjectModel.js +6 -6
- package/lib/Models/SiteModel.js +6 -6
- package/lib/Models/TokenModel.js +10 -10
- package/lib/Models/UserAccountActionTokenModel.js +11 -11
- package/lib/Models/UserAccountModel.js +10 -10
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +22 -12
- package/lib/WebSocketHelper.js +29 -13
- package/lib/index.d.ts +3853 -1290
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBinController.js +665 -0
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +3 -3
- package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +700 -0
- package/src/Controllers/Packhouse/Site/PackingLineController.js +25 -1
- package/src/Controllers/Packhouse/Site/PackrunController.js +52 -0
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +24 -2
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +15 -0
- package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +704 -0
- package/src/Controllers/Packhouse/Site/ShiftTaskController.js +671 -0
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +474 -0
- package/src/Controllers/Packhouse/Site/index.js +10 -0
- package/src/DataItems/PointValueItem.js +3 -3
- package/src/Models/AccountPolicyModel.js +7 -7
- package/src/Models/ApiAccountModel.js +7 -7
- package/src/Models/CompanyModel.js +5 -5
- package/src/Models/FirebaseTokenModel.js +8 -8
- package/src/Models/Packhouse/Site/BinTipBinModel.js +365 -0
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
- package/src/Models/Packhouse/Site/CompacSizerModel.js +15 -15
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
- package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +523 -0
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
- package/src/Models/Packhouse/Site/PackTypeModel.js +8 -8
- package/src/Models/Packhouse/Site/PackingLineModel.js +720 -16
- package/src/Models/Packhouse/Site/PackrunModel.js +90 -15
- package/src/Models/Packhouse/Site/RejectBinModel.js +9 -9
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +308 -15
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +229 -38
- package/src/Models/Packhouse/Site/ShiftModel.js +29 -19
- package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +664 -0
- package/src/Models/Packhouse/Site/ShiftTaskModel.js +369 -0
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
- package/src/Models/Packhouse/Site/VarietyModel.js +8 -8
- package/src/Models/Packhouse/Site/index.js +10 -0
- package/src/Models/RTUModel.js +6 -6
- package/src/Models/RTUPluginModel.js +5 -5
- package/src/Models/Site/AlarmGroupModel.js +7 -7
- package/src/Models/Site/AlarmModel.js +17 -17
- package/src/Models/Site/DefinitionModel.js +6 -6
- package/src/Models/Site/PermanentObjectDataModel.js +8 -8
- package/src/Models/Site/PermanentObjectModel.js +7 -7
- package/src/Models/Site/PointModel.js +11 -11
- package/src/Models/Site/TemporaryObjectModel.js +6 -6
- package/src/Models/SiteModel.js +6 -6
- package/src/Models/TokenModel.js +10 -10
- package/src/Models/UserAccountActionTokenModel.js +11 -11
- package/src/Models/UserAccountModel.js +10 -10
- package/src/PackageVersion.js +1 -1
- package/src/Points.js +24 -12
- package/src/WebSocketHelper.js +34 -13
- package/src/index.js +3 -3
- package/types/tslint.json +2 -1
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
|
+
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
|
|
16
|
+
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); } }
|
|
17
|
+
|
|
18
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
+
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
|
+
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
+
|
|
24
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
25
|
+
|
|
26
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
|
+
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
+
|
|
30
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
|
+
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Model Class for a Shift Quality Summary
|
|
36
|
+
*
|
|
37
|
+
* @class
|
|
38
|
+
* @hideconstructor
|
|
39
|
+
* @extends BaseModel
|
|
40
|
+
*/
|
|
41
|
+
var ShiftQualitySummaryModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(ShiftQualitySummaryModel, _BaseModel);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(ShiftQualitySummaryModel);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* ShiftQualitySummaryModel Constructor
|
|
48
|
+
*
|
|
49
|
+
* @protected
|
|
50
|
+
* @param {number} siteId The Site ID associated with this Shift Quality Summary
|
|
51
|
+
*/
|
|
52
|
+
function ShiftQualitySummaryModel(siteId) {
|
|
53
|
+
var _this;
|
|
54
|
+
|
|
55
|
+
_classCallCheck(this, ShiftQualitySummaryModel);
|
|
56
|
+
|
|
57
|
+
_this = _super.call(this);
|
|
58
|
+
/**
|
|
59
|
+
* The Shift Quality Summary ID
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
_this.id = "";
|
|
66
|
+
/**
|
|
67
|
+
* The Packing Line ID this Quality Summary is associated with
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
_this.packingLineId = "";
|
|
74
|
+
/**
|
|
75
|
+
* The Shift ID this Quality Summary is asssociated with
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
_this.shiftId = "";
|
|
82
|
+
/**
|
|
83
|
+
* When this Quality Summary was Created
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
_this.createdTimestamp = new Date();
|
|
90
|
+
/**
|
|
91
|
+
* When this Quality Summary was Published
|
|
92
|
+
*
|
|
93
|
+
* @type {?Date}
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
_this.publishTimestamp = null;
|
|
98
|
+
/**
|
|
99
|
+
* The User ID of the Quality Manager for this Summary
|
|
100
|
+
*
|
|
101
|
+
* @type {?string}
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
_this.qualityManagerUserId = null;
|
|
106
|
+
/**
|
|
107
|
+
* The Name of the Quality Manager for this Summary
|
|
108
|
+
*
|
|
109
|
+
* @type {string}
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
_this.qualityManagerName = "";
|
|
114
|
+
/**
|
|
115
|
+
* An Array of Accuracy Results for this Summary
|
|
116
|
+
*
|
|
117
|
+
* @type {Array<{type: string, value: number}>}
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
_this.accuracyResults = [];
|
|
122
|
+
/**
|
|
123
|
+
* An Array of Audit Results for this Summary
|
|
124
|
+
*
|
|
125
|
+
* @type {Array<{type: string, value: number}>}
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
_this.auditResults = [];
|
|
130
|
+
/**
|
|
131
|
+
* An Array of Packrun Results for this Summary
|
|
132
|
+
*
|
|
133
|
+
* @type {Array<{packrunId: string, packrunName: string, minorPackingDefects: number, majorPackingDefects: number, softs: number, cuts: number, rots: number, softsLineAverageSampleSize: ?number, softsLineAverageValue: ?number, exportFruitInClass2: ?number, exportFruitInLocalMarket: ?number, exportFruitInWaste: ?number}>}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
_this.packrunResults = [];
|
|
138
|
+
/**
|
|
139
|
+
* An Optional Rating between 1 and 10 on how Satisfied the Quality Manager was with this Shift
|
|
140
|
+
*
|
|
141
|
+
* @type {?number}
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
_this.satisfactionRating = null;
|
|
146
|
+
/**
|
|
147
|
+
* The Status of this Quality Summary
|
|
148
|
+
*
|
|
149
|
+
* @type {string}
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
_this.status = "";
|
|
154
|
+
/**
|
|
155
|
+
* Whether the Shift Quality Summary has been deleted
|
|
156
|
+
*
|
|
157
|
+
* @type {boolean}
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
_this.deleted = false;
|
|
162
|
+
/**
|
|
163
|
+
* When the Shift Quality Summary was last updated
|
|
164
|
+
*
|
|
165
|
+
* @type {Date}
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
_this.updateTimestamp = new Date();
|
|
170
|
+
/**
|
|
171
|
+
* The Site ID associated with this Shift Quality Summary
|
|
172
|
+
*
|
|
173
|
+
* @type {number}
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
_this.siteId = siteId;
|
|
178
|
+
return _this;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Create a new **ShiftQualitySummaryModel** from a JSON Object or JSON String
|
|
182
|
+
*
|
|
183
|
+
* @static
|
|
184
|
+
* @public
|
|
185
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
186
|
+
* @param {number} siteId The Site ID associated with this Shift Quality Summary
|
|
187
|
+
* @return {ShiftQualitySummaryModel}
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
_createClass(ShiftQualitySummaryModel, null, [{
|
|
192
|
+
key: "fromJSON",
|
|
193
|
+
value: function fromJSON(json, siteId) {
|
|
194
|
+
var model = new ShiftQualitySummaryModel(siteId);
|
|
195
|
+
/**
|
|
196
|
+
* The JSON Object
|
|
197
|
+
*
|
|
198
|
+
* @type {Object<string, any>}
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
var jsonObject = {};
|
|
202
|
+
|
|
203
|
+
if (typeof json === 'string') {
|
|
204
|
+
jsonObject = JSON.parse(json);
|
|
205
|
+
} else if (_typeof(json) === 'object') {
|
|
206
|
+
jsonObject = json;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if ('id' in jsonObject) {
|
|
210
|
+
model.id = function () {
|
|
211
|
+
if (typeof jsonObject['id'] !== 'string') {
|
|
212
|
+
return String(jsonObject['id']);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return jsonObject['id'];
|
|
216
|
+
}();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if ('packingLineId' in jsonObject) {
|
|
220
|
+
model.packingLineId = function () {
|
|
221
|
+
if (typeof jsonObject['packingLineId'] !== 'string') {
|
|
222
|
+
return String(jsonObject['packingLineId']);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return jsonObject['packingLineId'];
|
|
226
|
+
}();
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if ('shiftId' in jsonObject) {
|
|
230
|
+
model.shiftId = function () {
|
|
231
|
+
if (typeof jsonObject['shiftId'] !== 'string') {
|
|
232
|
+
return String(jsonObject['shiftId']);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return jsonObject['shiftId'];
|
|
236
|
+
}();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if ('createdTimestamp' in jsonObject) {
|
|
240
|
+
model.createdTimestamp = function () {
|
|
241
|
+
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
242
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
246
|
+
}();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if ('publishTimestamp' in jsonObject) {
|
|
250
|
+
model.publishTimestamp = function () {
|
|
251
|
+
if (jsonObject['publishTimestamp'] === null) {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (typeof jsonObject['publishTimestamp'] !== 'string') {
|
|
256
|
+
return new Date(String(jsonObject['publishTimestamp']));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return new Date(jsonObject['publishTimestamp']);
|
|
260
|
+
}();
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if ('qualityManagerUserId' in jsonObject) {
|
|
264
|
+
model.qualityManagerUserId = function () {
|
|
265
|
+
if (jsonObject['qualityManagerUserId'] === null) {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (typeof jsonObject['qualityManagerUserId'] !== 'string') {
|
|
270
|
+
return String(jsonObject['qualityManagerUserId']);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return jsonObject['qualityManagerUserId'];
|
|
274
|
+
}();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if ('qualityManagerName' in jsonObject) {
|
|
278
|
+
model.qualityManagerName = function () {
|
|
279
|
+
if (typeof jsonObject['qualityManagerName'] !== 'string') {
|
|
280
|
+
return String(jsonObject['qualityManagerName']);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return jsonObject['qualityManagerName'];
|
|
284
|
+
}();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if ('accuracyResults' in jsonObject) {
|
|
288
|
+
model.accuracyResults = function () {
|
|
289
|
+
if (Array.isArray(jsonObject['accuracyResults']) !== true) {
|
|
290
|
+
return [];
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return jsonObject['accuracyResults'].map(function (accuracyResultsItem) {
|
|
294
|
+
return function () {
|
|
295
|
+
var accuracyResultsItemObject = {};
|
|
296
|
+
|
|
297
|
+
if (_typeof(accuracyResultsItem) === 'object' && 'type' in accuracyResultsItem) {
|
|
298
|
+
accuracyResultsItemObject.type = function () {
|
|
299
|
+
if (typeof accuracyResultsItem.type !== 'string') {
|
|
300
|
+
return String(accuracyResultsItem.type);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return accuracyResultsItem.type;
|
|
304
|
+
}();
|
|
305
|
+
} else {
|
|
306
|
+
accuracyResultsItemObject.type = "";
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (_typeof(accuracyResultsItem) === 'object' && 'value' in accuracyResultsItem) {
|
|
310
|
+
accuracyResultsItemObject.value = function () {
|
|
311
|
+
if (typeof accuracyResultsItem.value !== 'number') {
|
|
312
|
+
return Number(accuracyResultsItem.value);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return accuracyResultsItem.value;
|
|
316
|
+
}();
|
|
317
|
+
} else {
|
|
318
|
+
accuracyResultsItemObject.value = 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return accuracyResultsItemObject;
|
|
322
|
+
}();
|
|
323
|
+
});
|
|
324
|
+
}();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if ('auditResults' in jsonObject) {
|
|
328
|
+
model.auditResults = function () {
|
|
329
|
+
if (Array.isArray(jsonObject['auditResults']) !== true) {
|
|
330
|
+
return [];
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return jsonObject['auditResults'].map(function (auditResultsItem) {
|
|
334
|
+
return function () {
|
|
335
|
+
var auditResultsItemObject = {};
|
|
336
|
+
|
|
337
|
+
if (_typeof(auditResultsItem) === 'object' && 'type' in auditResultsItem) {
|
|
338
|
+
auditResultsItemObject.type = function () {
|
|
339
|
+
if (typeof auditResultsItem.type !== 'string') {
|
|
340
|
+
return String(auditResultsItem.type);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
return auditResultsItem.type;
|
|
344
|
+
}();
|
|
345
|
+
} else {
|
|
346
|
+
auditResultsItemObject.type = "";
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (_typeof(auditResultsItem) === 'object' && 'value' in auditResultsItem) {
|
|
350
|
+
auditResultsItemObject.value = function () {
|
|
351
|
+
if (typeof auditResultsItem.value !== 'number') {
|
|
352
|
+
return Number(auditResultsItem.value);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
return auditResultsItem.value;
|
|
356
|
+
}();
|
|
357
|
+
} else {
|
|
358
|
+
auditResultsItemObject.value = 0;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return auditResultsItemObject;
|
|
362
|
+
}();
|
|
363
|
+
});
|
|
364
|
+
}();
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
if ('packrunResults' in jsonObject) {
|
|
368
|
+
model.packrunResults = function () {
|
|
369
|
+
if (Array.isArray(jsonObject['packrunResults']) !== true) {
|
|
370
|
+
return [];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return jsonObject['packrunResults'].map(function (packrunResultsItem) {
|
|
374
|
+
return function () {
|
|
375
|
+
var packrunResultsItemObject = {};
|
|
376
|
+
|
|
377
|
+
if (_typeof(packrunResultsItem) === 'object' && 'packrunId' in packrunResultsItem) {
|
|
378
|
+
packrunResultsItemObject.packrunId = function () {
|
|
379
|
+
if (typeof packrunResultsItem.packrunId !== 'string') {
|
|
380
|
+
return String(packrunResultsItem.packrunId);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
return packrunResultsItem.packrunId;
|
|
384
|
+
}();
|
|
385
|
+
} else {
|
|
386
|
+
packrunResultsItemObject.packrunId = "";
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (_typeof(packrunResultsItem) === 'object' && 'packrunName' in packrunResultsItem) {
|
|
390
|
+
packrunResultsItemObject.packrunName = function () {
|
|
391
|
+
if (typeof packrunResultsItem.packrunName !== 'string') {
|
|
392
|
+
return String(packrunResultsItem.packrunName);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return packrunResultsItem.packrunName;
|
|
396
|
+
}();
|
|
397
|
+
} else {
|
|
398
|
+
packrunResultsItemObject.packrunName = "";
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
if (_typeof(packrunResultsItem) === 'object' && 'minorPackingDefects' in packrunResultsItem) {
|
|
402
|
+
packrunResultsItemObject.minorPackingDefects = function () {
|
|
403
|
+
if (typeof packrunResultsItem.minorPackingDefects !== 'number') {
|
|
404
|
+
return Number(packrunResultsItem.minorPackingDefects);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
return packrunResultsItem.minorPackingDefects;
|
|
408
|
+
}();
|
|
409
|
+
} else {
|
|
410
|
+
packrunResultsItemObject.minorPackingDefects = 0;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if (_typeof(packrunResultsItem) === 'object' && 'majorPackingDefects' in packrunResultsItem) {
|
|
414
|
+
packrunResultsItemObject.majorPackingDefects = function () {
|
|
415
|
+
if (typeof packrunResultsItem.majorPackingDefects !== 'number') {
|
|
416
|
+
return Number(packrunResultsItem.majorPackingDefects);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return packrunResultsItem.majorPackingDefects;
|
|
420
|
+
}();
|
|
421
|
+
} else {
|
|
422
|
+
packrunResultsItemObject.majorPackingDefects = 0;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if (_typeof(packrunResultsItem) === 'object' && 'softs' in packrunResultsItem) {
|
|
426
|
+
packrunResultsItemObject.softs = function () {
|
|
427
|
+
if (typeof packrunResultsItem.softs !== 'number') {
|
|
428
|
+
return Number(packrunResultsItem.softs);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return packrunResultsItem.softs;
|
|
432
|
+
}();
|
|
433
|
+
} else {
|
|
434
|
+
packrunResultsItemObject.softs = 0;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (_typeof(packrunResultsItem) === 'object' && 'cuts' in packrunResultsItem) {
|
|
438
|
+
packrunResultsItemObject.cuts = function () {
|
|
439
|
+
if (typeof packrunResultsItem.cuts !== 'number') {
|
|
440
|
+
return Number(packrunResultsItem.cuts);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
return packrunResultsItem.cuts;
|
|
444
|
+
}();
|
|
445
|
+
} else {
|
|
446
|
+
packrunResultsItemObject.cuts = 0;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
if (_typeof(packrunResultsItem) === 'object' && 'rots' in packrunResultsItem) {
|
|
450
|
+
packrunResultsItemObject.rots = function () {
|
|
451
|
+
if (typeof packrunResultsItem.rots !== 'number') {
|
|
452
|
+
return Number(packrunResultsItem.rots);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return packrunResultsItem.rots;
|
|
456
|
+
}();
|
|
457
|
+
} else {
|
|
458
|
+
packrunResultsItemObject.rots = 0;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
if (_typeof(packrunResultsItem) === 'object' && 'softsLineAverageSampleSize' in packrunResultsItem) {
|
|
462
|
+
packrunResultsItemObject.softsLineAverageSampleSize = function () {
|
|
463
|
+
if (packrunResultsItem.softsLineAverageSampleSize === null) {
|
|
464
|
+
return null;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if (typeof packrunResultsItem.softsLineAverageSampleSize !== 'number') {
|
|
468
|
+
return Number.isInteger(Number(packrunResultsItem.softsLineAverageSampleSize)) ? Number(packrunResultsItem.softsLineAverageSampleSize) : Math.floor(Number(packrunResultsItem.softsLineAverageSampleSize));
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return Number.isInteger(packrunResultsItem.softsLineAverageSampleSize) ? packrunResultsItem.softsLineAverageSampleSize : Math.floor(packrunResultsItem.softsLineAverageSampleSize);
|
|
472
|
+
}();
|
|
473
|
+
} else {
|
|
474
|
+
packrunResultsItemObject.softsLineAverageSampleSize = null;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if (_typeof(packrunResultsItem) === 'object' && 'softsLineAverageValue' in packrunResultsItem) {
|
|
478
|
+
packrunResultsItemObject.softsLineAverageValue = function () {
|
|
479
|
+
if (packrunResultsItem.softsLineAverageValue === null) {
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (typeof packrunResultsItem.softsLineAverageValue !== 'number') {
|
|
484
|
+
return Number(packrunResultsItem.softsLineAverageValue);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return packrunResultsItem.softsLineAverageValue;
|
|
488
|
+
}();
|
|
489
|
+
} else {
|
|
490
|
+
packrunResultsItemObject.softsLineAverageValue = null;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if (_typeof(packrunResultsItem) === 'object' && 'exportFruitInClass2' in packrunResultsItem) {
|
|
494
|
+
packrunResultsItemObject.exportFruitInClass2 = function () {
|
|
495
|
+
if (packrunResultsItem.exportFruitInClass2 === null) {
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if (typeof packrunResultsItem.exportFruitInClass2 !== 'number') {
|
|
500
|
+
return Number(packrunResultsItem.exportFruitInClass2);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return packrunResultsItem.exportFruitInClass2;
|
|
504
|
+
}();
|
|
505
|
+
} else {
|
|
506
|
+
packrunResultsItemObject.exportFruitInClass2 = null;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
if (_typeof(packrunResultsItem) === 'object' && 'exportFruitInLocalMarket' in packrunResultsItem) {
|
|
510
|
+
packrunResultsItemObject.exportFruitInLocalMarket = function () {
|
|
511
|
+
if (packrunResultsItem.exportFruitInLocalMarket === null) {
|
|
512
|
+
return null;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
if (typeof packrunResultsItem.exportFruitInLocalMarket !== 'number') {
|
|
516
|
+
return Number(packrunResultsItem.exportFruitInLocalMarket);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return packrunResultsItem.exportFruitInLocalMarket;
|
|
520
|
+
}();
|
|
521
|
+
} else {
|
|
522
|
+
packrunResultsItemObject.exportFruitInLocalMarket = null;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if (_typeof(packrunResultsItem) === 'object' && 'exportFruitInWaste' in packrunResultsItem) {
|
|
526
|
+
packrunResultsItemObject.exportFruitInWaste = function () {
|
|
527
|
+
if (packrunResultsItem.exportFruitInWaste === null) {
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (typeof packrunResultsItem.exportFruitInWaste !== 'number') {
|
|
532
|
+
return Number(packrunResultsItem.exportFruitInWaste);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
return packrunResultsItem.exportFruitInWaste;
|
|
536
|
+
}();
|
|
537
|
+
} else {
|
|
538
|
+
packrunResultsItemObject.exportFruitInWaste = null;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
return packrunResultsItemObject;
|
|
542
|
+
}();
|
|
543
|
+
});
|
|
544
|
+
}();
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
if ('satisfactionRating' in jsonObject) {
|
|
548
|
+
model.satisfactionRating = function () {
|
|
549
|
+
if (jsonObject['satisfactionRating'] === null) {
|
|
550
|
+
return null;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
if (typeof jsonObject['satisfactionRating'] !== 'number') {
|
|
554
|
+
return Number.isInteger(Number(jsonObject['satisfactionRating'])) ? Number(jsonObject['satisfactionRating']) : Math.floor(Number(jsonObject['satisfactionRating']));
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return Number.isInteger(jsonObject['satisfactionRating']) ? jsonObject['satisfactionRating'] : Math.floor(jsonObject['satisfactionRating']);
|
|
558
|
+
}();
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
if ('status' in jsonObject) {
|
|
562
|
+
model.status = function () {
|
|
563
|
+
if (typeof jsonObject['status'] !== 'string') {
|
|
564
|
+
return String(jsonObject['status']);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
return jsonObject['status'];
|
|
568
|
+
}();
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
if ('deleted' in jsonObject) {
|
|
572
|
+
model.deleted = function () {
|
|
573
|
+
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
574
|
+
return Boolean(jsonObject['deleted']);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
return jsonObject['deleted'];
|
|
578
|
+
}();
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if ('updateTimestamp' in jsonObject) {
|
|
582
|
+
model.updateTimestamp = function () {
|
|
583
|
+
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
584
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
588
|
+
}();
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
return model;
|
|
592
|
+
}
|
|
593
|
+
}]);
|
|
594
|
+
|
|
595
|
+
return ShiftQualitySummaryModel;
|
|
596
|
+
}(_BaseModel2.default);
|
|
597
|
+
|
|
598
|
+
var _default = ShiftQualitySummaryModel;
|
|
599
|
+
exports.default = _default;
|