@ricado/api-client 2.3.11 → 2.3.14

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.
@@ -0,0 +1,4110 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _RequestHelper = _interopRequireDefault(require("../../RequestHelper"));
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
+ /**
21
+ * The Production Data Export Controller Class
22
+ *
23
+ * @class
24
+ */
25
+ var ProductionDataExportController = /*#__PURE__*/function () {
26
+ function ProductionDataExportController() {
27
+ _classCallCheck(this, ProductionDataExportController);
28
+ }
29
+
30
+ _createClass(ProductionDataExportController, null, [{
31
+ key: "jsonExport",
32
+ value:
33
+ /**
34
+ * Retrieve Production Data [GET /packhouse/production-data-export]
35
+ *
36
+ * Request a Production Data Export in the default JSON Format
37
+ *
38
+ * @static
39
+ * @public
40
+ * @param {Date} dateBegin The Beginning Date of the Production Data Export
41
+ * @param {Date} dateEnd The End Date of the Production Data Export
42
+ * @param {ProductionDataExportController.JsonExportQueryParameters} [queryParameters] The Optional Query Parameters
43
+ * @return {Promise<ProductionDataExportController.ProductionData>}
44
+ */
45
+ function jsonExport(dateBegin, dateEnd) {
46
+ var queryParameters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
47
+ return new Promise(function (resolve, reject) {
48
+ _RequestHelper.default.getRequest("/packhouse/production-data-export", Object.assign(queryParameters, {
49
+ dateBegin: dateBegin,
50
+ dateEnd: dateEnd
51
+ })).then(function (result) {
52
+ var resolveValue = function () {
53
+ var resultObject = {};
54
+
55
+ if (_typeof(result) === 'object' && 'packruns' in result) {
56
+ resultObject.packruns = function () {
57
+ if (Array.isArray(result.packruns) !== true) {
58
+ return [];
59
+ }
60
+
61
+ return result.packruns.map(function (packrunsItem) {
62
+ return function () {
63
+ var packrunsItemObject = {};
64
+
65
+ if (_typeof(packrunsItem) === 'object' && 'siteId' in packrunsItem) {
66
+ packrunsItemObject.siteId = function () {
67
+ if (typeof packrunsItem.siteId !== 'number') {
68
+ return Number.isInteger(Number(packrunsItem.siteId)) ? Number(packrunsItem.siteId) : Math.floor(Number(packrunsItem.siteId));
69
+ }
70
+
71
+ return Number.isInteger(packrunsItem.siteId) ? packrunsItem.siteId : Math.floor(packrunsItem.siteId);
72
+ }();
73
+ } else {
74
+ packrunsItemObject.siteId = 0;
75
+ }
76
+
77
+ if (_typeof(packrunsItem) === 'object' && 'siteName' in packrunsItem) {
78
+ packrunsItemObject.siteName = function () {
79
+ if (typeof packrunsItem.siteName !== 'string') {
80
+ return String(packrunsItem.siteName);
81
+ }
82
+
83
+ return packrunsItem.siteName;
84
+ }();
85
+ } else {
86
+ packrunsItemObject.siteName = "";
87
+ }
88
+
89
+ if (_typeof(packrunsItem) === 'object' && 'packingLineId' in packrunsItem) {
90
+ packrunsItemObject.packingLineId = function () {
91
+ if (typeof packrunsItem.packingLineId !== 'string') {
92
+ return String(packrunsItem.packingLineId);
93
+ }
94
+
95
+ return packrunsItem.packingLineId;
96
+ }();
97
+ } else {
98
+ packrunsItemObject.packingLineId = "";
99
+ }
100
+
101
+ if (_typeof(packrunsItem) === 'object' && 'packingLineName' in packrunsItem) {
102
+ packrunsItemObject.packingLineName = function () {
103
+ if (typeof packrunsItem.packingLineName !== 'string') {
104
+ return String(packrunsItem.packingLineName);
105
+ }
106
+
107
+ return packrunsItem.packingLineName;
108
+ }();
109
+ } else {
110
+ packrunsItemObject.packingLineName = "";
111
+ }
112
+
113
+ if (_typeof(packrunsItem) === 'object' && 'isoWeek' in packrunsItem) {
114
+ packrunsItemObject.isoWeek = function () {
115
+ if (typeof packrunsItem.isoWeek !== 'number') {
116
+ return Number.isInteger(Number(packrunsItem.isoWeek)) ? Number(packrunsItem.isoWeek) : Math.floor(Number(packrunsItem.isoWeek));
117
+ }
118
+
119
+ return Number.isInteger(packrunsItem.isoWeek) ? packrunsItem.isoWeek : Math.floor(packrunsItem.isoWeek);
120
+ }();
121
+ } else {
122
+ packrunsItemObject.isoWeek = 0;
123
+ }
124
+
125
+ if (_typeof(packrunsItem) === 'object' && 'startTimestamp' in packrunsItem) {
126
+ packrunsItemObject.startTimestamp = function () {
127
+ if (typeof packrunsItem.startTimestamp !== 'string') {
128
+ return new Date(String(packrunsItem.startTimestamp));
129
+ }
130
+
131
+ return new Date(packrunsItem.startTimestamp);
132
+ }();
133
+ } else {
134
+ packrunsItemObject.startTimestamp = new Date();
135
+ }
136
+
137
+ if (_typeof(packrunsItem) === 'object' && 'finishTimestamp' in packrunsItem) {
138
+ packrunsItemObject.finishTimestamp = function () {
139
+ if (packrunsItem.finishTimestamp === null) {
140
+ return null;
141
+ }
142
+
143
+ if (typeof packrunsItem.finishTimestamp !== 'string') {
144
+ return new Date(String(packrunsItem.finishTimestamp));
145
+ }
146
+
147
+ return new Date(packrunsItem.finishTimestamp);
148
+ }();
149
+ } else {
150
+ packrunsItemObject.finishTimestamp = null;
151
+ }
152
+
153
+ if (_typeof(packrunsItem) === 'object' && 'packrunId' in packrunsItem) {
154
+ packrunsItemObject.packrunId = function () {
155
+ if (typeof packrunsItem.packrunId !== 'string') {
156
+ return String(packrunsItem.packrunId);
157
+ }
158
+
159
+ return packrunsItem.packrunId;
160
+ }();
161
+ } else {
162
+ packrunsItemObject.packrunId = "";
163
+ }
164
+
165
+ if (_typeof(packrunsItem) === 'object' && 'packrunName' in packrunsItem) {
166
+ packrunsItemObject.packrunName = function () {
167
+ if (typeof packrunsItem.packrunName !== 'string') {
168
+ return String(packrunsItem.packrunName);
169
+ }
170
+
171
+ return packrunsItem.packrunName;
172
+ }();
173
+ } else {
174
+ packrunsItemObject.packrunName = "";
175
+ }
176
+
177
+ if (_typeof(packrunsItem) === 'object' && 'varietyId' in packrunsItem) {
178
+ packrunsItemObject.varietyId = function () {
179
+ if (typeof packrunsItem.varietyId !== 'string') {
180
+ return String(packrunsItem.varietyId);
181
+ }
182
+
183
+ return packrunsItem.varietyId;
184
+ }();
185
+ } else {
186
+ packrunsItemObject.varietyId = "";
187
+ }
188
+
189
+ if (_typeof(packrunsItem) === 'object' && 'varietyCode' in packrunsItem) {
190
+ packrunsItemObject.varietyCode = function () {
191
+ if (typeof packrunsItem.varietyCode !== 'string') {
192
+ return String(packrunsItem.varietyCode);
193
+ }
194
+
195
+ return packrunsItem.varietyCode;
196
+ }();
197
+ } else {
198
+ packrunsItemObject.varietyCode = "";
199
+ }
200
+
201
+ if (_typeof(packrunsItem) === 'object' && 'growingMethodId' in packrunsItem) {
202
+ packrunsItemObject.growingMethodId = function () {
203
+ if (typeof packrunsItem.growingMethodId !== 'string') {
204
+ return String(packrunsItem.growingMethodId);
205
+ }
206
+
207
+ return packrunsItem.growingMethodId;
208
+ }();
209
+ } else {
210
+ packrunsItemObject.growingMethodId = "";
211
+ }
212
+
213
+ if (_typeof(packrunsItem) === 'object' && 'growingMethodCode' in packrunsItem) {
214
+ packrunsItemObject.growingMethodCode = function () {
215
+ if (typeof packrunsItem.growingMethodCode !== 'string') {
216
+ return String(packrunsItem.growingMethodCode);
217
+ }
218
+
219
+ return packrunsItem.growingMethodCode;
220
+ }();
221
+ } else {
222
+ packrunsItemObject.growingMethodCode = "";
223
+ }
224
+
225
+ if (_typeof(packrunsItem) === 'object' && 'growerCode' in packrunsItem) {
226
+ packrunsItemObject.growerCode = function () {
227
+ if (typeof packrunsItem.growerCode !== 'string') {
228
+ return String(packrunsItem.growerCode);
229
+ }
230
+
231
+ return packrunsItem.growerCode;
232
+ }();
233
+ } else {
234
+ packrunsItemObject.growerCode = "";
235
+ }
236
+
237
+ if (_typeof(packrunsItem) === 'object' && 'growerName' in packrunsItem) {
238
+ packrunsItemObject.growerName = function () {
239
+ if (typeof packrunsItem.growerName !== 'string') {
240
+ return String(packrunsItem.growerName);
241
+ }
242
+
243
+ return packrunsItem.growerName;
244
+ }();
245
+ } else {
246
+ packrunsItemObject.growerName = "";
247
+ }
248
+
249
+ if (_typeof(packrunsItem) === 'object' && 'maturityArea' in packrunsItem) {
250
+ packrunsItemObject.maturityArea = function () {
251
+ if (typeof packrunsItem.maturityArea !== 'string') {
252
+ return String(packrunsItem.maturityArea);
253
+ }
254
+
255
+ return packrunsItem.maturityArea;
256
+ }();
257
+ } else {
258
+ packrunsItemObject.maturityArea = "";
259
+ }
260
+
261
+ if (_typeof(packrunsItem) === 'object' && 'allocatedBins' in packrunsItem) {
262
+ packrunsItemObject.allocatedBins = function () {
263
+ if (typeof packrunsItem.allocatedBins !== 'number') {
264
+ return Number.isInteger(Number(packrunsItem.allocatedBins)) ? Number(packrunsItem.allocatedBins) : Math.floor(Number(packrunsItem.allocatedBins));
265
+ }
266
+
267
+ return Number.isInteger(packrunsItem.allocatedBins) ? packrunsItem.allocatedBins : Math.floor(packrunsItem.allocatedBins);
268
+ }();
269
+ } else {
270
+ packrunsItemObject.allocatedBins = 0;
271
+ }
272
+
273
+ if (_typeof(packrunsItem) === 'object' && 'totalBinsTipped' in packrunsItem) {
274
+ packrunsItemObject.totalBinsTipped = function () {
275
+ if (typeof packrunsItem.totalBinsTipped !== 'number') {
276
+ return Number.isInteger(Number(packrunsItem.totalBinsTipped)) ? Number(packrunsItem.totalBinsTipped) : Math.floor(Number(packrunsItem.totalBinsTipped));
277
+ }
278
+
279
+ return Number.isInteger(packrunsItem.totalBinsTipped) ? packrunsItem.totalBinsTipped : Math.floor(packrunsItem.totalBinsTipped);
280
+ }();
281
+ } else {
282
+ packrunsItemObject.totalBinsTipped = 0;
283
+ }
284
+
285
+ if (_typeof(packrunsItem) === 'object' && 'totalNetWeightTipped' in packrunsItem) {
286
+ packrunsItemObject.totalNetWeightTipped = function () {
287
+ if (typeof packrunsItem.totalNetWeightTipped !== 'number') {
288
+ return Number(packrunsItem.totalNetWeightTipped);
289
+ }
290
+
291
+ return packrunsItem.totalNetWeightTipped;
292
+ }();
293
+ } else {
294
+ packrunsItemObject.totalNetWeightTipped = 0;
295
+ }
296
+
297
+ if (_typeof(packrunsItem) === 'object' && 'averageNetWeightPerBin' in packrunsItem) {
298
+ packrunsItemObject.averageNetWeightPerBin = function () {
299
+ if (typeof packrunsItem.averageNetWeightPerBin !== 'number') {
300
+ return Number(packrunsItem.averageNetWeightPerBin);
301
+ }
302
+
303
+ return packrunsItem.averageNetWeightPerBin;
304
+ }();
305
+ } else {
306
+ packrunsItemObject.averageNetWeightPerBin = 0;
307
+ }
308
+
309
+ if (_typeof(packrunsItem) === 'object' && 'averageBinsTippedPerHour' in packrunsItem) {
310
+ packrunsItemObject.averageBinsTippedPerHour = function () {
311
+ if (typeof packrunsItem.averageBinsTippedPerHour !== 'number') {
312
+ return Number(packrunsItem.averageBinsTippedPerHour);
313
+ }
314
+
315
+ return packrunsItem.averageBinsTippedPerHour;
316
+ }();
317
+ } else {
318
+ packrunsItemObject.averageBinsTippedPerHour = 0;
319
+ }
320
+
321
+ if (_typeof(packrunsItem) === 'object' && 'averageTimePerTippedBin' in packrunsItem) {
322
+ packrunsItemObject.averageTimePerTippedBin = function () {
323
+ if (typeof packrunsItem.averageTimePerTippedBin !== 'number') {
324
+ return Number.isInteger(Number(packrunsItem.averageTimePerTippedBin)) ? Number(packrunsItem.averageTimePerTippedBin) : Math.floor(Number(packrunsItem.averageTimePerTippedBin));
325
+ }
326
+
327
+ return Number.isInteger(packrunsItem.averageTimePerTippedBin) ? packrunsItem.averageTimePerTippedBin : Math.floor(packrunsItem.averageTimePerTippedBin);
328
+ }();
329
+ } else {
330
+ packrunsItemObject.averageTimePerTippedBin = 0;
331
+ }
332
+
333
+ if (_typeof(packrunsItem) === 'object' && 'averageBinTipWeightThroughput' in packrunsItem) {
334
+ packrunsItemObject.averageBinTipWeightThroughput = function () {
335
+ if (typeof packrunsItem.averageBinTipWeightThroughput !== 'number') {
336
+ return Number(packrunsItem.averageBinTipWeightThroughput);
337
+ }
338
+
339
+ return packrunsItem.averageBinTipWeightThroughput;
340
+ }();
341
+ } else {
342
+ packrunsItemObject.averageBinTipWeightThroughput = 0;
343
+ }
344
+
345
+ if (_typeof(packrunsItem) === 'object' && 'softSortEventsPerBin' in packrunsItem) {
346
+ packrunsItemObject.softSortEventsPerBin = function () {
347
+ if (typeof packrunsItem.softSortEventsPerBin !== 'number') {
348
+ return Number(packrunsItem.softSortEventsPerBin);
349
+ }
350
+
351
+ return packrunsItem.softSortEventsPerBin;
352
+ }();
353
+ } else {
354
+ packrunsItemObject.softSortEventsPerBin = 0;
355
+ }
356
+
357
+ if (_typeof(packrunsItem) === 'object' && 'totalSoftSortEventsCount' in packrunsItem) {
358
+ packrunsItemObject.totalSoftSortEventsCount = function () {
359
+ if (typeof packrunsItem.totalSoftSortEventsCount !== 'number') {
360
+ return Number.isInteger(Number(packrunsItem.totalSoftSortEventsCount)) ? Number(packrunsItem.totalSoftSortEventsCount) : Math.floor(Number(packrunsItem.totalSoftSortEventsCount));
361
+ }
362
+
363
+ return Number.isInteger(packrunsItem.totalSoftSortEventsCount) ? packrunsItem.totalSoftSortEventsCount : Math.floor(packrunsItem.totalSoftSortEventsCount);
364
+ }();
365
+ } else {
366
+ packrunsItemObject.totalSoftSortEventsCount = 0;
367
+ }
368
+
369
+ if (_typeof(packrunsItem) === 'object' && 'averageSoftSortEventsDuration' in packrunsItem) {
370
+ packrunsItemObject.averageSoftSortEventsDuration = function () {
371
+ if (typeof packrunsItem.averageSoftSortEventsDuration !== 'number') {
372
+ return Number(packrunsItem.averageSoftSortEventsDuration);
373
+ }
374
+
375
+ return packrunsItem.averageSoftSortEventsDuration;
376
+ }();
377
+ } else {
378
+ packrunsItemObject.averageSoftSortEventsDuration = 0;
379
+ }
380
+
381
+ if (_typeof(packrunsItem) === 'object' && 'totalSoftSortEventsDuration' in packrunsItem) {
382
+ packrunsItemObject.totalSoftSortEventsDuration = function () {
383
+ if (typeof packrunsItem.totalSoftSortEventsDuration !== 'number') {
384
+ return Number(packrunsItem.totalSoftSortEventsDuration);
385
+ }
386
+
387
+ return packrunsItem.totalSoftSortEventsDuration;
388
+ }();
389
+ } else {
390
+ packrunsItemObject.totalSoftSortEventsDuration = 0;
391
+ }
392
+
393
+ if (_typeof(packrunsItem) === 'object' && 'softSortEventsAccurate' in packrunsItem) {
394
+ packrunsItemObject.softSortEventsAccurate = function () {
395
+ if (packrunsItem.softSortEventsAccurate === null) {
396
+ return null;
397
+ }
398
+
399
+ if (typeof packrunsItem.softSortEventsAccurate !== 'boolean') {
400
+ return Boolean(packrunsItem.softSortEventsAccurate);
401
+ }
402
+
403
+ return packrunsItem.softSortEventsAccurate;
404
+ }();
405
+ } else {
406
+ packrunsItemObject.softSortEventsAccurate = null;
407
+ }
408
+
409
+ if (_typeof(packrunsItem) === 'object' && 'softSortEventsNotAccurateReason' in packrunsItem) {
410
+ packrunsItemObject.softSortEventsNotAccurateReason = function () {
411
+ if (packrunsItem.softSortEventsNotAccurateReason === null) {
412
+ return null;
413
+ }
414
+
415
+ if (typeof packrunsItem.softSortEventsNotAccurateReason !== 'string') {
416
+ return String(packrunsItem.softSortEventsNotAccurateReason);
417
+ }
418
+
419
+ return packrunsItem.softSortEventsNotAccurateReason;
420
+ }();
421
+ } else {
422
+ packrunsItemObject.softSortEventsNotAccurateReason = null;
423
+ }
424
+
425
+ if (_typeof(packrunsItem) === 'object' && 'class1Percentage' in packrunsItem) {
426
+ packrunsItemObject.class1Percentage = function () {
427
+ if (typeof packrunsItem.class1Percentage !== 'number') {
428
+ return Number(packrunsItem.class1Percentage);
429
+ }
430
+
431
+ return packrunsItem.class1Percentage;
432
+ }();
433
+ } else {
434
+ packrunsItemObject.class1Percentage = 0;
435
+ }
436
+
437
+ if (_typeof(packrunsItem) === 'object' && 'class2Percentage' in packrunsItem) {
438
+ packrunsItemObject.class2Percentage = function () {
439
+ if (typeof packrunsItem.class2Percentage !== 'number') {
440
+ return Number(packrunsItem.class2Percentage);
441
+ }
442
+
443
+ return packrunsItem.class2Percentage;
444
+ }();
445
+ } else {
446
+ packrunsItemObject.class2Percentage = 0;
447
+ }
448
+
449
+ if (_typeof(packrunsItem) === 'object' && 'class3Percentage' in packrunsItem) {
450
+ packrunsItemObject.class3Percentage = function () {
451
+ if (typeof packrunsItem.class3Percentage !== 'number') {
452
+ return Number(packrunsItem.class3Percentage);
453
+ }
454
+
455
+ return packrunsItem.class3Percentage;
456
+ }();
457
+ } else {
458
+ packrunsItemObject.class3Percentage = 0;
459
+ }
460
+
461
+ if (_typeof(packrunsItem) === 'object' && 'nssPercentage' in packrunsItem) {
462
+ packrunsItemObject.nssPercentage = function () {
463
+ if (typeof packrunsItem.nssPercentage !== 'number') {
464
+ return Number(packrunsItem.nssPercentage);
465
+ }
466
+
467
+ return packrunsItem.nssPercentage;
468
+ }();
469
+ } else {
470
+ packrunsItemObject.nssPercentage = 0;
471
+ }
472
+
473
+ if (_typeof(packrunsItem) === 'object' && 'undersizePercentage' in packrunsItem) {
474
+ packrunsItemObject.undersizePercentage = function () {
475
+ if (typeof packrunsItem.undersizePercentage !== 'number') {
476
+ return Number(packrunsItem.undersizePercentage);
477
+ }
478
+
479
+ return packrunsItem.undersizePercentage;
480
+ }();
481
+ } else {
482
+ packrunsItemObject.undersizePercentage = 0;
483
+ }
484
+
485
+ if (_typeof(packrunsItem) === 'object' && 'cdmPercentage' in packrunsItem) {
486
+ packrunsItemObject.cdmPercentage = function () {
487
+ if (typeof packrunsItem.cdmPercentage !== 'number') {
488
+ return Number(packrunsItem.cdmPercentage);
489
+ }
490
+
491
+ return packrunsItem.cdmPercentage;
492
+ }();
493
+ } else {
494
+ packrunsItemObject.cdmPercentage = 0;
495
+ }
496
+
497
+ if (_typeof(packrunsItem) === 'object' && 'wastePercentage' in packrunsItem) {
498
+ packrunsItemObject.wastePercentage = function () {
499
+ if (typeof packrunsItem.wastePercentage !== 'number') {
500
+ return Number(packrunsItem.wastePercentage);
501
+ }
502
+
503
+ return packrunsItem.wastePercentage;
504
+ }();
505
+ } else {
506
+ packrunsItemObject.wastePercentage = 0;
507
+ }
508
+
509
+ if (_typeof(packrunsItem) === 'object' && 'softSortPercentage' in packrunsItem) {
510
+ packrunsItemObject.softSortPercentage = function () {
511
+ if (typeof packrunsItem.softSortPercentage !== 'number') {
512
+ return Number(packrunsItem.softSortPercentage);
513
+ }
514
+
515
+ return packrunsItem.softSortPercentage;
516
+ }();
517
+ } else {
518
+ packrunsItemObject.softSortPercentage = 0;
519
+ }
520
+
521
+ if (_typeof(packrunsItem) === 'object' && 'totalNonClass1Percentage' in packrunsItem) {
522
+ packrunsItemObject.totalNonClass1Percentage = function () {
523
+ if (typeof packrunsItem.totalNonClass1Percentage !== 'number') {
524
+ return Number(packrunsItem.totalNonClass1Percentage);
525
+ }
526
+
527
+ return packrunsItem.totalNonClass1Percentage;
528
+ }();
529
+ } else {
530
+ packrunsItemObject.totalNonClass1Percentage = 0;
531
+ }
532
+
533
+ if (_typeof(packrunsItem) === 'object' && 'class1Weight' in packrunsItem) {
534
+ packrunsItemObject.class1Weight = function () {
535
+ if (typeof packrunsItem.class1Weight !== 'number') {
536
+ return Number(packrunsItem.class1Weight);
537
+ }
538
+
539
+ return packrunsItem.class1Weight;
540
+ }();
541
+ } else {
542
+ packrunsItemObject.class1Weight = 0;
543
+ }
544
+
545
+ if (_typeof(packrunsItem) === 'object' && 'class2Weight' in packrunsItem) {
546
+ packrunsItemObject.class2Weight = function () {
547
+ if (typeof packrunsItem.class2Weight !== 'number') {
548
+ return Number(packrunsItem.class2Weight);
549
+ }
550
+
551
+ return packrunsItem.class2Weight;
552
+ }();
553
+ } else {
554
+ packrunsItemObject.class2Weight = 0;
555
+ }
556
+
557
+ if (_typeof(packrunsItem) === 'object' && 'class3Weight' in packrunsItem) {
558
+ packrunsItemObject.class3Weight = function () {
559
+ if (typeof packrunsItem.class3Weight !== 'number') {
560
+ return Number(packrunsItem.class3Weight);
561
+ }
562
+
563
+ return packrunsItem.class3Weight;
564
+ }();
565
+ } else {
566
+ packrunsItemObject.class3Weight = 0;
567
+ }
568
+
569
+ if (_typeof(packrunsItem) === 'object' && 'nssWeight' in packrunsItem) {
570
+ packrunsItemObject.nssWeight = function () {
571
+ if (typeof packrunsItem.nssWeight !== 'number') {
572
+ return Number(packrunsItem.nssWeight);
573
+ }
574
+
575
+ return packrunsItem.nssWeight;
576
+ }();
577
+ } else {
578
+ packrunsItemObject.nssWeight = 0;
579
+ }
580
+
581
+ if (_typeof(packrunsItem) === 'object' && 'undersizeWeight' in packrunsItem) {
582
+ packrunsItemObject.undersizeWeight = function () {
583
+ if (typeof packrunsItem.undersizeWeight !== 'number') {
584
+ return Number(packrunsItem.undersizeWeight);
585
+ }
586
+
587
+ return packrunsItem.undersizeWeight;
588
+ }();
589
+ } else {
590
+ packrunsItemObject.undersizeWeight = 0;
591
+ }
592
+
593
+ if (_typeof(packrunsItem) === 'object' && 'cdmWeight' in packrunsItem) {
594
+ packrunsItemObject.cdmWeight = function () {
595
+ if (typeof packrunsItem.cdmWeight !== 'number') {
596
+ return Number(packrunsItem.cdmWeight);
597
+ }
598
+
599
+ return packrunsItem.cdmWeight;
600
+ }();
601
+ } else {
602
+ packrunsItemObject.cdmWeight = 0;
603
+ }
604
+
605
+ if (_typeof(packrunsItem) === 'object' && 'wasteWeight' in packrunsItem) {
606
+ packrunsItemObject.wasteWeight = function () {
607
+ if (typeof packrunsItem.wasteWeight !== 'number') {
608
+ return Number(packrunsItem.wasteWeight);
609
+ }
610
+
611
+ return packrunsItem.wasteWeight;
612
+ }();
613
+ } else {
614
+ packrunsItemObject.wasteWeight = 0;
615
+ }
616
+
617
+ if (_typeof(packrunsItem) === 'object' && 'softSortWeight' in packrunsItem) {
618
+ packrunsItemObject.softSortWeight = function () {
619
+ if (typeof packrunsItem.softSortWeight !== 'number') {
620
+ return Number(packrunsItem.softSortWeight);
621
+ }
622
+
623
+ return packrunsItem.softSortWeight;
624
+ }();
625
+ } else {
626
+ packrunsItemObject.softSortWeight = 0;
627
+ }
628
+
629
+ if (_typeof(packrunsItem) === 'object' && 'totalNonClass1Weight' in packrunsItem) {
630
+ packrunsItemObject.totalNonClass1Weight = function () {
631
+ if (typeof packrunsItem.totalNonClass1Weight !== 'number') {
632
+ return Number(packrunsItem.totalNonClass1Weight);
633
+ }
634
+
635
+ return packrunsItem.totalNonClass1Weight;
636
+ }();
637
+ } else {
638
+ packrunsItemObject.totalNonClass1Weight = 0;
639
+ }
640
+
641
+ if (_typeof(packrunsItem) === 'object' && 'totalClass1Trays' in packrunsItem) {
642
+ packrunsItemObject.totalClass1Trays = function () {
643
+ if (typeof packrunsItem.totalClass1Trays !== 'number') {
644
+ return Number(packrunsItem.totalClass1Trays);
645
+ }
646
+
647
+ return packrunsItem.totalClass1Trays;
648
+ }();
649
+ } else {
650
+ packrunsItemObject.totalClass1Trays = 0;
651
+ }
652
+
653
+ if (_typeof(packrunsItem) === 'object' && 'totalClass2Trays' in packrunsItem) {
654
+ packrunsItemObject.totalClass2Trays = function () {
655
+ if (typeof packrunsItem.totalClass2Trays !== 'number') {
656
+ return Number(packrunsItem.totalClass2Trays);
657
+ }
658
+
659
+ return packrunsItem.totalClass2Trays;
660
+ }();
661
+ } else {
662
+ packrunsItemObject.totalClass2Trays = 0;
663
+ }
664
+
665
+ if (_typeof(packrunsItem) === 'object' && 'totalClass1FruitCount' in packrunsItem) {
666
+ packrunsItemObject.totalClass1FruitCount = function () {
667
+ if (typeof packrunsItem.totalClass1FruitCount !== 'number') {
668
+ return Number(packrunsItem.totalClass1FruitCount);
669
+ }
670
+
671
+ return packrunsItem.totalClass1FruitCount;
672
+ }();
673
+ } else {
674
+ packrunsItemObject.totalClass1FruitCount = 0;
675
+ }
676
+
677
+ if (_typeof(packrunsItem) === 'object' && 'totalClass2FruitCount' in packrunsItem) {
678
+ packrunsItemObject.totalClass2FruitCount = function () {
679
+ if (typeof packrunsItem.totalClass2FruitCount !== 'number') {
680
+ return Number(packrunsItem.totalClass2FruitCount);
681
+ }
682
+
683
+ return packrunsItem.totalClass2FruitCount;
684
+ }();
685
+ } else {
686
+ packrunsItemObject.totalClass2FruitCount = 0;
687
+ }
688
+
689
+ if (_typeof(packrunsItem) === 'object' && 'averageClass1TrayWeight' in packrunsItem) {
690
+ packrunsItemObject.averageClass1TrayWeight = function () {
691
+ if (typeof packrunsItem.averageClass1TrayWeight !== 'number') {
692
+ return Number(packrunsItem.averageClass1TrayWeight);
693
+ }
694
+
695
+ return packrunsItem.averageClass1TrayWeight;
696
+ }();
697
+ } else {
698
+ packrunsItemObject.averageClass1TrayWeight = 0;
699
+ }
700
+
701
+ if (_typeof(packrunsItem) === 'object' && 'averageClass2TrayWeight' in packrunsItem) {
702
+ packrunsItemObject.averageClass2TrayWeight = function () {
703
+ if (typeof packrunsItem.averageClass2TrayWeight !== 'number') {
704
+ return Number(packrunsItem.averageClass2TrayWeight);
705
+ }
706
+
707
+ return packrunsItem.averageClass2TrayWeight;
708
+ }();
709
+ } else {
710
+ packrunsItemObject.averageClass2TrayWeight = 0;
711
+ }
712
+
713
+ if (_typeof(packrunsItem) === 'object' && 'class1TraysPerBin' in packrunsItem) {
714
+ packrunsItemObject.class1TraysPerBin = function () {
715
+ if (typeof packrunsItem.class1TraysPerBin !== 'number') {
716
+ return Number(packrunsItem.class1TraysPerBin);
717
+ }
718
+
719
+ return packrunsItem.class1TraysPerBin;
720
+ }();
721
+ } else {
722
+ packrunsItemObject.class1TraysPerBin = 0;
723
+ }
724
+
725
+ if (_typeof(packrunsItem) === 'object' && 'averageFruitSize' in packrunsItem) {
726
+ packrunsItemObject.averageFruitSize = function () {
727
+ if (typeof packrunsItem.averageFruitSize !== 'number') {
728
+ return Number(packrunsItem.averageFruitSize);
729
+ }
730
+
731
+ return packrunsItem.averageFruitSize;
732
+ }();
733
+ } else {
734
+ packrunsItemObject.averageFruitSize = 0;
735
+ }
736
+
737
+ if (_typeof(packrunsItem) === 'object' && 'averageFruitWeight' in packrunsItem) {
738
+ packrunsItemObject.averageFruitWeight = function () {
739
+ if (typeof packrunsItem.averageFruitWeight !== 'number') {
740
+ return Number(packrunsItem.averageFruitWeight);
741
+ }
742
+
743
+ return packrunsItem.averageFruitWeight;
744
+ }();
745
+ } else {
746
+ packrunsItemObject.averageFruitWeight = 0;
747
+ }
748
+
749
+ if (_typeof(packrunsItem) === 'object' && 'totalRejectBinsCount' in packrunsItem) {
750
+ packrunsItemObject.totalRejectBinsCount = function () {
751
+ if (typeof packrunsItem.totalRejectBinsCount !== 'number') {
752
+ return Number.isInteger(Number(packrunsItem.totalRejectBinsCount)) ? Number(packrunsItem.totalRejectBinsCount) : Math.floor(Number(packrunsItem.totalRejectBinsCount));
753
+ }
754
+
755
+ return Number.isInteger(packrunsItem.totalRejectBinsCount) ? packrunsItem.totalRejectBinsCount : Math.floor(packrunsItem.totalRejectBinsCount);
756
+ }();
757
+ } else {
758
+ packrunsItemObject.totalRejectBinsCount = 0;
759
+ }
760
+
761
+ if (_typeof(packrunsItem) === 'object' && 'totalRejectBinsNetWeight' in packrunsItem) {
762
+ packrunsItemObject.totalRejectBinsNetWeight = function () {
763
+ if (typeof packrunsItem.totalRejectBinsNetWeight !== 'number') {
764
+ return Number(packrunsItem.totalRejectBinsNetWeight);
765
+ }
766
+
767
+ return packrunsItem.totalRejectBinsNetWeight;
768
+ }();
769
+ } else {
770
+ packrunsItemObject.totalRejectBinsNetWeight = 0;
771
+ }
772
+
773
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600TotalFruitSampled' in packrunsItem) {
774
+ packrunsItemObject.qualityR600TotalFruitSampled = function () {
775
+ if (packrunsItem.qualityR600TotalFruitSampled === null) {
776
+ return null;
777
+ }
778
+
779
+ if (typeof packrunsItem.qualityR600TotalFruitSampled !== 'number') {
780
+ return Number.isInteger(Number(packrunsItem.qualityR600TotalFruitSampled)) ? Number(packrunsItem.qualityR600TotalFruitSampled) : Math.floor(Number(packrunsItem.qualityR600TotalFruitSampled));
781
+ }
782
+
783
+ return Number.isInteger(packrunsItem.qualityR600TotalFruitSampled) ? packrunsItem.qualityR600TotalFruitSampled : Math.floor(packrunsItem.qualityR600TotalFruitSampled);
784
+ }();
785
+ } else {
786
+ packrunsItemObject.qualityR600TotalFruitSampled = null;
787
+ }
788
+
789
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600FruitSampledPercentage' in packrunsItem) {
790
+ packrunsItemObject.qualityR600FruitSampledPercentage = function () {
791
+ if (packrunsItem.qualityR600FruitSampledPercentage === null) {
792
+ return null;
793
+ }
794
+
795
+ if (typeof packrunsItem.qualityR600FruitSampledPercentage !== 'number') {
796
+ return Number(packrunsItem.qualityR600FruitSampledPercentage);
797
+ }
798
+
799
+ return packrunsItem.qualityR600FruitSampledPercentage;
800
+ }();
801
+ } else {
802
+ packrunsItemObject.qualityR600FruitSampledPercentage = null;
803
+ }
804
+
805
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600AverageSampledFruitSize' in packrunsItem) {
806
+ packrunsItemObject.qualityR600AverageSampledFruitSize = function () {
807
+ if (packrunsItem.qualityR600AverageSampledFruitSize === null) {
808
+ return null;
809
+ }
810
+
811
+ if (typeof packrunsItem.qualityR600AverageSampledFruitSize !== 'number') {
812
+ return Number(packrunsItem.qualityR600AverageSampledFruitSize);
813
+ }
814
+
815
+ return packrunsItem.qualityR600AverageSampledFruitSize;
816
+ }();
817
+ } else {
818
+ packrunsItemObject.qualityR600AverageSampledFruitSize = null;
819
+ }
820
+
821
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600TotalSamplesCount' in packrunsItem) {
822
+ packrunsItemObject.qualityR600TotalSamplesCount = function () {
823
+ if (packrunsItem.qualityR600TotalSamplesCount === null) {
824
+ return null;
825
+ }
826
+
827
+ if (typeof packrunsItem.qualityR600TotalSamplesCount !== 'number') {
828
+ return Number.isInteger(Number(packrunsItem.qualityR600TotalSamplesCount)) ? Number(packrunsItem.qualityR600TotalSamplesCount) : Math.floor(Number(packrunsItem.qualityR600TotalSamplesCount));
829
+ }
830
+
831
+ return Number.isInteger(packrunsItem.qualityR600TotalSamplesCount) ? packrunsItem.qualityR600TotalSamplesCount : Math.floor(packrunsItem.qualityR600TotalSamplesCount);
832
+ }();
833
+ } else {
834
+ packrunsItemObject.qualityR600TotalSamplesCount = null;
835
+ }
836
+
837
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600IdealSamplesTarget' in packrunsItem) {
838
+ packrunsItemObject.qualityR600IdealSamplesTarget = function () {
839
+ if (packrunsItem.qualityR600IdealSamplesTarget === null) {
840
+ return null;
841
+ }
842
+
843
+ if (typeof packrunsItem.qualityR600IdealSamplesTarget !== 'number') {
844
+ return Number(packrunsItem.qualityR600IdealSamplesTarget);
845
+ }
846
+
847
+ return packrunsItem.qualityR600IdealSamplesTarget;
848
+ }();
849
+ } else {
850
+ packrunsItemObject.qualityR600IdealSamplesTarget = null;
851
+ }
852
+
853
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600IdealSamplesActual' in packrunsItem) {
854
+ packrunsItemObject.qualityR600IdealSamplesActual = function () {
855
+ if (packrunsItem.qualityR600IdealSamplesActual === null) {
856
+ return null;
857
+ }
858
+
859
+ if (typeof packrunsItem.qualityR600IdealSamplesActual !== 'number') {
860
+ return Number(packrunsItem.qualityR600IdealSamplesActual);
861
+ }
862
+
863
+ return packrunsItem.qualityR600IdealSamplesActual;
864
+ }();
865
+ } else {
866
+ packrunsItemObject.qualityR600IdealSamplesActual = null;
867
+ }
868
+
869
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600MinorPackingDefects' in packrunsItem) {
870
+ packrunsItemObject.qualityR600MinorPackingDefects = function () {
871
+ if (packrunsItem.qualityR600MinorPackingDefects === null) {
872
+ return null;
873
+ }
874
+
875
+ if (typeof packrunsItem.qualityR600MinorPackingDefects !== 'number') {
876
+ return Number(packrunsItem.qualityR600MinorPackingDefects);
877
+ }
878
+
879
+ return packrunsItem.qualityR600MinorPackingDefects;
880
+ }();
881
+ } else {
882
+ packrunsItemObject.qualityR600MinorPackingDefects = null;
883
+ }
884
+
885
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600MajorPackingDefects' in packrunsItem) {
886
+ packrunsItemObject.qualityR600MajorPackingDefects = function () {
887
+ if (packrunsItem.qualityR600MajorPackingDefects === null) {
888
+ return null;
889
+ }
890
+
891
+ if (typeof packrunsItem.qualityR600MajorPackingDefects !== 'number') {
892
+ return Number(packrunsItem.qualityR600MajorPackingDefects);
893
+ }
894
+
895
+ return packrunsItem.qualityR600MajorPackingDefects;
896
+ }();
897
+ } else {
898
+ packrunsItemObject.qualityR600MajorPackingDefects = null;
899
+ }
900
+
901
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600Softs' in packrunsItem) {
902
+ packrunsItemObject.qualityR600Softs = function () {
903
+ if (packrunsItem.qualityR600Softs === null) {
904
+ return null;
905
+ }
906
+
907
+ if (typeof packrunsItem.qualityR600Softs !== 'number') {
908
+ return Number(packrunsItem.qualityR600Softs);
909
+ }
910
+
911
+ return packrunsItem.qualityR600Softs;
912
+ }();
913
+ } else {
914
+ packrunsItemObject.qualityR600Softs = null;
915
+ }
916
+
917
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600Cuts' in packrunsItem) {
918
+ packrunsItemObject.qualityR600Cuts = function () {
919
+ if (packrunsItem.qualityR600Cuts === null) {
920
+ return null;
921
+ }
922
+
923
+ if (typeof packrunsItem.qualityR600Cuts !== 'number') {
924
+ return Number(packrunsItem.qualityR600Cuts);
925
+ }
926
+
927
+ return packrunsItem.qualityR600Cuts;
928
+ }();
929
+ } else {
930
+ packrunsItemObject.qualityR600Cuts = null;
931
+ }
932
+
933
+ if (_typeof(packrunsItem) === 'object' && 'qualityR600Rots' in packrunsItem) {
934
+ packrunsItemObject.qualityR600Rots = function () {
935
+ if (packrunsItem.qualityR600Rots === null) {
936
+ return null;
937
+ }
938
+
939
+ if (typeof packrunsItem.qualityR600Rots !== 'number') {
940
+ return Number(packrunsItem.qualityR600Rots);
941
+ }
942
+
943
+ return packrunsItem.qualityR600Rots;
944
+ }();
945
+ } else {
946
+ packrunsItemObject.qualityR600Rots = null;
947
+ }
948
+
949
+ if (_typeof(packrunsItem) === 'object' && 'qualityExportFruitInClass2' in packrunsItem) {
950
+ packrunsItemObject.qualityExportFruitInClass2 = function () {
951
+ if (packrunsItem.qualityExportFruitInClass2 === null) {
952
+ return null;
953
+ }
954
+
955
+ if (typeof packrunsItem.qualityExportFruitInClass2 !== 'number') {
956
+ return Number(packrunsItem.qualityExportFruitInClass2);
957
+ }
958
+
959
+ return packrunsItem.qualityExportFruitInClass2;
960
+ }();
961
+ } else {
962
+ packrunsItemObject.qualityExportFruitInClass2 = null;
963
+ }
964
+
965
+ if (_typeof(packrunsItem) === 'object' && 'qualityExportFruitInClass3' in packrunsItem) {
966
+ packrunsItemObject.qualityExportFruitInClass3 = function () {
967
+ if (packrunsItem.qualityExportFruitInClass3 === null) {
968
+ return null;
969
+ }
970
+
971
+ if (typeof packrunsItem.qualityExportFruitInClass3 !== 'number') {
972
+ return Number(packrunsItem.qualityExportFruitInClass3);
973
+ }
974
+
975
+ return packrunsItem.qualityExportFruitInClass3;
976
+ }();
977
+ } else {
978
+ packrunsItemObject.qualityExportFruitInClass3 = null;
979
+ }
980
+
981
+ if (_typeof(packrunsItem) === 'object' && 'qualityExportFruitInWaste' in packrunsItem) {
982
+ packrunsItemObject.qualityExportFruitInWaste = function () {
983
+ if (packrunsItem.qualityExportFruitInWaste === null) {
984
+ return null;
985
+ }
986
+
987
+ if (typeof packrunsItem.qualityExportFruitInWaste !== 'number') {
988
+ return Number(packrunsItem.qualityExportFruitInWaste);
989
+ }
990
+
991
+ return packrunsItem.qualityExportFruitInWaste;
992
+ }();
993
+ } else {
994
+ packrunsItemObject.qualityExportFruitInWaste = null;
995
+ }
996
+
997
+ if (_typeof(packrunsItem) === 'object' && 'shiftIds' in packrunsItem) {
998
+ packrunsItemObject.shiftIds = function () {
999
+ if (Array.isArray(packrunsItem.shiftIds) !== true) {
1000
+ return [];
1001
+ }
1002
+
1003
+ return packrunsItem.shiftIds.map(function (shiftIdsItem) {
1004
+ return function () {
1005
+ if (typeof shiftIdsItem !== 'string') {
1006
+ return String(shiftIdsItem);
1007
+ }
1008
+
1009
+ return shiftIdsItem;
1010
+ }();
1011
+ });
1012
+ }();
1013
+ } else {
1014
+ packrunsItemObject.shiftIds = [];
1015
+ }
1016
+
1017
+ if (_typeof(packrunsItem) === 'object' && 'shiftTypes' in packrunsItem) {
1018
+ packrunsItemObject.shiftTypes = function () {
1019
+ if (Array.isArray(packrunsItem.shiftTypes) !== true) {
1020
+ return [];
1021
+ }
1022
+
1023
+ return packrunsItem.shiftTypes.map(function (shiftTypesItem) {
1024
+ return function () {
1025
+ if (typeof shiftTypesItem !== 'string') {
1026
+ return String(shiftTypesItem);
1027
+ }
1028
+
1029
+ return shiftTypesItem;
1030
+ }();
1031
+ });
1032
+ }();
1033
+ } else {
1034
+ packrunsItemObject.shiftTypes = [];
1035
+ }
1036
+
1037
+ if (_typeof(packrunsItem) === 'object' && 'lineManagerNames' in packrunsItem) {
1038
+ packrunsItemObject.lineManagerNames = function () {
1039
+ if (Array.isArray(packrunsItem.lineManagerNames) !== true) {
1040
+ return [];
1041
+ }
1042
+
1043
+ return packrunsItem.lineManagerNames.map(function (lineManagerNamesItem) {
1044
+ return function () {
1045
+ if (typeof lineManagerNamesItem !== 'string') {
1046
+ return String(lineManagerNamesItem);
1047
+ }
1048
+
1049
+ return lineManagerNamesItem;
1050
+ }();
1051
+ });
1052
+ }();
1053
+ } else {
1054
+ packrunsItemObject.lineManagerNames = [];
1055
+ }
1056
+
1057
+ if (_typeof(packrunsItem) === 'object' && 'qualityManagerNames' in packrunsItem) {
1058
+ packrunsItemObject.qualityManagerNames = function () {
1059
+ if (Array.isArray(packrunsItem.qualityManagerNames) !== true) {
1060
+ return [];
1061
+ }
1062
+
1063
+ return packrunsItem.qualityManagerNames.map(function (qualityManagerNamesItem) {
1064
+ return function () {
1065
+ if (typeof qualityManagerNamesItem !== 'string') {
1066
+ return String(qualityManagerNamesItem);
1067
+ }
1068
+
1069
+ return qualityManagerNamesItem;
1070
+ }();
1071
+ });
1072
+ }();
1073
+ } else {
1074
+ packrunsItemObject.qualityManagerNames = [];
1075
+ }
1076
+
1077
+ if (_typeof(packrunsItem) === 'object' && 'totalProductionTime' in packrunsItem) {
1078
+ packrunsItemObject.totalProductionTime = function () {
1079
+ if (typeof packrunsItem.totalProductionTime !== 'number') {
1080
+ return Number.isInteger(Number(packrunsItem.totalProductionTime)) ? Number(packrunsItem.totalProductionTime) : Math.floor(Number(packrunsItem.totalProductionTime));
1081
+ }
1082
+
1083
+ return Number.isInteger(packrunsItem.totalProductionTime) ? packrunsItem.totalProductionTime : Math.floor(packrunsItem.totalProductionTime);
1084
+ }();
1085
+ } else {
1086
+ packrunsItemObject.totalProductionTime = 0;
1087
+ }
1088
+
1089
+ if (_typeof(packrunsItem) === 'object' && 'totalScheduledBreakTime' in packrunsItem) {
1090
+ packrunsItemObject.totalScheduledBreakTime = function () {
1091
+ if (typeof packrunsItem.totalScheduledBreakTime !== 'number') {
1092
+ return Number.isInteger(Number(packrunsItem.totalScheduledBreakTime)) ? Number(packrunsItem.totalScheduledBreakTime) : Math.floor(Number(packrunsItem.totalScheduledBreakTime));
1093
+ }
1094
+
1095
+ return Number.isInteger(packrunsItem.totalScheduledBreakTime) ? packrunsItem.totalScheduledBreakTime : Math.floor(packrunsItem.totalScheduledBreakTime);
1096
+ }();
1097
+ } else {
1098
+ packrunsItemObject.totalScheduledBreakTime = 0;
1099
+ }
1100
+
1101
+ if (_typeof(packrunsItem) === 'object' && 'totalDowntime' in packrunsItem) {
1102
+ packrunsItemObject.totalDowntime = function () {
1103
+ if (typeof packrunsItem.totalDowntime !== 'number') {
1104
+ return Number.isInteger(Number(packrunsItem.totalDowntime)) ? Number(packrunsItem.totalDowntime) : Math.floor(Number(packrunsItem.totalDowntime));
1105
+ }
1106
+
1107
+ return Number.isInteger(packrunsItem.totalDowntime) ? packrunsItem.totalDowntime : Math.floor(packrunsItem.totalDowntime);
1108
+ }();
1109
+ } else {
1110
+ packrunsItemObject.totalDowntime = 0;
1111
+ }
1112
+
1113
+ if (_typeof(packrunsItem) === 'object' && 'downtimeEventsCount' in packrunsItem) {
1114
+ packrunsItemObject.downtimeEventsCount = function () {
1115
+ if (typeof packrunsItem.downtimeEventsCount !== 'number') {
1116
+ return Number.isInteger(Number(packrunsItem.downtimeEventsCount)) ? Number(packrunsItem.downtimeEventsCount) : Math.floor(Number(packrunsItem.downtimeEventsCount));
1117
+ }
1118
+
1119
+ return Number.isInteger(packrunsItem.downtimeEventsCount) ? packrunsItem.downtimeEventsCount : Math.floor(packrunsItem.downtimeEventsCount);
1120
+ }();
1121
+ } else {
1122
+ packrunsItemObject.downtimeEventsCount = 0;
1123
+ }
1124
+
1125
+ if (_typeof(packrunsItem) === 'object' && 'downtimeEventsAverageDuration' in packrunsItem) {
1126
+ packrunsItemObject.downtimeEventsAverageDuration = function () {
1127
+ if (typeof packrunsItem.downtimeEventsAverageDuration !== 'number') {
1128
+ return Number.isInteger(Number(packrunsItem.downtimeEventsAverageDuration)) ? Number(packrunsItem.downtimeEventsAverageDuration) : Math.floor(Number(packrunsItem.downtimeEventsAverageDuration));
1129
+ }
1130
+
1131
+ return Number.isInteger(packrunsItem.downtimeEventsAverageDuration) ? packrunsItem.downtimeEventsAverageDuration : Math.floor(packrunsItem.downtimeEventsAverageDuration);
1132
+ }();
1133
+ } else {
1134
+ packrunsItemObject.downtimeEventsAverageDuration = 0;
1135
+ }
1136
+
1137
+ if (_typeof(packrunsItem) === 'object' && 'class1ManningTarget' in packrunsItem) {
1138
+ packrunsItemObject.class1ManningTarget = function () {
1139
+ if (packrunsItem.class1ManningTarget === null) {
1140
+ return null;
1141
+ }
1142
+
1143
+ if (typeof packrunsItem.class1ManningTarget !== 'number') {
1144
+ return Number.isInteger(Number(packrunsItem.class1ManningTarget)) ? Number(packrunsItem.class1ManningTarget) : Math.floor(Number(packrunsItem.class1ManningTarget));
1145
+ }
1146
+
1147
+ return Number.isInteger(packrunsItem.class1ManningTarget) ? packrunsItem.class1ManningTarget : Math.floor(packrunsItem.class1ManningTarget);
1148
+ }();
1149
+ } else {
1150
+ packrunsItemObject.class1ManningTarget = null;
1151
+ }
1152
+
1153
+ if (_typeof(packrunsItem) === 'object' && 'averageClass1Manning' in packrunsItem) {
1154
+ packrunsItemObject.averageClass1Manning = function () {
1155
+ if (packrunsItem.averageClass1Manning === null) {
1156
+ return null;
1157
+ }
1158
+
1159
+ if (typeof packrunsItem.averageClass1Manning !== 'number') {
1160
+ return Number.isInteger(Number(packrunsItem.averageClass1Manning)) ? Number(packrunsItem.averageClass1Manning) : Math.floor(Number(packrunsItem.averageClass1Manning));
1161
+ }
1162
+
1163
+ return Number.isInteger(packrunsItem.averageClass1Manning) ? packrunsItem.averageClass1Manning : Math.floor(packrunsItem.averageClass1Manning);
1164
+ }();
1165
+ } else {
1166
+ packrunsItemObject.averageClass1Manning = null;
1167
+ }
1168
+
1169
+ if (_typeof(packrunsItem) === 'object' && 'class1ManningPercentage' in packrunsItem) {
1170
+ packrunsItemObject.class1ManningPercentage = function () {
1171
+ if (packrunsItem.class1ManningPercentage === null) {
1172
+ return null;
1173
+ }
1174
+
1175
+ if (typeof packrunsItem.class1ManningPercentage !== 'number') {
1176
+ return Number(packrunsItem.class1ManningPercentage);
1177
+ }
1178
+
1179
+ return packrunsItem.class1ManningPercentage;
1180
+ }();
1181
+ } else {
1182
+ packrunsItemObject.class1ManningPercentage = null;
1183
+ }
1184
+
1185
+ if (_typeof(packrunsItem) === 'object' && 'class2ManningTarget' in packrunsItem) {
1186
+ packrunsItemObject.class2ManningTarget = function () {
1187
+ if (packrunsItem.class2ManningTarget === null) {
1188
+ return null;
1189
+ }
1190
+
1191
+ if (typeof packrunsItem.class2ManningTarget !== 'number') {
1192
+ return Number.isInteger(Number(packrunsItem.class2ManningTarget)) ? Number(packrunsItem.class2ManningTarget) : Math.floor(Number(packrunsItem.class2ManningTarget));
1193
+ }
1194
+
1195
+ return Number.isInteger(packrunsItem.class2ManningTarget) ? packrunsItem.class2ManningTarget : Math.floor(packrunsItem.class2ManningTarget);
1196
+ }();
1197
+ } else {
1198
+ packrunsItemObject.class2ManningTarget = null;
1199
+ }
1200
+
1201
+ if (_typeof(packrunsItem) === 'object' && 'averageClass2Manning' in packrunsItem) {
1202
+ packrunsItemObject.averageClass2Manning = function () {
1203
+ if (packrunsItem.averageClass2Manning === null) {
1204
+ return null;
1205
+ }
1206
+
1207
+ if (typeof packrunsItem.averageClass2Manning !== 'number') {
1208
+ return Number.isInteger(Number(packrunsItem.averageClass2Manning)) ? Number(packrunsItem.averageClass2Manning) : Math.floor(Number(packrunsItem.averageClass2Manning));
1209
+ }
1210
+
1211
+ return Number.isInteger(packrunsItem.averageClass2Manning) ? packrunsItem.averageClass2Manning : Math.floor(packrunsItem.averageClass2Manning);
1212
+ }();
1213
+ } else {
1214
+ packrunsItemObject.averageClass2Manning = null;
1215
+ }
1216
+
1217
+ if (_typeof(packrunsItem) === 'object' && 'class2ManningPercentage' in packrunsItem) {
1218
+ packrunsItemObject.class2ManningPercentage = function () {
1219
+ if (packrunsItem.class2ManningPercentage === null) {
1220
+ return null;
1221
+ }
1222
+
1223
+ if (typeof packrunsItem.class2ManningPercentage !== 'number') {
1224
+ return Number(packrunsItem.class2ManningPercentage);
1225
+ }
1226
+
1227
+ return packrunsItem.class2ManningPercentage;
1228
+ }();
1229
+ } else {
1230
+ packrunsItemObject.class2ManningPercentage = null;
1231
+ }
1232
+
1233
+ if (_typeof(packrunsItem) === 'object' && 'totalManningTarget' in packrunsItem) {
1234
+ packrunsItemObject.totalManningTarget = function () {
1235
+ if (packrunsItem.totalManningTarget === null) {
1236
+ return null;
1237
+ }
1238
+
1239
+ if (typeof packrunsItem.totalManningTarget !== 'number') {
1240
+ return Number.isInteger(Number(packrunsItem.totalManningTarget)) ? Number(packrunsItem.totalManningTarget) : Math.floor(Number(packrunsItem.totalManningTarget));
1241
+ }
1242
+
1243
+ return Number.isInteger(packrunsItem.totalManningTarget) ? packrunsItem.totalManningTarget : Math.floor(packrunsItem.totalManningTarget);
1244
+ }();
1245
+ } else {
1246
+ packrunsItemObject.totalManningTarget = null;
1247
+ }
1248
+
1249
+ if (_typeof(packrunsItem) === 'object' && 'averageTotalManning' in packrunsItem) {
1250
+ packrunsItemObject.averageTotalManning = function () {
1251
+ if (packrunsItem.averageTotalManning === null) {
1252
+ return null;
1253
+ }
1254
+
1255
+ if (typeof packrunsItem.averageTotalManning !== 'number') {
1256
+ return Number.isInteger(Number(packrunsItem.averageTotalManning)) ? Number(packrunsItem.averageTotalManning) : Math.floor(Number(packrunsItem.averageTotalManning));
1257
+ }
1258
+
1259
+ return Number.isInteger(packrunsItem.averageTotalManning) ? packrunsItem.averageTotalManning : Math.floor(packrunsItem.averageTotalManning);
1260
+ }();
1261
+ } else {
1262
+ packrunsItemObject.averageTotalManning = null;
1263
+ }
1264
+
1265
+ if (_typeof(packrunsItem) === 'object' && 'totalManningPercentage' in packrunsItem) {
1266
+ packrunsItemObject.totalManningPercentage = function () {
1267
+ if (packrunsItem.totalManningPercentage === null) {
1268
+ return null;
1269
+ }
1270
+
1271
+ if (typeof packrunsItem.totalManningPercentage !== 'number') {
1272
+ return Number(packrunsItem.totalManningPercentage);
1273
+ }
1274
+
1275
+ return packrunsItem.totalManningPercentage;
1276
+ }();
1277
+ } else {
1278
+ packrunsItemObject.totalManningPercentage = null;
1279
+ }
1280
+
1281
+ if (_typeof(packrunsItem) === 'object' && 'costPerManningUnitHour' in packrunsItem) {
1282
+ packrunsItemObject.costPerManningUnitHour = function () {
1283
+ if (packrunsItem.costPerManningUnitHour === null) {
1284
+ return null;
1285
+ }
1286
+
1287
+ if (typeof packrunsItem.costPerManningUnitHour !== 'number') {
1288
+ return Number(packrunsItem.costPerManningUnitHour);
1289
+ }
1290
+
1291
+ return packrunsItem.costPerManningUnitHour;
1292
+ }();
1293
+ } else {
1294
+ packrunsItemObject.costPerManningUnitHour = null;
1295
+ }
1296
+
1297
+ if (_typeof(packrunsItem) === 'object' && 'totalHoursWorked' in packrunsItem) {
1298
+ packrunsItemObject.totalHoursWorked = function () {
1299
+ if (typeof packrunsItem.totalHoursWorked !== 'number') {
1300
+ return Number(packrunsItem.totalHoursWorked);
1301
+ }
1302
+
1303
+ return packrunsItem.totalHoursWorked;
1304
+ }();
1305
+ } else {
1306
+ packrunsItemObject.totalHoursWorked = 0;
1307
+ }
1308
+
1309
+ if (_typeof(packrunsItem) === 'object' && 'totalHoursWorkedExcludingDowntime' in packrunsItem) {
1310
+ packrunsItemObject.totalHoursWorkedExcludingDowntime = function () {
1311
+ if (typeof packrunsItem.totalHoursWorkedExcludingDowntime !== 'number') {
1312
+ return Number(packrunsItem.totalHoursWorkedExcludingDowntime);
1313
+ }
1314
+
1315
+ return packrunsItem.totalHoursWorkedExcludingDowntime;
1316
+ }();
1317
+ } else {
1318
+ packrunsItemObject.totalHoursWorkedExcludingDowntime = 0;
1319
+ }
1320
+
1321
+ if (_typeof(packrunsItem) === 'object' && 'totalHoursPaid' in packrunsItem) {
1322
+ packrunsItemObject.totalHoursPaid = function () {
1323
+ if (typeof packrunsItem.totalHoursPaid !== 'number') {
1324
+ return Number(packrunsItem.totalHoursPaid);
1325
+ }
1326
+
1327
+ return packrunsItem.totalHoursPaid;
1328
+ }();
1329
+ } else {
1330
+ packrunsItemObject.totalHoursPaid = 0;
1331
+ }
1332
+
1333
+ if (_typeof(packrunsItem) === 'object' && 'class1TotalManningCost' in packrunsItem) {
1334
+ packrunsItemObject.class1TotalManningCost = function () {
1335
+ if (packrunsItem.class1TotalManningCost === null) {
1336
+ return null;
1337
+ }
1338
+
1339
+ if (typeof packrunsItem.class1TotalManningCost !== 'number') {
1340
+ return Number(packrunsItem.class1TotalManningCost);
1341
+ }
1342
+
1343
+ return packrunsItem.class1TotalManningCost;
1344
+ }();
1345
+ } else {
1346
+ packrunsItemObject.class1TotalManningCost = null;
1347
+ }
1348
+
1349
+ if (_typeof(packrunsItem) === 'object' && 'class2TotalManningCost' in packrunsItem) {
1350
+ packrunsItemObject.class2TotalManningCost = function () {
1351
+ if (packrunsItem.class2TotalManningCost === null) {
1352
+ return null;
1353
+ }
1354
+
1355
+ if (typeof packrunsItem.class2TotalManningCost !== 'number') {
1356
+ return Number(packrunsItem.class2TotalManningCost);
1357
+ }
1358
+
1359
+ return packrunsItem.class2TotalManningCost;
1360
+ }();
1361
+ } else {
1362
+ packrunsItemObject.class2TotalManningCost = null;
1363
+ }
1364
+
1365
+ if (_typeof(packrunsItem) === 'object' && 'class1DowntimeManningCost' in packrunsItem) {
1366
+ packrunsItemObject.class1DowntimeManningCost = function () {
1367
+ if (packrunsItem.class1DowntimeManningCost === null) {
1368
+ return null;
1369
+ }
1370
+
1371
+ if (typeof packrunsItem.class1DowntimeManningCost !== 'number') {
1372
+ return Number(packrunsItem.class1DowntimeManningCost);
1373
+ }
1374
+
1375
+ return packrunsItem.class1DowntimeManningCost;
1376
+ }();
1377
+ } else {
1378
+ packrunsItemObject.class1DowntimeManningCost = null;
1379
+ }
1380
+
1381
+ if (_typeof(packrunsItem) === 'object' && 'class2DowntimeManningCost' in packrunsItem) {
1382
+ packrunsItemObject.class2DowntimeManningCost = function () {
1383
+ if (packrunsItem.class2DowntimeManningCost === null) {
1384
+ return null;
1385
+ }
1386
+
1387
+ if (typeof packrunsItem.class2DowntimeManningCost !== 'number') {
1388
+ return Number(packrunsItem.class2DowntimeManningCost);
1389
+ }
1390
+
1391
+ return packrunsItem.class2DowntimeManningCost;
1392
+ }();
1393
+ } else {
1394
+ packrunsItemObject.class2DowntimeManningCost = null;
1395
+ }
1396
+
1397
+ if (_typeof(packrunsItem) === 'object' && 'class1CostPerTrayTarget' in packrunsItem) {
1398
+ packrunsItemObject.class1CostPerTrayTarget = function () {
1399
+ if (packrunsItem.class1CostPerTrayTarget === null) {
1400
+ return null;
1401
+ }
1402
+
1403
+ if (typeof packrunsItem.class1CostPerTrayTarget !== 'number') {
1404
+ return Number(packrunsItem.class1CostPerTrayTarget);
1405
+ }
1406
+
1407
+ return packrunsItem.class1CostPerTrayTarget;
1408
+ }();
1409
+ } else {
1410
+ packrunsItemObject.class1CostPerTrayTarget = null;
1411
+ }
1412
+
1413
+ if (_typeof(packrunsItem) === 'object' && 'class1CostPerTrayActual' in packrunsItem) {
1414
+ packrunsItemObject.class1CostPerTrayActual = function () {
1415
+ if (packrunsItem.class1CostPerTrayActual === null) {
1416
+ return null;
1417
+ }
1418
+
1419
+ if (typeof packrunsItem.class1CostPerTrayActual !== 'number') {
1420
+ return Number(packrunsItem.class1CostPerTrayActual);
1421
+ }
1422
+
1423
+ return packrunsItem.class1CostPerTrayActual;
1424
+ }();
1425
+ } else {
1426
+ packrunsItemObject.class1CostPerTrayActual = null;
1427
+ }
1428
+
1429
+ if (_typeof(packrunsItem) === 'object' && 'class2CostPerTrayActual' in packrunsItem) {
1430
+ packrunsItemObject.class2CostPerTrayActual = function () {
1431
+ if (packrunsItem.class2CostPerTrayActual === null) {
1432
+ return null;
1433
+ }
1434
+
1435
+ if (typeof packrunsItem.class2CostPerTrayActual !== 'number') {
1436
+ return Number(packrunsItem.class2CostPerTrayActual);
1437
+ }
1438
+
1439
+ return packrunsItem.class2CostPerTrayActual;
1440
+ }();
1441
+ } else {
1442
+ packrunsItemObject.class2CostPerTrayActual = null;
1443
+ }
1444
+
1445
+ if (_typeof(packrunsItem) === 'object' && 'class1TraysPerHour' in packrunsItem) {
1446
+ packrunsItemObject.class1TraysPerHour = function () {
1447
+ if (typeof packrunsItem.class1TraysPerHour !== 'number') {
1448
+ return Number.isInteger(Number(packrunsItem.class1TraysPerHour)) ? Number(packrunsItem.class1TraysPerHour) : Math.floor(Number(packrunsItem.class1TraysPerHour));
1449
+ }
1450
+
1451
+ return Number.isInteger(packrunsItem.class1TraysPerHour) ? packrunsItem.class1TraysPerHour : Math.floor(packrunsItem.class1TraysPerHour);
1452
+ }();
1453
+ } else {
1454
+ packrunsItemObject.class1TraysPerHour = 0;
1455
+ }
1456
+
1457
+ if (_typeof(packrunsItem) === 'object' && 'class1TraysPerHourExcludingDowntime' in packrunsItem) {
1458
+ packrunsItemObject.class1TraysPerHourExcludingDowntime = function () {
1459
+ if (typeof packrunsItem.class1TraysPerHourExcludingDowntime !== 'number') {
1460
+ return Number.isInteger(Number(packrunsItem.class1TraysPerHourExcludingDowntime)) ? Number(packrunsItem.class1TraysPerHourExcludingDowntime) : Math.floor(Number(packrunsItem.class1TraysPerHourExcludingDowntime));
1461
+ }
1462
+
1463
+ return Number.isInteger(packrunsItem.class1TraysPerHourExcludingDowntime) ? packrunsItem.class1TraysPerHourExcludingDowntime : Math.floor(packrunsItem.class1TraysPerHourExcludingDowntime);
1464
+ }();
1465
+ } else {
1466
+ packrunsItemObject.class1TraysPerHourExcludingDowntime = 0;
1467
+ }
1468
+
1469
+ if (_typeof(packrunsItem) === 'object' && 'class1TraysPerHourExcludingDowntimeTarget' in packrunsItem) {
1470
+ packrunsItemObject.class1TraysPerHourExcludingDowntimeTarget = function () {
1471
+ if (typeof packrunsItem.class1TraysPerHourExcludingDowntimeTarget !== 'number') {
1472
+ return Number.isInteger(Number(packrunsItem.class1TraysPerHourExcludingDowntimeTarget)) ? Number(packrunsItem.class1TraysPerHourExcludingDowntimeTarget) : Math.floor(Number(packrunsItem.class1TraysPerHourExcludingDowntimeTarget));
1473
+ }
1474
+
1475
+ return Number.isInteger(packrunsItem.class1TraysPerHourExcludingDowntimeTarget) ? packrunsItem.class1TraysPerHourExcludingDowntimeTarget : Math.floor(packrunsItem.class1TraysPerHourExcludingDowntimeTarget);
1476
+ }();
1477
+ } else {
1478
+ packrunsItemObject.class1TraysPerHourExcludingDowntimeTarget = 0;
1479
+ }
1480
+
1481
+ if (_typeof(packrunsItem) === 'object' && 'class1TraysPerManHour' in packrunsItem) {
1482
+ packrunsItemObject.class1TraysPerManHour = function () {
1483
+ if (packrunsItem.class1TraysPerManHour === null) {
1484
+ return null;
1485
+ }
1486
+
1487
+ if (typeof packrunsItem.class1TraysPerManHour !== 'number') {
1488
+ return Number(packrunsItem.class1TraysPerManHour);
1489
+ }
1490
+
1491
+ return packrunsItem.class1TraysPerManHour;
1492
+ }();
1493
+ } else {
1494
+ packrunsItemObject.class1TraysPerManHour = null;
1495
+ }
1496
+
1497
+ if (_typeof(packrunsItem) === 'object' && 'class1TraysPerManHourExcludingDowntime' in packrunsItem) {
1498
+ packrunsItemObject.class1TraysPerManHourExcludingDowntime = function () {
1499
+ if (packrunsItem.class1TraysPerManHourExcludingDowntime === null) {
1500
+ return null;
1501
+ }
1502
+
1503
+ if (typeof packrunsItem.class1TraysPerManHourExcludingDowntime !== 'number') {
1504
+ return Number(packrunsItem.class1TraysPerManHourExcludingDowntime);
1505
+ }
1506
+
1507
+ return packrunsItem.class1TraysPerManHourExcludingDowntime;
1508
+ }();
1509
+ } else {
1510
+ packrunsItemObject.class1TraysPerManHourExcludingDowntime = null;
1511
+ }
1512
+
1513
+ if (_typeof(packrunsItem) === 'object' && 'class2TraysPerHour' in packrunsItem) {
1514
+ packrunsItemObject.class2TraysPerHour = function () {
1515
+ if (typeof packrunsItem.class2TraysPerHour !== 'number') {
1516
+ return Number.isInteger(Number(packrunsItem.class2TraysPerHour)) ? Number(packrunsItem.class2TraysPerHour) : Math.floor(Number(packrunsItem.class2TraysPerHour));
1517
+ }
1518
+
1519
+ return Number.isInteger(packrunsItem.class2TraysPerHour) ? packrunsItem.class2TraysPerHour : Math.floor(packrunsItem.class2TraysPerHour);
1520
+ }();
1521
+ } else {
1522
+ packrunsItemObject.class2TraysPerHour = 0;
1523
+ }
1524
+
1525
+ if (_typeof(packrunsItem) === 'object' && 'class2TraysPerHourExcludingDowntime' in packrunsItem) {
1526
+ packrunsItemObject.class2TraysPerHourExcludingDowntime = function () {
1527
+ if (typeof packrunsItem.class2TraysPerHourExcludingDowntime !== 'number') {
1528
+ return Number.isInteger(Number(packrunsItem.class2TraysPerHourExcludingDowntime)) ? Number(packrunsItem.class2TraysPerHourExcludingDowntime) : Math.floor(Number(packrunsItem.class2TraysPerHourExcludingDowntime));
1529
+ }
1530
+
1531
+ return Number.isInteger(packrunsItem.class2TraysPerHourExcludingDowntime) ? packrunsItem.class2TraysPerHourExcludingDowntime : Math.floor(packrunsItem.class2TraysPerHourExcludingDowntime);
1532
+ }();
1533
+ } else {
1534
+ packrunsItemObject.class2TraysPerHourExcludingDowntime = 0;
1535
+ }
1536
+
1537
+ if (_typeof(packrunsItem) === 'object' && 'class2TraysPerManHour' in packrunsItem) {
1538
+ packrunsItemObject.class2TraysPerManHour = function () {
1539
+ if (packrunsItem.class2TraysPerManHour === null) {
1540
+ return null;
1541
+ }
1542
+
1543
+ if (typeof packrunsItem.class2TraysPerManHour !== 'number') {
1544
+ return Number(packrunsItem.class2TraysPerManHour);
1545
+ }
1546
+
1547
+ return packrunsItem.class2TraysPerManHour;
1548
+ }();
1549
+ } else {
1550
+ packrunsItemObject.class2TraysPerManHour = null;
1551
+ }
1552
+
1553
+ if (_typeof(packrunsItem) === 'object' && 'class2TraysPerManHourExcludingDowntime' in packrunsItem) {
1554
+ packrunsItemObject.class2TraysPerManHourExcludingDowntime = function () {
1555
+ if (packrunsItem.class2TraysPerManHourExcludingDowntime === null) {
1556
+ return null;
1557
+ }
1558
+
1559
+ if (typeof packrunsItem.class2TraysPerManHourExcludingDowntime !== 'number') {
1560
+ return Number(packrunsItem.class2TraysPerManHourExcludingDowntime);
1561
+ }
1562
+
1563
+ return packrunsItem.class2TraysPerManHourExcludingDowntime;
1564
+ }();
1565
+ } else {
1566
+ packrunsItemObject.class2TraysPerManHourExcludingDowntime = null;
1567
+ }
1568
+
1569
+ if (_typeof(packrunsItem) === 'object' && 'class1LayeredPercentageTarget' in packrunsItem) {
1570
+ packrunsItemObject.class1LayeredPercentageTarget = function () {
1571
+ if (packrunsItem.class1LayeredPercentageTarget === null) {
1572
+ return null;
1573
+ }
1574
+
1575
+ if (typeof packrunsItem.class1LayeredPercentageTarget !== 'number') {
1576
+ return Number(packrunsItem.class1LayeredPercentageTarget);
1577
+ }
1578
+
1579
+ return packrunsItem.class1LayeredPercentageTarget;
1580
+ }();
1581
+ } else {
1582
+ packrunsItemObject.class1LayeredPercentageTarget = null;
1583
+ }
1584
+
1585
+ if (_typeof(packrunsItem) === 'object' && 'class1LayeredPercentage' in packrunsItem) {
1586
+ packrunsItemObject.class1LayeredPercentage = function () {
1587
+ if (packrunsItem.class1LayeredPercentage === null) {
1588
+ return null;
1589
+ }
1590
+
1591
+ if (typeof packrunsItem.class1LayeredPercentage !== 'number') {
1592
+ return Number(packrunsItem.class1LayeredPercentage);
1593
+ }
1594
+
1595
+ return packrunsItem.class1LayeredPercentage;
1596
+ }();
1597
+ } else {
1598
+ packrunsItemObject.class1LayeredPercentage = null;
1599
+ }
1600
+
1601
+ if (_typeof(packrunsItem) === 'object' && 'class1BulkPercentage' in packrunsItem) {
1602
+ packrunsItemObject.class1BulkPercentage = function () {
1603
+ if (packrunsItem.class1BulkPercentage === null) {
1604
+ return null;
1605
+ }
1606
+
1607
+ if (typeof packrunsItem.class1BulkPercentage !== 'number') {
1608
+ return Number(packrunsItem.class1BulkPercentage);
1609
+ }
1610
+
1611
+ return packrunsItem.class1BulkPercentage;
1612
+ }();
1613
+ } else {
1614
+ packrunsItemObject.class1BulkPercentage = null;
1615
+ }
1616
+
1617
+ return packrunsItemObject;
1618
+ }();
1619
+ });
1620
+ }();
1621
+ } else {
1622
+ resultObject.packruns = [];
1623
+ }
1624
+
1625
+ if (_typeof(result) === 'object' && 'shifts' in result) {
1626
+ resultObject.shifts = function () {
1627
+ if (Array.isArray(result.shifts) !== true) {
1628
+ return [];
1629
+ }
1630
+
1631
+ return result.shifts.map(function (shiftsItem) {
1632
+ return function () {
1633
+ var shiftsItemObject = {};
1634
+
1635
+ if (_typeof(shiftsItem) === 'object' && 'siteId' in shiftsItem) {
1636
+ shiftsItemObject.siteId = function () {
1637
+ if (typeof shiftsItem.siteId !== 'number') {
1638
+ return Number.isInteger(Number(shiftsItem.siteId)) ? Number(shiftsItem.siteId) : Math.floor(Number(shiftsItem.siteId));
1639
+ }
1640
+
1641
+ return Number.isInteger(shiftsItem.siteId) ? shiftsItem.siteId : Math.floor(shiftsItem.siteId);
1642
+ }();
1643
+ } else {
1644
+ shiftsItemObject.siteId = 0;
1645
+ }
1646
+
1647
+ if (_typeof(shiftsItem) === 'object' && 'siteName' in shiftsItem) {
1648
+ shiftsItemObject.siteName = function () {
1649
+ if (typeof shiftsItem.siteName !== 'string') {
1650
+ return String(shiftsItem.siteName);
1651
+ }
1652
+
1653
+ return shiftsItem.siteName;
1654
+ }();
1655
+ } else {
1656
+ shiftsItemObject.siteName = "";
1657
+ }
1658
+
1659
+ if (_typeof(shiftsItem) === 'object' && 'packingLineId' in shiftsItem) {
1660
+ shiftsItemObject.packingLineId = function () {
1661
+ if (typeof shiftsItem.packingLineId !== 'string') {
1662
+ return String(shiftsItem.packingLineId);
1663
+ }
1664
+
1665
+ return shiftsItem.packingLineId;
1666
+ }();
1667
+ } else {
1668
+ shiftsItemObject.packingLineId = "";
1669
+ }
1670
+
1671
+ if (_typeof(shiftsItem) === 'object' && 'packingLineName' in shiftsItem) {
1672
+ shiftsItemObject.packingLineName = function () {
1673
+ if (typeof shiftsItem.packingLineName !== 'string') {
1674
+ return String(shiftsItem.packingLineName);
1675
+ }
1676
+
1677
+ return shiftsItem.packingLineName;
1678
+ }();
1679
+ } else {
1680
+ shiftsItemObject.packingLineName = "";
1681
+ }
1682
+
1683
+ if (_typeof(shiftsItem) === 'object' && 'shiftId' in shiftsItem) {
1684
+ shiftsItemObject.shiftId = function () {
1685
+ if (typeof shiftsItem.shiftId !== 'string') {
1686
+ return String(shiftsItem.shiftId);
1687
+ }
1688
+
1689
+ return shiftsItem.shiftId;
1690
+ }();
1691
+ } else {
1692
+ shiftsItemObject.shiftId = "";
1693
+ }
1694
+
1695
+ if (_typeof(shiftsItem) === 'object' && 'shiftType' in shiftsItem) {
1696
+ shiftsItemObject.shiftType = function () {
1697
+ if (typeof shiftsItem.shiftType !== 'string') {
1698
+ return String(shiftsItem.shiftType);
1699
+ }
1700
+
1701
+ return shiftsItem.shiftType;
1702
+ }();
1703
+ } else {
1704
+ shiftsItemObject.shiftType = "";
1705
+ }
1706
+
1707
+ if (_typeof(shiftsItem) === 'object' && 'isoWeek' in shiftsItem) {
1708
+ shiftsItemObject.isoWeek = function () {
1709
+ if (typeof shiftsItem.isoWeek !== 'number') {
1710
+ return Number.isInteger(Number(shiftsItem.isoWeek)) ? Number(shiftsItem.isoWeek) : Math.floor(Number(shiftsItem.isoWeek));
1711
+ }
1712
+
1713
+ return Number.isInteger(shiftsItem.isoWeek) ? shiftsItem.isoWeek : Math.floor(shiftsItem.isoWeek);
1714
+ }();
1715
+ } else {
1716
+ shiftsItemObject.isoWeek = 0;
1717
+ }
1718
+
1719
+ if (_typeof(shiftsItem) === 'object' && 'startTimestamp' in shiftsItem) {
1720
+ shiftsItemObject.startTimestamp = function () {
1721
+ if (typeof shiftsItem.startTimestamp !== 'string') {
1722
+ return new Date(String(shiftsItem.startTimestamp));
1723
+ }
1724
+
1725
+ return new Date(shiftsItem.startTimestamp);
1726
+ }();
1727
+ } else {
1728
+ shiftsItemObject.startTimestamp = new Date();
1729
+ }
1730
+
1731
+ if (_typeof(shiftsItem) === 'object' && 'finishTimestamp' in shiftsItem) {
1732
+ shiftsItemObject.finishTimestamp = function () {
1733
+ if (shiftsItem.finishTimestamp === null) {
1734
+ return null;
1735
+ }
1736
+
1737
+ if (typeof shiftsItem.finishTimestamp !== 'string') {
1738
+ return new Date(String(shiftsItem.finishTimestamp));
1739
+ }
1740
+
1741
+ return new Date(shiftsItem.finishTimestamp);
1742
+ }();
1743
+ } else {
1744
+ shiftsItemObject.finishTimestamp = null;
1745
+ }
1746
+
1747
+ if (_typeof(shiftsItem) === 'object' && 'lineManagerName' in shiftsItem) {
1748
+ shiftsItemObject.lineManagerName = function () {
1749
+ if (shiftsItem.lineManagerName === null) {
1750
+ return null;
1751
+ }
1752
+
1753
+ if (typeof shiftsItem.lineManagerName !== 'string') {
1754
+ return String(shiftsItem.lineManagerName);
1755
+ }
1756
+
1757
+ return shiftsItem.lineManagerName;
1758
+ }();
1759
+ } else {
1760
+ shiftsItemObject.lineManagerName = null;
1761
+ }
1762
+
1763
+ if (_typeof(shiftsItem) === 'object' && 'qualityManagerName' in shiftsItem) {
1764
+ shiftsItemObject.qualityManagerName = function () {
1765
+ if (shiftsItem.qualityManagerName === null) {
1766
+ return null;
1767
+ }
1768
+
1769
+ if (typeof shiftsItem.qualityManagerName !== 'string') {
1770
+ return String(shiftsItem.qualityManagerName);
1771
+ }
1772
+
1773
+ return shiftsItem.qualityManagerName;
1774
+ }();
1775
+ } else {
1776
+ shiftsItemObject.qualityManagerName = null;
1777
+ }
1778
+
1779
+ if (_typeof(shiftsItem) === 'object' && 'varietyIds' in shiftsItem) {
1780
+ shiftsItemObject.varietyIds = function () {
1781
+ if (Array.isArray(shiftsItem.varietyIds) !== true) {
1782
+ return [];
1783
+ }
1784
+
1785
+ return shiftsItem.varietyIds.map(function (varietyIdsItem) {
1786
+ return function () {
1787
+ if (typeof varietyIdsItem !== 'string') {
1788
+ return String(varietyIdsItem);
1789
+ }
1790
+
1791
+ return varietyIdsItem;
1792
+ }();
1793
+ });
1794
+ }();
1795
+ } else {
1796
+ shiftsItemObject.varietyIds = [];
1797
+ }
1798
+
1799
+ if (_typeof(shiftsItem) === 'object' && 'varietyCodes' in shiftsItem) {
1800
+ shiftsItemObject.varietyCodes = function () {
1801
+ if (Array.isArray(shiftsItem.varietyCodes) !== true) {
1802
+ return [];
1803
+ }
1804
+
1805
+ return shiftsItem.varietyCodes.map(function (varietyCodesItem) {
1806
+ return function () {
1807
+ if (typeof varietyCodesItem !== 'string') {
1808
+ return String(varietyCodesItem);
1809
+ }
1810
+
1811
+ return varietyCodesItem;
1812
+ }();
1813
+ });
1814
+ }();
1815
+ } else {
1816
+ shiftsItemObject.varietyCodes = [];
1817
+ }
1818
+
1819
+ if (_typeof(shiftsItem) === 'object' && 'growingMethodIds' in shiftsItem) {
1820
+ shiftsItemObject.growingMethodIds = function () {
1821
+ if (Array.isArray(shiftsItem.growingMethodIds) !== true) {
1822
+ return [];
1823
+ }
1824
+
1825
+ return shiftsItem.growingMethodIds.map(function (growingMethodIdsItem) {
1826
+ return function () {
1827
+ if (typeof growingMethodIdsItem !== 'string') {
1828
+ return String(growingMethodIdsItem);
1829
+ }
1830
+
1831
+ return growingMethodIdsItem;
1832
+ }();
1833
+ });
1834
+ }();
1835
+ } else {
1836
+ shiftsItemObject.growingMethodIds = [];
1837
+ }
1838
+
1839
+ if (_typeof(shiftsItem) === 'object' && 'growingMethodCodes' in shiftsItem) {
1840
+ shiftsItemObject.growingMethodCodes = function () {
1841
+ if (Array.isArray(shiftsItem.growingMethodCodes) !== true) {
1842
+ return [];
1843
+ }
1844
+
1845
+ return shiftsItem.growingMethodCodes.map(function (growingMethodCodesItem) {
1846
+ return function () {
1847
+ if (typeof growingMethodCodesItem !== 'string') {
1848
+ return String(growingMethodCodesItem);
1849
+ }
1850
+
1851
+ return growingMethodCodesItem;
1852
+ }();
1853
+ });
1854
+ }();
1855
+ } else {
1856
+ shiftsItemObject.growingMethodCodes = [];
1857
+ }
1858
+
1859
+ if (_typeof(shiftsItem) === 'object' && 'binsTippedTarget' in shiftsItem) {
1860
+ shiftsItemObject.binsTippedTarget = function () {
1861
+ if (typeof shiftsItem.binsTippedTarget !== 'number') {
1862
+ return Number.isInteger(Number(shiftsItem.binsTippedTarget)) ? Number(shiftsItem.binsTippedTarget) : Math.floor(Number(shiftsItem.binsTippedTarget));
1863
+ }
1864
+
1865
+ return Number.isInteger(shiftsItem.binsTippedTarget) ? shiftsItem.binsTippedTarget : Math.floor(shiftsItem.binsTippedTarget);
1866
+ }();
1867
+ } else {
1868
+ shiftsItemObject.binsTippedTarget = 0;
1869
+ }
1870
+
1871
+ if (_typeof(shiftsItem) === 'object' && 'totalBinsTipped' in shiftsItem) {
1872
+ shiftsItemObject.totalBinsTipped = function () {
1873
+ if (typeof shiftsItem.totalBinsTipped !== 'number') {
1874
+ return Number.isInteger(Number(shiftsItem.totalBinsTipped)) ? Number(shiftsItem.totalBinsTipped) : Math.floor(Number(shiftsItem.totalBinsTipped));
1875
+ }
1876
+
1877
+ return Number.isInteger(shiftsItem.totalBinsTipped) ? shiftsItem.totalBinsTipped : Math.floor(shiftsItem.totalBinsTipped);
1878
+ }();
1879
+ } else {
1880
+ shiftsItemObject.totalBinsTipped = 0;
1881
+ }
1882
+
1883
+ if (_typeof(shiftsItem) === 'object' && 'binsTippedPerHour' in shiftsItem) {
1884
+ shiftsItemObject.binsTippedPerHour = function () {
1885
+ if (typeof shiftsItem.binsTippedPerHour !== 'number') {
1886
+ return Number.isInteger(Number(shiftsItem.binsTippedPerHour)) ? Number(shiftsItem.binsTippedPerHour) : Math.floor(Number(shiftsItem.binsTippedPerHour));
1887
+ }
1888
+
1889
+ return Number.isInteger(shiftsItem.binsTippedPerHour) ? shiftsItem.binsTippedPerHour : Math.floor(shiftsItem.binsTippedPerHour);
1890
+ }();
1891
+ } else {
1892
+ shiftsItemObject.binsTippedPerHour = 0;
1893
+ }
1894
+
1895
+ if (_typeof(shiftsItem) === 'object' && 'binsTippedPerHourExcludingDowntime' in shiftsItem) {
1896
+ shiftsItemObject.binsTippedPerHourExcludingDowntime = function () {
1897
+ if (typeof shiftsItem.binsTippedPerHourExcludingDowntime !== 'number') {
1898
+ return Number.isInteger(Number(shiftsItem.binsTippedPerHourExcludingDowntime)) ? Number(shiftsItem.binsTippedPerHourExcludingDowntime) : Math.floor(Number(shiftsItem.binsTippedPerHourExcludingDowntime));
1899
+ }
1900
+
1901
+ return Number.isInteger(shiftsItem.binsTippedPerHourExcludingDowntime) ? shiftsItem.binsTippedPerHourExcludingDowntime : Math.floor(shiftsItem.binsTippedPerHourExcludingDowntime);
1902
+ }();
1903
+ } else {
1904
+ shiftsItemObject.binsTippedPerHourExcludingDowntime = 0;
1905
+ }
1906
+
1907
+ if (_typeof(shiftsItem) === 'object' && 'totalProductionTime' in shiftsItem) {
1908
+ shiftsItemObject.totalProductionTime = function () {
1909
+ if (typeof shiftsItem.totalProductionTime !== 'number') {
1910
+ return Number.isInteger(Number(shiftsItem.totalProductionTime)) ? Number(shiftsItem.totalProductionTime) : Math.floor(Number(shiftsItem.totalProductionTime));
1911
+ }
1912
+
1913
+ return Number.isInteger(shiftsItem.totalProductionTime) ? shiftsItem.totalProductionTime : Math.floor(shiftsItem.totalProductionTime);
1914
+ }();
1915
+ } else {
1916
+ shiftsItemObject.totalProductionTime = 0;
1917
+ }
1918
+
1919
+ if (_typeof(shiftsItem) === 'object' && 'totalScheduledBreakTime' in shiftsItem) {
1920
+ shiftsItemObject.totalScheduledBreakTime = function () {
1921
+ if (typeof shiftsItem.totalScheduledBreakTime !== 'number') {
1922
+ return Number.isInteger(Number(shiftsItem.totalScheduledBreakTime)) ? Number(shiftsItem.totalScheduledBreakTime) : Math.floor(Number(shiftsItem.totalScheduledBreakTime));
1923
+ }
1924
+
1925
+ return Number.isInteger(shiftsItem.totalScheduledBreakTime) ? shiftsItem.totalScheduledBreakTime : Math.floor(shiftsItem.totalScheduledBreakTime);
1926
+ }();
1927
+ } else {
1928
+ shiftsItemObject.totalScheduledBreakTime = 0;
1929
+ }
1930
+
1931
+ if (_typeof(shiftsItem) === 'object' && 'totalDowntime' in shiftsItem) {
1932
+ shiftsItemObject.totalDowntime = function () {
1933
+ if (typeof shiftsItem.totalDowntime !== 'number') {
1934
+ return Number.isInteger(Number(shiftsItem.totalDowntime)) ? Number(shiftsItem.totalDowntime) : Math.floor(Number(shiftsItem.totalDowntime));
1935
+ }
1936
+
1937
+ return Number.isInteger(shiftsItem.totalDowntime) ? shiftsItem.totalDowntime : Math.floor(shiftsItem.totalDowntime);
1938
+ }();
1939
+ } else {
1940
+ shiftsItemObject.totalDowntime = 0;
1941
+ }
1942
+
1943
+ if (_typeof(shiftsItem) === 'object' && 'downtimeEventsCount' in shiftsItem) {
1944
+ shiftsItemObject.downtimeEventsCount = function () {
1945
+ if (typeof shiftsItem.downtimeEventsCount !== 'number') {
1946
+ return Number.isInteger(Number(shiftsItem.downtimeEventsCount)) ? Number(shiftsItem.downtimeEventsCount) : Math.floor(Number(shiftsItem.downtimeEventsCount));
1947
+ }
1948
+
1949
+ return Number.isInteger(shiftsItem.downtimeEventsCount) ? shiftsItem.downtimeEventsCount : Math.floor(shiftsItem.downtimeEventsCount);
1950
+ }();
1951
+ } else {
1952
+ shiftsItemObject.downtimeEventsCount = 0;
1953
+ }
1954
+
1955
+ if (_typeof(shiftsItem) === 'object' && 'downtimeEventsAverageDuration' in shiftsItem) {
1956
+ shiftsItemObject.downtimeEventsAverageDuration = function () {
1957
+ if (typeof shiftsItem.downtimeEventsAverageDuration !== 'number') {
1958
+ return Number.isInteger(Number(shiftsItem.downtimeEventsAverageDuration)) ? Number(shiftsItem.downtimeEventsAverageDuration) : Math.floor(Number(shiftsItem.downtimeEventsAverageDuration));
1959
+ }
1960
+
1961
+ return Number.isInteger(shiftsItem.downtimeEventsAverageDuration) ? shiftsItem.downtimeEventsAverageDuration : Math.floor(shiftsItem.downtimeEventsAverageDuration);
1962
+ }();
1963
+ } else {
1964
+ shiftsItemObject.downtimeEventsAverageDuration = 0;
1965
+ }
1966
+
1967
+ if (_typeof(shiftsItem) === 'object' && 'class1ManningTarget' in shiftsItem) {
1968
+ shiftsItemObject.class1ManningTarget = function () {
1969
+ if (shiftsItem.class1ManningTarget === null) {
1970
+ return null;
1971
+ }
1972
+
1973
+ if (typeof shiftsItem.class1ManningTarget !== 'number') {
1974
+ return Number.isInteger(Number(shiftsItem.class1ManningTarget)) ? Number(shiftsItem.class1ManningTarget) : Math.floor(Number(shiftsItem.class1ManningTarget));
1975
+ }
1976
+
1977
+ return Number.isInteger(shiftsItem.class1ManningTarget) ? shiftsItem.class1ManningTarget : Math.floor(shiftsItem.class1ManningTarget);
1978
+ }();
1979
+ } else {
1980
+ shiftsItemObject.class1ManningTarget = null;
1981
+ }
1982
+
1983
+ if (_typeof(shiftsItem) === 'object' && 'averageClass1Manning' in shiftsItem) {
1984
+ shiftsItemObject.averageClass1Manning = function () {
1985
+ if (shiftsItem.averageClass1Manning === null) {
1986
+ return null;
1987
+ }
1988
+
1989
+ if (typeof shiftsItem.averageClass1Manning !== 'number') {
1990
+ return Number.isInteger(Number(shiftsItem.averageClass1Manning)) ? Number(shiftsItem.averageClass1Manning) : Math.floor(Number(shiftsItem.averageClass1Manning));
1991
+ }
1992
+
1993
+ return Number.isInteger(shiftsItem.averageClass1Manning) ? shiftsItem.averageClass1Manning : Math.floor(shiftsItem.averageClass1Manning);
1994
+ }();
1995
+ } else {
1996
+ shiftsItemObject.averageClass1Manning = null;
1997
+ }
1998
+
1999
+ if (_typeof(shiftsItem) === 'object' && 'class1ManningPercentage' in shiftsItem) {
2000
+ shiftsItemObject.class1ManningPercentage = function () {
2001
+ if (shiftsItem.class1ManningPercentage === null) {
2002
+ return null;
2003
+ }
2004
+
2005
+ if (typeof shiftsItem.class1ManningPercentage !== 'number') {
2006
+ return Number(shiftsItem.class1ManningPercentage);
2007
+ }
2008
+
2009
+ return shiftsItem.class1ManningPercentage;
2010
+ }();
2011
+ } else {
2012
+ shiftsItemObject.class1ManningPercentage = null;
2013
+ }
2014
+
2015
+ if (_typeof(shiftsItem) === 'object' && 'class2ManningTarget' in shiftsItem) {
2016
+ shiftsItemObject.class2ManningTarget = function () {
2017
+ if (shiftsItem.class2ManningTarget === null) {
2018
+ return null;
2019
+ }
2020
+
2021
+ if (typeof shiftsItem.class2ManningTarget !== 'number') {
2022
+ return Number.isInteger(Number(shiftsItem.class2ManningTarget)) ? Number(shiftsItem.class2ManningTarget) : Math.floor(Number(shiftsItem.class2ManningTarget));
2023
+ }
2024
+
2025
+ return Number.isInteger(shiftsItem.class2ManningTarget) ? shiftsItem.class2ManningTarget : Math.floor(shiftsItem.class2ManningTarget);
2026
+ }();
2027
+ } else {
2028
+ shiftsItemObject.class2ManningTarget = null;
2029
+ }
2030
+
2031
+ if (_typeof(shiftsItem) === 'object' && 'averageClass2Manning' in shiftsItem) {
2032
+ shiftsItemObject.averageClass2Manning = function () {
2033
+ if (shiftsItem.averageClass2Manning === null) {
2034
+ return null;
2035
+ }
2036
+
2037
+ if (typeof shiftsItem.averageClass2Manning !== 'number') {
2038
+ return Number.isInteger(Number(shiftsItem.averageClass2Manning)) ? Number(shiftsItem.averageClass2Manning) : Math.floor(Number(shiftsItem.averageClass2Manning));
2039
+ }
2040
+
2041
+ return Number.isInteger(shiftsItem.averageClass2Manning) ? shiftsItem.averageClass2Manning : Math.floor(shiftsItem.averageClass2Manning);
2042
+ }();
2043
+ } else {
2044
+ shiftsItemObject.averageClass2Manning = null;
2045
+ }
2046
+
2047
+ if (_typeof(shiftsItem) === 'object' && 'class2ManningPercentage' in shiftsItem) {
2048
+ shiftsItemObject.class2ManningPercentage = function () {
2049
+ if (shiftsItem.class2ManningPercentage === null) {
2050
+ return null;
2051
+ }
2052
+
2053
+ if (typeof shiftsItem.class2ManningPercentage !== 'number') {
2054
+ return Number(shiftsItem.class2ManningPercentage);
2055
+ }
2056
+
2057
+ return shiftsItem.class2ManningPercentage;
2058
+ }();
2059
+ } else {
2060
+ shiftsItemObject.class2ManningPercentage = null;
2061
+ }
2062
+
2063
+ if (_typeof(shiftsItem) === 'object' && 'totalManningTarget' in shiftsItem) {
2064
+ shiftsItemObject.totalManningTarget = function () {
2065
+ if (shiftsItem.totalManningTarget === null) {
2066
+ return null;
2067
+ }
2068
+
2069
+ if (typeof shiftsItem.totalManningTarget !== 'number') {
2070
+ return Number.isInteger(Number(shiftsItem.totalManningTarget)) ? Number(shiftsItem.totalManningTarget) : Math.floor(Number(shiftsItem.totalManningTarget));
2071
+ }
2072
+
2073
+ return Number.isInteger(shiftsItem.totalManningTarget) ? shiftsItem.totalManningTarget : Math.floor(shiftsItem.totalManningTarget);
2074
+ }();
2075
+ } else {
2076
+ shiftsItemObject.totalManningTarget = null;
2077
+ }
2078
+
2079
+ if (_typeof(shiftsItem) === 'object' && 'averageTotalManning' in shiftsItem) {
2080
+ shiftsItemObject.averageTotalManning = function () {
2081
+ if (shiftsItem.averageTotalManning === null) {
2082
+ return null;
2083
+ }
2084
+
2085
+ if (typeof shiftsItem.averageTotalManning !== 'number') {
2086
+ return Number.isInteger(Number(shiftsItem.averageTotalManning)) ? Number(shiftsItem.averageTotalManning) : Math.floor(Number(shiftsItem.averageTotalManning));
2087
+ }
2088
+
2089
+ return Number.isInteger(shiftsItem.averageTotalManning) ? shiftsItem.averageTotalManning : Math.floor(shiftsItem.averageTotalManning);
2090
+ }();
2091
+ } else {
2092
+ shiftsItemObject.averageTotalManning = null;
2093
+ }
2094
+
2095
+ if (_typeof(shiftsItem) === 'object' && 'totalManningPercentage' in shiftsItem) {
2096
+ shiftsItemObject.totalManningPercentage = function () {
2097
+ if (shiftsItem.totalManningPercentage === null) {
2098
+ return null;
2099
+ }
2100
+
2101
+ if (typeof shiftsItem.totalManningPercentage !== 'number') {
2102
+ return Number(shiftsItem.totalManningPercentage);
2103
+ }
2104
+
2105
+ return shiftsItem.totalManningPercentage;
2106
+ }();
2107
+ } else {
2108
+ shiftsItemObject.totalManningPercentage = null;
2109
+ }
2110
+
2111
+ if (_typeof(shiftsItem) === 'object' && 'costPerManningUnitHour' in shiftsItem) {
2112
+ shiftsItemObject.costPerManningUnitHour = function () {
2113
+ if (shiftsItem.costPerManningUnitHour === null) {
2114
+ return null;
2115
+ }
2116
+
2117
+ if (typeof shiftsItem.costPerManningUnitHour !== 'number') {
2118
+ return Number(shiftsItem.costPerManningUnitHour);
2119
+ }
2120
+
2121
+ return shiftsItem.costPerManningUnitHour;
2122
+ }();
2123
+ } else {
2124
+ shiftsItemObject.costPerManningUnitHour = null;
2125
+ }
2126
+
2127
+ if (_typeof(shiftsItem) === 'object' && 'totalHoursWorked' in shiftsItem) {
2128
+ shiftsItemObject.totalHoursWorked = function () {
2129
+ if (typeof shiftsItem.totalHoursWorked !== 'number') {
2130
+ return Number(shiftsItem.totalHoursWorked);
2131
+ }
2132
+
2133
+ return shiftsItem.totalHoursWorked;
2134
+ }();
2135
+ } else {
2136
+ shiftsItemObject.totalHoursWorked = 0;
2137
+ }
2138
+
2139
+ if (_typeof(shiftsItem) === 'object' && 'totalHoursWorkedExcludingDowntime' in shiftsItem) {
2140
+ shiftsItemObject.totalHoursWorkedExcludingDowntime = function () {
2141
+ if (typeof shiftsItem.totalHoursWorkedExcludingDowntime !== 'number') {
2142
+ return Number(shiftsItem.totalHoursWorkedExcludingDowntime);
2143
+ }
2144
+
2145
+ return shiftsItem.totalHoursWorkedExcludingDowntime;
2146
+ }();
2147
+ } else {
2148
+ shiftsItemObject.totalHoursWorkedExcludingDowntime = 0;
2149
+ }
2150
+
2151
+ if (_typeof(shiftsItem) === 'object' && 'totalHoursPaid' in shiftsItem) {
2152
+ shiftsItemObject.totalHoursPaid = function () {
2153
+ if (typeof shiftsItem.totalHoursPaid !== 'number') {
2154
+ return Number(shiftsItem.totalHoursPaid);
2155
+ }
2156
+
2157
+ return shiftsItem.totalHoursPaid;
2158
+ }();
2159
+ } else {
2160
+ shiftsItemObject.totalHoursPaid = 0;
2161
+ }
2162
+
2163
+ if (_typeof(shiftsItem) === 'object' && 'class1TotalManningCost' in shiftsItem) {
2164
+ shiftsItemObject.class1TotalManningCost = function () {
2165
+ if (shiftsItem.class1TotalManningCost === null) {
2166
+ return null;
2167
+ }
2168
+
2169
+ if (typeof shiftsItem.class1TotalManningCost !== 'number') {
2170
+ return Number(shiftsItem.class1TotalManningCost);
2171
+ }
2172
+
2173
+ return shiftsItem.class1TotalManningCost;
2174
+ }();
2175
+ } else {
2176
+ shiftsItemObject.class1TotalManningCost = null;
2177
+ }
2178
+
2179
+ if (_typeof(shiftsItem) === 'object' && 'class2TotalManningCost' in shiftsItem) {
2180
+ shiftsItemObject.class2TotalManningCost = function () {
2181
+ if (shiftsItem.class2TotalManningCost === null) {
2182
+ return null;
2183
+ }
2184
+
2185
+ if (typeof shiftsItem.class2TotalManningCost !== 'number') {
2186
+ return Number(shiftsItem.class2TotalManningCost);
2187
+ }
2188
+
2189
+ return shiftsItem.class2TotalManningCost;
2190
+ }();
2191
+ } else {
2192
+ shiftsItemObject.class2TotalManningCost = null;
2193
+ }
2194
+
2195
+ if (_typeof(shiftsItem) === 'object' && 'class1DowntimeManningCost' in shiftsItem) {
2196
+ shiftsItemObject.class1DowntimeManningCost = function () {
2197
+ if (shiftsItem.class1DowntimeManningCost === null) {
2198
+ return null;
2199
+ }
2200
+
2201
+ if (typeof shiftsItem.class1DowntimeManningCost !== 'number') {
2202
+ return Number(shiftsItem.class1DowntimeManningCost);
2203
+ }
2204
+
2205
+ return shiftsItem.class1DowntimeManningCost;
2206
+ }();
2207
+ } else {
2208
+ shiftsItemObject.class1DowntimeManningCost = null;
2209
+ }
2210
+
2211
+ if (_typeof(shiftsItem) === 'object' && 'class2DowntimeManningCost' in shiftsItem) {
2212
+ shiftsItemObject.class2DowntimeManningCost = function () {
2213
+ if (shiftsItem.class2DowntimeManningCost === null) {
2214
+ return null;
2215
+ }
2216
+
2217
+ if (typeof shiftsItem.class2DowntimeManningCost !== 'number') {
2218
+ return Number(shiftsItem.class2DowntimeManningCost);
2219
+ }
2220
+
2221
+ return shiftsItem.class2DowntimeManningCost;
2222
+ }();
2223
+ } else {
2224
+ shiftsItemObject.class2DowntimeManningCost = null;
2225
+ }
2226
+
2227
+ if (_typeof(shiftsItem) === 'object' && 'class1CostPerTrayTarget' in shiftsItem) {
2228
+ shiftsItemObject.class1CostPerTrayTarget = function () {
2229
+ if (shiftsItem.class1CostPerTrayTarget === null) {
2230
+ return null;
2231
+ }
2232
+
2233
+ if (typeof shiftsItem.class1CostPerTrayTarget !== 'number') {
2234
+ return Number(shiftsItem.class1CostPerTrayTarget);
2235
+ }
2236
+
2237
+ return shiftsItem.class1CostPerTrayTarget;
2238
+ }();
2239
+ } else {
2240
+ shiftsItemObject.class1CostPerTrayTarget = null;
2241
+ }
2242
+
2243
+ if (_typeof(shiftsItem) === 'object' && 'class1CostPerTrayActual' in shiftsItem) {
2244
+ shiftsItemObject.class1CostPerTrayActual = function () {
2245
+ if (shiftsItem.class1CostPerTrayActual === null) {
2246
+ return null;
2247
+ }
2248
+
2249
+ if (typeof shiftsItem.class1CostPerTrayActual !== 'number') {
2250
+ return Number(shiftsItem.class1CostPerTrayActual);
2251
+ }
2252
+
2253
+ return shiftsItem.class1CostPerTrayActual;
2254
+ }();
2255
+ } else {
2256
+ shiftsItemObject.class1CostPerTrayActual = null;
2257
+ }
2258
+
2259
+ if (_typeof(shiftsItem) === 'object' && 'class2CostPerTrayActual' in shiftsItem) {
2260
+ shiftsItemObject.class2CostPerTrayActual = function () {
2261
+ if (shiftsItem.class2CostPerTrayActual === null) {
2262
+ return null;
2263
+ }
2264
+
2265
+ if (typeof shiftsItem.class2CostPerTrayActual !== 'number') {
2266
+ return Number(shiftsItem.class2CostPerTrayActual);
2267
+ }
2268
+
2269
+ return shiftsItem.class2CostPerTrayActual;
2270
+ }();
2271
+ } else {
2272
+ shiftsItemObject.class2CostPerTrayActual = null;
2273
+ }
2274
+
2275
+ if (_typeof(shiftsItem) === 'object' && 'totalClass1Trays' in shiftsItem) {
2276
+ shiftsItemObject.totalClass1Trays = function () {
2277
+ if (typeof shiftsItem.totalClass1Trays !== 'number') {
2278
+ return Number.isInteger(Number(shiftsItem.totalClass1Trays)) ? Number(shiftsItem.totalClass1Trays) : Math.floor(Number(shiftsItem.totalClass1Trays));
2279
+ }
2280
+
2281
+ return Number.isInteger(shiftsItem.totalClass1Trays) ? shiftsItem.totalClass1Trays : Math.floor(shiftsItem.totalClass1Trays);
2282
+ }();
2283
+ } else {
2284
+ shiftsItemObject.totalClass1Trays = 0;
2285
+ }
2286
+
2287
+ if (_typeof(shiftsItem) === 'object' && 'totalClass2Trays' in shiftsItem) {
2288
+ shiftsItemObject.totalClass2Trays = function () {
2289
+ if (typeof shiftsItem.totalClass2Trays !== 'number') {
2290
+ return Number.isInteger(Number(shiftsItem.totalClass2Trays)) ? Number(shiftsItem.totalClass2Trays) : Math.floor(Number(shiftsItem.totalClass2Trays));
2291
+ }
2292
+
2293
+ return Number.isInteger(shiftsItem.totalClass2Trays) ? shiftsItem.totalClass2Trays : Math.floor(shiftsItem.totalClass2Trays);
2294
+ }();
2295
+ } else {
2296
+ shiftsItemObject.totalClass2Trays = 0;
2297
+ }
2298
+
2299
+ if (_typeof(shiftsItem) === 'object' && 'class1TraysPerHour' in shiftsItem) {
2300
+ shiftsItemObject.class1TraysPerHour = function () {
2301
+ if (typeof shiftsItem.class1TraysPerHour !== 'number') {
2302
+ return Number.isInteger(Number(shiftsItem.class1TraysPerHour)) ? Number(shiftsItem.class1TraysPerHour) : Math.floor(Number(shiftsItem.class1TraysPerHour));
2303
+ }
2304
+
2305
+ return Number.isInteger(shiftsItem.class1TraysPerHour) ? shiftsItem.class1TraysPerHour : Math.floor(shiftsItem.class1TraysPerHour);
2306
+ }();
2307
+ } else {
2308
+ shiftsItemObject.class1TraysPerHour = 0;
2309
+ }
2310
+
2311
+ if (_typeof(shiftsItem) === 'object' && 'class1TraysPerHourExcludingDowntime' in shiftsItem) {
2312
+ shiftsItemObject.class1TraysPerHourExcludingDowntime = function () {
2313
+ if (typeof shiftsItem.class1TraysPerHourExcludingDowntime !== 'number') {
2314
+ return Number.isInteger(Number(shiftsItem.class1TraysPerHourExcludingDowntime)) ? Number(shiftsItem.class1TraysPerHourExcludingDowntime) : Math.floor(Number(shiftsItem.class1TraysPerHourExcludingDowntime));
2315
+ }
2316
+
2317
+ return Number.isInteger(shiftsItem.class1TraysPerHourExcludingDowntime) ? shiftsItem.class1TraysPerHourExcludingDowntime : Math.floor(shiftsItem.class1TraysPerHourExcludingDowntime);
2318
+ }();
2319
+ } else {
2320
+ shiftsItemObject.class1TraysPerHourExcludingDowntime = 0;
2321
+ }
2322
+
2323
+ if (_typeof(shiftsItem) === 'object' && 'class1TraysPerHourExcludingDowntimeTarget' in shiftsItem) {
2324
+ shiftsItemObject.class1TraysPerHourExcludingDowntimeTarget = function () {
2325
+ if (typeof shiftsItem.class1TraysPerHourExcludingDowntimeTarget !== 'number') {
2326
+ return Number.isInteger(Number(shiftsItem.class1TraysPerHourExcludingDowntimeTarget)) ? Number(shiftsItem.class1TraysPerHourExcludingDowntimeTarget) : Math.floor(Number(shiftsItem.class1TraysPerHourExcludingDowntimeTarget));
2327
+ }
2328
+
2329
+ return Number.isInteger(shiftsItem.class1TraysPerHourExcludingDowntimeTarget) ? shiftsItem.class1TraysPerHourExcludingDowntimeTarget : Math.floor(shiftsItem.class1TraysPerHourExcludingDowntimeTarget);
2330
+ }();
2331
+ } else {
2332
+ shiftsItemObject.class1TraysPerHourExcludingDowntimeTarget = 0;
2333
+ }
2334
+
2335
+ if (_typeof(shiftsItem) === 'object' && 'class1TraysPerManHour' in shiftsItem) {
2336
+ shiftsItemObject.class1TraysPerManHour = function () {
2337
+ if (shiftsItem.class1TraysPerManHour === null) {
2338
+ return null;
2339
+ }
2340
+
2341
+ if (typeof shiftsItem.class1TraysPerManHour !== 'number') {
2342
+ return Number(shiftsItem.class1TraysPerManHour);
2343
+ }
2344
+
2345
+ return shiftsItem.class1TraysPerManHour;
2346
+ }();
2347
+ } else {
2348
+ shiftsItemObject.class1TraysPerManHour = null;
2349
+ }
2350
+
2351
+ if (_typeof(shiftsItem) === 'object' && 'class1TraysPerManHourExcludingDowntime' in shiftsItem) {
2352
+ shiftsItemObject.class1TraysPerManHourExcludingDowntime = function () {
2353
+ if (shiftsItem.class1TraysPerManHourExcludingDowntime === null) {
2354
+ return null;
2355
+ }
2356
+
2357
+ if (typeof shiftsItem.class1TraysPerManHourExcludingDowntime !== 'number') {
2358
+ return Number(shiftsItem.class1TraysPerManHourExcludingDowntime);
2359
+ }
2360
+
2361
+ return shiftsItem.class1TraysPerManHourExcludingDowntime;
2362
+ }();
2363
+ } else {
2364
+ shiftsItemObject.class1TraysPerManHourExcludingDowntime = null;
2365
+ }
2366
+
2367
+ if (_typeof(shiftsItem) === 'object' && 'class2TraysPerHour' in shiftsItem) {
2368
+ shiftsItemObject.class2TraysPerHour = function () {
2369
+ if (typeof shiftsItem.class2TraysPerHour !== 'number') {
2370
+ return Number.isInteger(Number(shiftsItem.class2TraysPerHour)) ? Number(shiftsItem.class2TraysPerHour) : Math.floor(Number(shiftsItem.class2TraysPerHour));
2371
+ }
2372
+
2373
+ return Number.isInteger(shiftsItem.class2TraysPerHour) ? shiftsItem.class2TraysPerHour : Math.floor(shiftsItem.class2TraysPerHour);
2374
+ }();
2375
+ } else {
2376
+ shiftsItemObject.class2TraysPerHour = 0;
2377
+ }
2378
+
2379
+ if (_typeof(shiftsItem) === 'object' && 'class2TraysPerHourExcludingDowntime' in shiftsItem) {
2380
+ shiftsItemObject.class2TraysPerHourExcludingDowntime = function () {
2381
+ if (typeof shiftsItem.class2TraysPerHourExcludingDowntime !== 'number') {
2382
+ return Number.isInteger(Number(shiftsItem.class2TraysPerHourExcludingDowntime)) ? Number(shiftsItem.class2TraysPerHourExcludingDowntime) : Math.floor(Number(shiftsItem.class2TraysPerHourExcludingDowntime));
2383
+ }
2384
+
2385
+ return Number.isInteger(shiftsItem.class2TraysPerHourExcludingDowntime) ? shiftsItem.class2TraysPerHourExcludingDowntime : Math.floor(shiftsItem.class2TraysPerHourExcludingDowntime);
2386
+ }();
2387
+ } else {
2388
+ shiftsItemObject.class2TraysPerHourExcludingDowntime = 0;
2389
+ }
2390
+
2391
+ if (_typeof(shiftsItem) === 'object' && 'class2TraysPerManHour' in shiftsItem) {
2392
+ shiftsItemObject.class2TraysPerManHour = function () {
2393
+ if (shiftsItem.class2TraysPerManHour === null) {
2394
+ return null;
2395
+ }
2396
+
2397
+ if (typeof shiftsItem.class2TraysPerManHour !== 'number') {
2398
+ return Number(shiftsItem.class2TraysPerManHour);
2399
+ }
2400
+
2401
+ return shiftsItem.class2TraysPerManHour;
2402
+ }();
2403
+ } else {
2404
+ shiftsItemObject.class2TraysPerManHour = null;
2405
+ }
2406
+
2407
+ if (_typeof(shiftsItem) === 'object' && 'class2TraysPerManHourExcludingDowntime' in shiftsItem) {
2408
+ shiftsItemObject.class2TraysPerManHourExcludingDowntime = function () {
2409
+ if (shiftsItem.class2TraysPerManHourExcludingDowntime === null) {
2410
+ return null;
2411
+ }
2412
+
2413
+ if (typeof shiftsItem.class2TraysPerManHourExcludingDowntime !== 'number') {
2414
+ return Number(shiftsItem.class2TraysPerManHourExcludingDowntime);
2415
+ }
2416
+
2417
+ return shiftsItem.class2TraysPerManHourExcludingDowntime;
2418
+ }();
2419
+ } else {
2420
+ shiftsItemObject.class2TraysPerManHourExcludingDowntime = null;
2421
+ }
2422
+
2423
+ if (_typeof(shiftsItem) === 'object' && 'class1LayeredPercentageTarget' in shiftsItem) {
2424
+ shiftsItemObject.class1LayeredPercentageTarget = function () {
2425
+ if (shiftsItem.class1LayeredPercentageTarget === null) {
2426
+ return null;
2427
+ }
2428
+
2429
+ if (typeof shiftsItem.class1LayeredPercentageTarget !== 'number') {
2430
+ return Number(shiftsItem.class1LayeredPercentageTarget);
2431
+ }
2432
+
2433
+ return shiftsItem.class1LayeredPercentageTarget;
2434
+ }();
2435
+ } else {
2436
+ shiftsItemObject.class1LayeredPercentageTarget = null;
2437
+ }
2438
+
2439
+ if (_typeof(shiftsItem) === 'object' && 'class1LayeredPercentage' in shiftsItem) {
2440
+ shiftsItemObject.class1LayeredPercentage = function () {
2441
+ if (shiftsItem.class1LayeredPercentage === null) {
2442
+ return null;
2443
+ }
2444
+
2445
+ if (typeof shiftsItem.class1LayeredPercentage !== 'number') {
2446
+ return Number(shiftsItem.class1LayeredPercentage);
2447
+ }
2448
+
2449
+ return shiftsItem.class1LayeredPercentage;
2450
+ }();
2451
+ } else {
2452
+ shiftsItemObject.class1LayeredPercentage = null;
2453
+ }
2454
+
2455
+ if (_typeof(shiftsItem) === 'object' && 'class1BulkPercentage' in shiftsItem) {
2456
+ shiftsItemObject.class1BulkPercentage = function () {
2457
+ if (shiftsItem.class1BulkPercentage === null) {
2458
+ return null;
2459
+ }
2460
+
2461
+ if (typeof shiftsItem.class1BulkPercentage !== 'number') {
2462
+ return Number(shiftsItem.class1BulkPercentage);
2463
+ }
2464
+
2465
+ return shiftsItem.class1BulkPercentage;
2466
+ }();
2467
+ } else {
2468
+ shiftsItemObject.class1BulkPercentage = null;
2469
+ }
2470
+
2471
+ if (_typeof(shiftsItem) === 'object' && 'averageClass1Percentage' in shiftsItem) {
2472
+ shiftsItemObject.averageClass1Percentage = function () {
2473
+ if (shiftsItem.averageClass1Percentage === null) {
2474
+ return null;
2475
+ }
2476
+
2477
+ if (typeof shiftsItem.averageClass1Percentage !== 'number') {
2478
+ return Number(shiftsItem.averageClass1Percentage);
2479
+ }
2480
+
2481
+ return shiftsItem.averageClass1Percentage;
2482
+ }();
2483
+ } else {
2484
+ shiftsItemObject.averageClass1Percentage = null;
2485
+ }
2486
+
2487
+ if (_typeof(shiftsItem) === 'object' && 'qualityR600IdealSamplesTarget' in shiftsItem) {
2488
+ shiftsItemObject.qualityR600IdealSamplesTarget = function () {
2489
+ if (shiftsItem.qualityR600IdealSamplesTarget === null) {
2490
+ return null;
2491
+ }
2492
+
2493
+ if (typeof shiftsItem.qualityR600IdealSamplesTarget !== 'number') {
2494
+ return Number(shiftsItem.qualityR600IdealSamplesTarget);
2495
+ }
2496
+
2497
+ return shiftsItem.qualityR600IdealSamplesTarget;
2498
+ }();
2499
+ } else {
2500
+ shiftsItemObject.qualityR600IdealSamplesTarget = null;
2501
+ }
2502
+
2503
+ if (_typeof(shiftsItem) === 'object' && 'qualityR600IdealSamplesActual' in shiftsItem) {
2504
+ shiftsItemObject.qualityR600IdealSamplesActual = function () {
2505
+ if (shiftsItem.qualityR600IdealSamplesActual === null) {
2506
+ return null;
2507
+ }
2508
+
2509
+ if (typeof shiftsItem.qualityR600IdealSamplesActual !== 'number') {
2510
+ return Number(shiftsItem.qualityR600IdealSamplesActual);
2511
+ }
2512
+
2513
+ return shiftsItem.qualityR600IdealSamplesActual;
2514
+ }();
2515
+ } else {
2516
+ shiftsItemObject.qualityR600IdealSamplesActual = null;
2517
+ }
2518
+
2519
+ if (_typeof(shiftsItem) === 'object' && 'satisfactionRating' in shiftsItem) {
2520
+ shiftsItemObject.satisfactionRating = function () {
2521
+ if (shiftsItem.satisfactionRating === null) {
2522
+ return null;
2523
+ }
2524
+
2525
+ if (typeof shiftsItem.satisfactionRating !== 'number') {
2526
+ return Number.isInteger(Number(shiftsItem.satisfactionRating)) ? Number(shiftsItem.satisfactionRating) : Math.floor(Number(shiftsItem.satisfactionRating));
2527
+ }
2528
+
2529
+ return Number.isInteger(shiftsItem.satisfactionRating) ? shiftsItem.satisfactionRating : Math.floor(shiftsItem.satisfactionRating);
2530
+ }();
2531
+ } else {
2532
+ shiftsItemObject.satisfactionRating = null;
2533
+ }
2534
+
2535
+ if (_typeof(shiftsItem) === 'object' && 'keyCelebration' in shiftsItem) {
2536
+ shiftsItemObject.keyCelebration = function () {
2537
+ if (shiftsItem.keyCelebration === null) {
2538
+ return null;
2539
+ }
2540
+
2541
+ if (typeof shiftsItem.keyCelebration !== 'number') {
2542
+ return Number.isInteger(Number(shiftsItem.keyCelebration)) ? Number(shiftsItem.keyCelebration) : Math.floor(Number(shiftsItem.keyCelebration));
2543
+ }
2544
+
2545
+ return Number.isInteger(shiftsItem.keyCelebration) ? shiftsItem.keyCelebration : Math.floor(shiftsItem.keyCelebration);
2546
+ }();
2547
+ } else {
2548
+ shiftsItemObject.keyCelebration = null;
2549
+ }
2550
+
2551
+ if (_typeof(shiftsItem) === 'object' && 'keyChallenge' in shiftsItem) {
2552
+ shiftsItemObject.keyChallenge = function () {
2553
+ if (shiftsItem.keyChallenge === null) {
2554
+ return null;
2555
+ }
2556
+
2557
+ if (typeof shiftsItem.keyChallenge !== 'number') {
2558
+ return Number.isInteger(Number(shiftsItem.keyChallenge)) ? Number(shiftsItem.keyChallenge) : Math.floor(Number(shiftsItem.keyChallenge));
2559
+ }
2560
+
2561
+ return Number.isInteger(shiftsItem.keyChallenge) ? shiftsItem.keyChallenge : Math.floor(shiftsItem.keyChallenge);
2562
+ }();
2563
+ } else {
2564
+ shiftsItemObject.keyChallenge = null;
2565
+ }
2566
+
2567
+ return shiftsItemObject;
2568
+ }();
2569
+ });
2570
+ }();
2571
+ } else {
2572
+ resultObject.shifts = [];
2573
+ }
2574
+
2575
+ if (_typeof(result) === 'object' && 'shiftHourlyEntries' in result) {
2576
+ resultObject.shiftHourlyEntries = function () {
2577
+ if (Array.isArray(result.shiftHourlyEntries) !== true) {
2578
+ return [];
2579
+ }
2580
+
2581
+ return result.shiftHourlyEntries.map(function (shiftHourlyEntriesItem) {
2582
+ return function () {
2583
+ var shiftHourlyEntriesItemObject = {};
2584
+
2585
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'siteId' in shiftHourlyEntriesItem) {
2586
+ shiftHourlyEntriesItemObject.siteId = function () {
2587
+ if (typeof shiftHourlyEntriesItem.siteId !== 'number') {
2588
+ return Number.isInteger(Number(shiftHourlyEntriesItem.siteId)) ? Number(shiftHourlyEntriesItem.siteId) : Math.floor(Number(shiftHourlyEntriesItem.siteId));
2589
+ }
2590
+
2591
+ return Number.isInteger(shiftHourlyEntriesItem.siteId) ? shiftHourlyEntriesItem.siteId : Math.floor(shiftHourlyEntriesItem.siteId);
2592
+ }();
2593
+ } else {
2594
+ shiftHourlyEntriesItemObject.siteId = 0;
2595
+ }
2596
+
2597
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'siteName' in shiftHourlyEntriesItem) {
2598
+ shiftHourlyEntriesItemObject.siteName = function () {
2599
+ if (typeof shiftHourlyEntriesItem.siteName !== 'string') {
2600
+ return String(shiftHourlyEntriesItem.siteName);
2601
+ }
2602
+
2603
+ return shiftHourlyEntriesItem.siteName;
2604
+ }();
2605
+ } else {
2606
+ shiftHourlyEntriesItemObject.siteName = "";
2607
+ }
2608
+
2609
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'packingLineId' in shiftHourlyEntriesItem) {
2610
+ shiftHourlyEntriesItemObject.packingLineId = function () {
2611
+ if (typeof shiftHourlyEntriesItem.packingLineId !== 'string') {
2612
+ return String(shiftHourlyEntriesItem.packingLineId);
2613
+ }
2614
+
2615
+ return shiftHourlyEntriesItem.packingLineId;
2616
+ }();
2617
+ } else {
2618
+ shiftHourlyEntriesItemObject.packingLineId = "";
2619
+ }
2620
+
2621
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'packingLineName' in shiftHourlyEntriesItem) {
2622
+ shiftHourlyEntriesItemObject.packingLineName = function () {
2623
+ if (typeof shiftHourlyEntriesItem.packingLineName !== 'string') {
2624
+ return String(shiftHourlyEntriesItem.packingLineName);
2625
+ }
2626
+
2627
+ return shiftHourlyEntriesItem.packingLineName;
2628
+ }();
2629
+ } else {
2630
+ shiftHourlyEntriesItemObject.packingLineName = "";
2631
+ }
2632
+
2633
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'shiftId' in shiftHourlyEntriesItem) {
2634
+ shiftHourlyEntriesItemObject.shiftId = function () {
2635
+ if (typeof shiftHourlyEntriesItem.shiftId !== 'string') {
2636
+ return String(shiftHourlyEntriesItem.shiftId);
2637
+ }
2638
+
2639
+ return shiftHourlyEntriesItem.shiftId;
2640
+ }();
2641
+ } else {
2642
+ shiftHourlyEntriesItemObject.shiftId = "";
2643
+ }
2644
+
2645
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'shiftType' in shiftHourlyEntriesItem) {
2646
+ shiftHourlyEntriesItemObject.shiftType = function () {
2647
+ if (typeof shiftHourlyEntriesItem.shiftType !== 'string') {
2648
+ return String(shiftHourlyEntriesItem.shiftType);
2649
+ }
2650
+
2651
+ return shiftHourlyEntriesItem.shiftType;
2652
+ }();
2653
+ } else {
2654
+ shiftHourlyEntriesItemObject.shiftType = "";
2655
+ }
2656
+
2657
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'isoWeek' in shiftHourlyEntriesItem) {
2658
+ shiftHourlyEntriesItemObject.isoWeek = function () {
2659
+ if (typeof shiftHourlyEntriesItem.isoWeek !== 'number') {
2660
+ return Number.isInteger(Number(shiftHourlyEntriesItem.isoWeek)) ? Number(shiftHourlyEntriesItem.isoWeek) : Math.floor(Number(shiftHourlyEntriesItem.isoWeek));
2661
+ }
2662
+
2663
+ return Number.isInteger(shiftHourlyEntriesItem.isoWeek) ? shiftHourlyEntriesItem.isoWeek : Math.floor(shiftHourlyEntriesItem.isoWeek);
2664
+ }();
2665
+ } else {
2666
+ shiftHourlyEntriesItemObject.isoWeek = 0;
2667
+ }
2668
+
2669
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'startTimestamp' in shiftHourlyEntriesItem) {
2670
+ shiftHourlyEntriesItemObject.startTimestamp = function () {
2671
+ if (typeof shiftHourlyEntriesItem.startTimestamp !== 'string') {
2672
+ return new Date(String(shiftHourlyEntriesItem.startTimestamp));
2673
+ }
2674
+
2675
+ return new Date(shiftHourlyEntriesItem.startTimestamp);
2676
+ }();
2677
+ } else {
2678
+ shiftHourlyEntriesItemObject.startTimestamp = new Date();
2679
+ }
2680
+
2681
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'endTimestamp' in shiftHourlyEntriesItem) {
2682
+ shiftHourlyEntriesItemObject.endTimestamp = function () {
2683
+ if (shiftHourlyEntriesItem.endTimestamp === null) {
2684
+ return null;
2685
+ }
2686
+
2687
+ if (typeof shiftHourlyEntriesItem.endTimestamp !== 'string') {
2688
+ return new Date(String(shiftHourlyEntriesItem.endTimestamp));
2689
+ }
2690
+
2691
+ return new Date(shiftHourlyEntriesItem.endTimestamp);
2692
+ }();
2693
+ } else {
2694
+ shiftHourlyEntriesItemObject.endTimestamp = null;
2695
+ }
2696
+
2697
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'lineManagerName' in shiftHourlyEntriesItem) {
2698
+ shiftHourlyEntriesItemObject.lineManagerName = function () {
2699
+ if (shiftHourlyEntriesItem.lineManagerName === null) {
2700
+ return null;
2701
+ }
2702
+
2703
+ if (typeof shiftHourlyEntriesItem.lineManagerName !== 'string') {
2704
+ return String(shiftHourlyEntriesItem.lineManagerName);
2705
+ }
2706
+
2707
+ return shiftHourlyEntriesItem.lineManagerName;
2708
+ }();
2709
+ } else {
2710
+ shiftHourlyEntriesItemObject.lineManagerName = null;
2711
+ }
2712
+
2713
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'qualityManagerName' in shiftHourlyEntriesItem) {
2714
+ shiftHourlyEntriesItemObject.qualityManagerName = function () {
2715
+ if (shiftHourlyEntriesItem.qualityManagerName === null) {
2716
+ return null;
2717
+ }
2718
+
2719
+ if (typeof shiftHourlyEntriesItem.qualityManagerName !== 'string') {
2720
+ return String(shiftHourlyEntriesItem.qualityManagerName);
2721
+ }
2722
+
2723
+ return shiftHourlyEntriesItem.qualityManagerName;
2724
+ }();
2725
+ } else {
2726
+ shiftHourlyEntriesItemObject.qualityManagerName = null;
2727
+ }
2728
+
2729
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'varietyIds' in shiftHourlyEntriesItem) {
2730
+ shiftHourlyEntriesItemObject.varietyIds = function () {
2731
+ if (Array.isArray(shiftHourlyEntriesItem.varietyIds) !== true) {
2732
+ return [];
2733
+ }
2734
+
2735
+ return shiftHourlyEntriesItem.varietyIds.map(function (varietyIdsItem) {
2736
+ return function () {
2737
+ if (typeof varietyIdsItem !== 'string') {
2738
+ return String(varietyIdsItem);
2739
+ }
2740
+
2741
+ return varietyIdsItem;
2742
+ }();
2743
+ });
2744
+ }();
2745
+ } else {
2746
+ shiftHourlyEntriesItemObject.varietyIds = [];
2747
+ }
2748
+
2749
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'varietyCodes' in shiftHourlyEntriesItem) {
2750
+ shiftHourlyEntriesItemObject.varietyCodes = function () {
2751
+ if (Array.isArray(shiftHourlyEntriesItem.varietyCodes) !== true) {
2752
+ return [];
2753
+ }
2754
+
2755
+ return shiftHourlyEntriesItem.varietyCodes.map(function (varietyCodesItem) {
2756
+ return function () {
2757
+ if (typeof varietyCodesItem !== 'string') {
2758
+ return String(varietyCodesItem);
2759
+ }
2760
+
2761
+ return varietyCodesItem;
2762
+ }();
2763
+ });
2764
+ }();
2765
+ } else {
2766
+ shiftHourlyEntriesItemObject.varietyCodes = [];
2767
+ }
2768
+
2769
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'growingMethodIds' in shiftHourlyEntriesItem) {
2770
+ shiftHourlyEntriesItemObject.growingMethodIds = function () {
2771
+ if (Array.isArray(shiftHourlyEntriesItem.growingMethodIds) !== true) {
2772
+ return [];
2773
+ }
2774
+
2775
+ return shiftHourlyEntriesItem.growingMethodIds.map(function (growingMethodIdsItem) {
2776
+ return function () {
2777
+ if (typeof growingMethodIdsItem !== 'string') {
2778
+ return String(growingMethodIdsItem);
2779
+ }
2780
+
2781
+ return growingMethodIdsItem;
2782
+ }();
2783
+ });
2784
+ }();
2785
+ } else {
2786
+ shiftHourlyEntriesItemObject.growingMethodIds = [];
2787
+ }
2788
+
2789
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'growingMethodCodes' in shiftHourlyEntriesItem) {
2790
+ shiftHourlyEntriesItemObject.growingMethodCodes = function () {
2791
+ if (Array.isArray(shiftHourlyEntriesItem.growingMethodCodes) !== true) {
2792
+ return [];
2793
+ }
2794
+
2795
+ return shiftHourlyEntriesItem.growingMethodCodes.map(function (growingMethodCodesItem) {
2796
+ return function () {
2797
+ if (typeof growingMethodCodesItem !== 'string') {
2798
+ return String(growingMethodCodesItem);
2799
+ }
2800
+
2801
+ return growingMethodCodesItem;
2802
+ }();
2803
+ });
2804
+ }();
2805
+ } else {
2806
+ shiftHourlyEntriesItemObject.growingMethodCodes = [];
2807
+ }
2808
+
2809
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalBinsTipped' in shiftHourlyEntriesItem) {
2810
+ shiftHourlyEntriesItemObject.totalBinsTipped = function () {
2811
+ if (typeof shiftHourlyEntriesItem.totalBinsTipped !== 'number') {
2812
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalBinsTipped)) ? Number(shiftHourlyEntriesItem.totalBinsTipped) : Math.floor(Number(shiftHourlyEntriesItem.totalBinsTipped));
2813
+ }
2814
+
2815
+ return Number.isInteger(shiftHourlyEntriesItem.totalBinsTipped) ? shiftHourlyEntriesItem.totalBinsTipped : Math.floor(shiftHourlyEntriesItem.totalBinsTipped);
2816
+ }();
2817
+ } else {
2818
+ shiftHourlyEntriesItemObject.totalBinsTipped = 0;
2819
+ }
2820
+
2821
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalProductionTime' in shiftHourlyEntriesItem) {
2822
+ shiftHourlyEntriesItemObject.totalProductionTime = function () {
2823
+ if (typeof shiftHourlyEntriesItem.totalProductionTime !== 'number') {
2824
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalProductionTime)) ? Number(shiftHourlyEntriesItem.totalProductionTime) : Math.floor(Number(shiftHourlyEntriesItem.totalProductionTime));
2825
+ }
2826
+
2827
+ return Number.isInteger(shiftHourlyEntriesItem.totalProductionTime) ? shiftHourlyEntriesItem.totalProductionTime : Math.floor(shiftHourlyEntriesItem.totalProductionTime);
2828
+ }();
2829
+ } else {
2830
+ shiftHourlyEntriesItemObject.totalProductionTime = 0;
2831
+ }
2832
+
2833
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalScheduledBreakTime' in shiftHourlyEntriesItem) {
2834
+ shiftHourlyEntriesItemObject.totalScheduledBreakTime = function () {
2835
+ if (typeof shiftHourlyEntriesItem.totalScheduledBreakTime !== 'number') {
2836
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalScheduledBreakTime)) ? Number(shiftHourlyEntriesItem.totalScheduledBreakTime) : Math.floor(Number(shiftHourlyEntriesItem.totalScheduledBreakTime));
2837
+ }
2838
+
2839
+ return Number.isInteger(shiftHourlyEntriesItem.totalScheduledBreakTime) ? shiftHourlyEntriesItem.totalScheduledBreakTime : Math.floor(shiftHourlyEntriesItem.totalScheduledBreakTime);
2840
+ }();
2841
+ } else {
2842
+ shiftHourlyEntriesItemObject.totalScheduledBreakTime = 0;
2843
+ }
2844
+
2845
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalDowntime' in shiftHourlyEntriesItem) {
2846
+ shiftHourlyEntriesItemObject.totalDowntime = function () {
2847
+ if (typeof shiftHourlyEntriesItem.totalDowntime !== 'number') {
2848
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalDowntime)) ? Number(shiftHourlyEntriesItem.totalDowntime) : Math.floor(Number(shiftHourlyEntriesItem.totalDowntime));
2849
+ }
2850
+
2851
+ return Number.isInteger(shiftHourlyEntriesItem.totalDowntime) ? shiftHourlyEntriesItem.totalDowntime : Math.floor(shiftHourlyEntriesItem.totalDowntime);
2852
+ }();
2853
+ } else {
2854
+ shiftHourlyEntriesItemObject.totalDowntime = 0;
2855
+ }
2856
+
2857
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'downtimeEventsCount' in shiftHourlyEntriesItem) {
2858
+ shiftHourlyEntriesItemObject.downtimeEventsCount = function () {
2859
+ if (typeof shiftHourlyEntriesItem.downtimeEventsCount !== 'number') {
2860
+ return Number.isInteger(Number(shiftHourlyEntriesItem.downtimeEventsCount)) ? Number(shiftHourlyEntriesItem.downtimeEventsCount) : Math.floor(Number(shiftHourlyEntriesItem.downtimeEventsCount));
2861
+ }
2862
+
2863
+ return Number.isInteger(shiftHourlyEntriesItem.downtimeEventsCount) ? shiftHourlyEntriesItem.downtimeEventsCount : Math.floor(shiftHourlyEntriesItem.downtimeEventsCount);
2864
+ }();
2865
+ } else {
2866
+ shiftHourlyEntriesItemObject.downtimeEventsCount = 0;
2867
+ }
2868
+
2869
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'downtimeEventsAverageDuration' in shiftHourlyEntriesItem) {
2870
+ shiftHourlyEntriesItemObject.downtimeEventsAverageDuration = function () {
2871
+ if (typeof shiftHourlyEntriesItem.downtimeEventsAverageDuration !== 'number') {
2872
+ return Number.isInteger(Number(shiftHourlyEntriesItem.downtimeEventsAverageDuration)) ? Number(shiftHourlyEntriesItem.downtimeEventsAverageDuration) : Math.floor(Number(shiftHourlyEntriesItem.downtimeEventsAverageDuration));
2873
+ }
2874
+
2875
+ return Number.isInteger(shiftHourlyEntriesItem.downtimeEventsAverageDuration) ? shiftHourlyEntriesItem.downtimeEventsAverageDuration : Math.floor(shiftHourlyEntriesItem.downtimeEventsAverageDuration);
2876
+ }();
2877
+ } else {
2878
+ shiftHourlyEntriesItemObject.downtimeEventsAverageDuration = 0;
2879
+ }
2880
+
2881
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1ManningTarget' in shiftHourlyEntriesItem) {
2882
+ shiftHourlyEntriesItemObject.class1ManningTarget = function () {
2883
+ if (shiftHourlyEntriesItem.class1ManningTarget === null) {
2884
+ return null;
2885
+ }
2886
+
2887
+ if (typeof shiftHourlyEntriesItem.class1ManningTarget !== 'number') {
2888
+ return Number.isInteger(Number(shiftHourlyEntriesItem.class1ManningTarget)) ? Number(shiftHourlyEntriesItem.class1ManningTarget) : Math.floor(Number(shiftHourlyEntriesItem.class1ManningTarget));
2889
+ }
2890
+
2891
+ return Number.isInteger(shiftHourlyEntriesItem.class1ManningTarget) ? shiftHourlyEntriesItem.class1ManningTarget : Math.floor(shiftHourlyEntriesItem.class1ManningTarget);
2892
+ }();
2893
+ } else {
2894
+ shiftHourlyEntriesItemObject.class1ManningTarget = null;
2895
+ }
2896
+
2897
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1Manning' in shiftHourlyEntriesItem) {
2898
+ shiftHourlyEntriesItemObject.class1Manning = function () {
2899
+ if (shiftHourlyEntriesItem.class1Manning === null) {
2900
+ return null;
2901
+ }
2902
+
2903
+ if (typeof shiftHourlyEntriesItem.class1Manning !== 'number') {
2904
+ return Number.isInteger(Number(shiftHourlyEntriesItem.class1Manning)) ? Number(shiftHourlyEntriesItem.class1Manning) : Math.floor(Number(shiftHourlyEntriesItem.class1Manning));
2905
+ }
2906
+
2907
+ return Number.isInteger(shiftHourlyEntriesItem.class1Manning) ? shiftHourlyEntriesItem.class1Manning : Math.floor(shiftHourlyEntriesItem.class1Manning);
2908
+ }();
2909
+ } else {
2910
+ shiftHourlyEntriesItemObject.class1Manning = null;
2911
+ }
2912
+
2913
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1ManningPercentage' in shiftHourlyEntriesItem) {
2914
+ shiftHourlyEntriesItemObject.class1ManningPercentage = function () {
2915
+ if (shiftHourlyEntriesItem.class1ManningPercentage === null) {
2916
+ return null;
2917
+ }
2918
+
2919
+ if (typeof shiftHourlyEntriesItem.class1ManningPercentage !== 'number') {
2920
+ return Number(shiftHourlyEntriesItem.class1ManningPercentage);
2921
+ }
2922
+
2923
+ return shiftHourlyEntriesItem.class1ManningPercentage;
2924
+ }();
2925
+ } else {
2926
+ shiftHourlyEntriesItemObject.class1ManningPercentage = null;
2927
+ }
2928
+
2929
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2ManningTarget' in shiftHourlyEntriesItem) {
2930
+ shiftHourlyEntriesItemObject.class2ManningTarget = function () {
2931
+ if (shiftHourlyEntriesItem.class2ManningTarget === null) {
2932
+ return null;
2933
+ }
2934
+
2935
+ if (typeof shiftHourlyEntriesItem.class2ManningTarget !== 'number') {
2936
+ return Number.isInteger(Number(shiftHourlyEntriesItem.class2ManningTarget)) ? Number(shiftHourlyEntriesItem.class2ManningTarget) : Math.floor(Number(shiftHourlyEntriesItem.class2ManningTarget));
2937
+ }
2938
+
2939
+ return Number.isInteger(shiftHourlyEntriesItem.class2ManningTarget) ? shiftHourlyEntriesItem.class2ManningTarget : Math.floor(shiftHourlyEntriesItem.class2ManningTarget);
2940
+ }();
2941
+ } else {
2942
+ shiftHourlyEntriesItemObject.class2ManningTarget = null;
2943
+ }
2944
+
2945
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2Manning' in shiftHourlyEntriesItem) {
2946
+ shiftHourlyEntriesItemObject.class2Manning = function () {
2947
+ if (shiftHourlyEntriesItem.class2Manning === null) {
2948
+ return null;
2949
+ }
2950
+
2951
+ if (typeof shiftHourlyEntriesItem.class2Manning !== 'number') {
2952
+ return Number.isInteger(Number(shiftHourlyEntriesItem.class2Manning)) ? Number(shiftHourlyEntriesItem.class2Manning) : Math.floor(Number(shiftHourlyEntriesItem.class2Manning));
2953
+ }
2954
+
2955
+ return Number.isInteger(shiftHourlyEntriesItem.class2Manning) ? shiftHourlyEntriesItem.class2Manning : Math.floor(shiftHourlyEntriesItem.class2Manning);
2956
+ }();
2957
+ } else {
2958
+ shiftHourlyEntriesItemObject.class2Manning = null;
2959
+ }
2960
+
2961
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2ManningPercentage' in shiftHourlyEntriesItem) {
2962
+ shiftHourlyEntriesItemObject.class2ManningPercentage = function () {
2963
+ if (shiftHourlyEntriesItem.class2ManningPercentage === null) {
2964
+ return null;
2965
+ }
2966
+
2967
+ if (typeof shiftHourlyEntriesItem.class2ManningPercentage !== 'number') {
2968
+ return Number(shiftHourlyEntriesItem.class2ManningPercentage);
2969
+ }
2970
+
2971
+ return shiftHourlyEntriesItem.class2ManningPercentage;
2972
+ }();
2973
+ } else {
2974
+ shiftHourlyEntriesItemObject.class2ManningPercentage = null;
2975
+ }
2976
+
2977
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalManningTarget' in shiftHourlyEntriesItem) {
2978
+ shiftHourlyEntriesItemObject.totalManningTarget = function () {
2979
+ if (shiftHourlyEntriesItem.totalManningTarget === null) {
2980
+ return null;
2981
+ }
2982
+
2983
+ if (typeof shiftHourlyEntriesItem.totalManningTarget !== 'number') {
2984
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalManningTarget)) ? Number(shiftHourlyEntriesItem.totalManningTarget) : Math.floor(Number(shiftHourlyEntriesItem.totalManningTarget));
2985
+ }
2986
+
2987
+ return Number.isInteger(shiftHourlyEntriesItem.totalManningTarget) ? shiftHourlyEntriesItem.totalManningTarget : Math.floor(shiftHourlyEntriesItem.totalManningTarget);
2988
+ }();
2989
+ } else {
2990
+ shiftHourlyEntriesItemObject.totalManningTarget = null;
2991
+ }
2992
+
2993
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalManning' in shiftHourlyEntriesItem) {
2994
+ shiftHourlyEntriesItemObject.totalManning = function () {
2995
+ if (shiftHourlyEntriesItem.totalManning === null) {
2996
+ return null;
2997
+ }
2998
+
2999
+ if (typeof shiftHourlyEntriesItem.totalManning !== 'number') {
3000
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalManning)) ? Number(shiftHourlyEntriesItem.totalManning) : Math.floor(Number(shiftHourlyEntriesItem.totalManning));
3001
+ }
3002
+
3003
+ return Number.isInteger(shiftHourlyEntriesItem.totalManning) ? shiftHourlyEntriesItem.totalManning : Math.floor(shiftHourlyEntriesItem.totalManning);
3004
+ }();
3005
+ } else {
3006
+ shiftHourlyEntriesItemObject.totalManning = null;
3007
+ }
3008
+
3009
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalManningPercentage' in shiftHourlyEntriesItem) {
3010
+ shiftHourlyEntriesItemObject.totalManningPercentage = function () {
3011
+ if (shiftHourlyEntriesItem.totalManningPercentage === null) {
3012
+ return null;
3013
+ }
3014
+
3015
+ if (typeof shiftHourlyEntriesItem.totalManningPercentage !== 'number') {
3016
+ return Number(shiftHourlyEntriesItem.totalManningPercentage);
3017
+ }
3018
+
3019
+ return shiftHourlyEntriesItem.totalManningPercentage;
3020
+ }();
3021
+ } else {
3022
+ shiftHourlyEntriesItemObject.totalManningPercentage = null;
3023
+ }
3024
+
3025
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'costPerManningUnitHour' in shiftHourlyEntriesItem) {
3026
+ shiftHourlyEntriesItemObject.costPerManningUnitHour = function () {
3027
+ if (shiftHourlyEntriesItem.costPerManningUnitHour === null) {
3028
+ return null;
3029
+ }
3030
+
3031
+ if (typeof shiftHourlyEntriesItem.costPerManningUnitHour !== 'number') {
3032
+ return Number(shiftHourlyEntriesItem.costPerManningUnitHour);
3033
+ }
3034
+
3035
+ return shiftHourlyEntriesItem.costPerManningUnitHour;
3036
+ }();
3037
+ } else {
3038
+ shiftHourlyEntriesItemObject.costPerManningUnitHour = null;
3039
+ }
3040
+
3041
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalMinutesWorked' in shiftHourlyEntriesItem) {
3042
+ shiftHourlyEntriesItemObject.totalMinutesWorked = function () {
3043
+ if (typeof shiftHourlyEntriesItem.totalMinutesWorked !== 'number') {
3044
+ return Number(shiftHourlyEntriesItem.totalMinutesWorked);
3045
+ }
3046
+
3047
+ return shiftHourlyEntriesItem.totalMinutesWorked;
3048
+ }();
3049
+ } else {
3050
+ shiftHourlyEntriesItemObject.totalMinutesWorked = 0;
3051
+ }
3052
+
3053
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalMinutesWorkedExcludingDowntime' in shiftHourlyEntriesItem) {
3054
+ shiftHourlyEntriesItemObject.totalMinutesWorkedExcludingDowntime = function () {
3055
+ if (typeof shiftHourlyEntriesItem.totalMinutesWorkedExcludingDowntime !== 'number') {
3056
+ return Number(shiftHourlyEntriesItem.totalMinutesWorkedExcludingDowntime);
3057
+ }
3058
+
3059
+ return shiftHourlyEntriesItem.totalMinutesWorkedExcludingDowntime;
3060
+ }();
3061
+ } else {
3062
+ shiftHourlyEntriesItemObject.totalMinutesWorkedExcludingDowntime = 0;
3063
+ }
3064
+
3065
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalMinutesPaid' in shiftHourlyEntriesItem) {
3066
+ shiftHourlyEntriesItemObject.totalMinutesPaid = function () {
3067
+ if (typeof shiftHourlyEntriesItem.totalMinutesPaid !== 'number') {
3068
+ return Number(shiftHourlyEntriesItem.totalMinutesPaid);
3069
+ }
3070
+
3071
+ return shiftHourlyEntriesItem.totalMinutesPaid;
3072
+ }();
3073
+ } else {
3074
+ shiftHourlyEntriesItemObject.totalMinutesPaid = 0;
3075
+ }
3076
+
3077
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1TotalManningCost' in shiftHourlyEntriesItem) {
3078
+ shiftHourlyEntriesItemObject.class1TotalManningCost = function () {
3079
+ if (shiftHourlyEntriesItem.class1TotalManningCost === null) {
3080
+ return null;
3081
+ }
3082
+
3083
+ if (typeof shiftHourlyEntriesItem.class1TotalManningCost !== 'number') {
3084
+ return Number(shiftHourlyEntriesItem.class1TotalManningCost);
3085
+ }
3086
+
3087
+ return shiftHourlyEntriesItem.class1TotalManningCost;
3088
+ }();
3089
+ } else {
3090
+ shiftHourlyEntriesItemObject.class1TotalManningCost = null;
3091
+ }
3092
+
3093
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2TotalManningCost' in shiftHourlyEntriesItem) {
3094
+ shiftHourlyEntriesItemObject.class2TotalManningCost = function () {
3095
+ if (shiftHourlyEntriesItem.class2TotalManningCost === null) {
3096
+ return null;
3097
+ }
3098
+
3099
+ if (typeof shiftHourlyEntriesItem.class2TotalManningCost !== 'number') {
3100
+ return Number(shiftHourlyEntriesItem.class2TotalManningCost);
3101
+ }
3102
+
3103
+ return shiftHourlyEntriesItem.class2TotalManningCost;
3104
+ }();
3105
+ } else {
3106
+ shiftHourlyEntriesItemObject.class2TotalManningCost = null;
3107
+ }
3108
+
3109
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1DowntimeManningCost' in shiftHourlyEntriesItem) {
3110
+ shiftHourlyEntriesItemObject.class1DowntimeManningCost = function () {
3111
+ if (shiftHourlyEntriesItem.class1DowntimeManningCost === null) {
3112
+ return null;
3113
+ }
3114
+
3115
+ if (typeof shiftHourlyEntriesItem.class1DowntimeManningCost !== 'number') {
3116
+ return Number(shiftHourlyEntriesItem.class1DowntimeManningCost);
3117
+ }
3118
+
3119
+ return shiftHourlyEntriesItem.class1DowntimeManningCost;
3120
+ }();
3121
+ } else {
3122
+ shiftHourlyEntriesItemObject.class1DowntimeManningCost = null;
3123
+ }
3124
+
3125
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2DowntimeManningCost' in shiftHourlyEntriesItem) {
3126
+ shiftHourlyEntriesItemObject.class2DowntimeManningCost = function () {
3127
+ if (shiftHourlyEntriesItem.class2DowntimeManningCost === null) {
3128
+ return null;
3129
+ }
3130
+
3131
+ if (typeof shiftHourlyEntriesItem.class2DowntimeManningCost !== 'number') {
3132
+ return Number(shiftHourlyEntriesItem.class2DowntimeManningCost);
3133
+ }
3134
+
3135
+ return shiftHourlyEntriesItem.class2DowntimeManningCost;
3136
+ }();
3137
+ } else {
3138
+ shiftHourlyEntriesItemObject.class2DowntimeManningCost = null;
3139
+ }
3140
+
3141
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1CostPerTrayTarget' in shiftHourlyEntriesItem) {
3142
+ shiftHourlyEntriesItemObject.class1CostPerTrayTarget = function () {
3143
+ if (shiftHourlyEntriesItem.class1CostPerTrayTarget === null) {
3144
+ return null;
3145
+ }
3146
+
3147
+ if (typeof shiftHourlyEntriesItem.class1CostPerTrayTarget !== 'number') {
3148
+ return Number(shiftHourlyEntriesItem.class1CostPerTrayTarget);
3149
+ }
3150
+
3151
+ return shiftHourlyEntriesItem.class1CostPerTrayTarget;
3152
+ }();
3153
+ } else {
3154
+ shiftHourlyEntriesItemObject.class1CostPerTrayTarget = null;
3155
+ }
3156
+
3157
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1CostPerTrayActual' in shiftHourlyEntriesItem) {
3158
+ shiftHourlyEntriesItemObject.class1CostPerTrayActual = function () {
3159
+ if (shiftHourlyEntriesItem.class1CostPerTrayActual === null) {
3160
+ return null;
3161
+ }
3162
+
3163
+ if (typeof shiftHourlyEntriesItem.class1CostPerTrayActual !== 'number') {
3164
+ return Number(shiftHourlyEntriesItem.class1CostPerTrayActual);
3165
+ }
3166
+
3167
+ return shiftHourlyEntriesItem.class1CostPerTrayActual;
3168
+ }();
3169
+ } else {
3170
+ shiftHourlyEntriesItemObject.class1CostPerTrayActual = null;
3171
+ }
3172
+
3173
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2CostPerTrayActual' in shiftHourlyEntriesItem) {
3174
+ shiftHourlyEntriesItemObject.class2CostPerTrayActual = function () {
3175
+ if (shiftHourlyEntriesItem.class2CostPerTrayActual === null) {
3176
+ return null;
3177
+ }
3178
+
3179
+ if (typeof shiftHourlyEntriesItem.class2CostPerTrayActual !== 'number') {
3180
+ return Number(shiftHourlyEntriesItem.class2CostPerTrayActual);
3181
+ }
3182
+
3183
+ return shiftHourlyEntriesItem.class2CostPerTrayActual;
3184
+ }();
3185
+ } else {
3186
+ shiftHourlyEntriesItemObject.class2CostPerTrayActual = null;
3187
+ }
3188
+
3189
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalClass1Trays' in shiftHourlyEntriesItem) {
3190
+ shiftHourlyEntriesItemObject.totalClass1Trays = function () {
3191
+ if (typeof shiftHourlyEntriesItem.totalClass1Trays !== 'number') {
3192
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalClass1Trays)) ? Number(shiftHourlyEntriesItem.totalClass1Trays) : Math.floor(Number(shiftHourlyEntriesItem.totalClass1Trays));
3193
+ }
3194
+
3195
+ return Number.isInteger(shiftHourlyEntriesItem.totalClass1Trays) ? shiftHourlyEntriesItem.totalClass1Trays : Math.floor(shiftHourlyEntriesItem.totalClass1Trays);
3196
+ }();
3197
+ } else {
3198
+ shiftHourlyEntriesItemObject.totalClass1Trays = 0;
3199
+ }
3200
+
3201
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'totalClass2Trays' in shiftHourlyEntriesItem) {
3202
+ shiftHourlyEntriesItemObject.totalClass2Trays = function () {
3203
+ if (typeof shiftHourlyEntriesItem.totalClass2Trays !== 'number') {
3204
+ return Number.isInteger(Number(shiftHourlyEntriesItem.totalClass2Trays)) ? Number(shiftHourlyEntriesItem.totalClass2Trays) : Math.floor(Number(shiftHourlyEntriesItem.totalClass2Trays));
3205
+ }
3206
+
3207
+ return Number.isInteger(shiftHourlyEntriesItem.totalClass2Trays) ? shiftHourlyEntriesItem.totalClass2Trays : Math.floor(shiftHourlyEntriesItem.totalClass2Trays);
3208
+ }();
3209
+ } else {
3210
+ shiftHourlyEntriesItemObject.totalClass2Trays = 0;
3211
+ }
3212
+
3213
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1TraysPerHourExcludingDowntime' in shiftHourlyEntriesItem) {
3214
+ shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntime = function () {
3215
+ if (typeof shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime !== 'number') {
3216
+ return Number.isInteger(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime)) ? Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime) : Math.floor(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime));
3217
+ }
3218
+
3219
+ return Number.isInteger(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime) ? shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime : Math.floor(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntime);
3220
+ }();
3221
+ } else {
3222
+ shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntime = 0;
3223
+ }
3224
+
3225
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1TraysPerHourExcludingDowntimeTarget' in shiftHourlyEntriesItem) {
3226
+ shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntimeTarget = function () {
3227
+ if (typeof shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget !== 'number') {
3228
+ return Number.isInteger(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget)) ? Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget) : Math.floor(Number(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget));
3229
+ }
3230
+
3231
+ return Number.isInteger(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget) ? shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget : Math.floor(shiftHourlyEntriesItem.class1TraysPerHourExcludingDowntimeTarget);
3232
+ }();
3233
+ } else {
3234
+ shiftHourlyEntriesItemObject.class1TraysPerHourExcludingDowntimeTarget = 0;
3235
+ }
3236
+
3237
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1TraysPerManHourExcludingDowntime' in shiftHourlyEntriesItem) {
3238
+ shiftHourlyEntriesItemObject.class1TraysPerManHourExcludingDowntime = function () {
3239
+ if (shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime === null) {
3240
+ return null;
3241
+ }
3242
+
3243
+ if (typeof shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime !== 'number') {
3244
+ return Number(shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime);
3245
+ }
3246
+
3247
+ return shiftHourlyEntriesItem.class1TraysPerManHourExcludingDowntime;
3248
+ }();
3249
+ } else {
3250
+ shiftHourlyEntriesItemObject.class1TraysPerManHourExcludingDowntime = null;
3251
+ }
3252
+
3253
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2TraysPerHourExcludingDowntime' in shiftHourlyEntriesItem) {
3254
+ shiftHourlyEntriesItemObject.class2TraysPerHourExcludingDowntime = function () {
3255
+ if (typeof shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime !== 'number') {
3256
+ return Number.isInteger(Number(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime)) ? Number(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime) : Math.floor(Number(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime));
3257
+ }
3258
+
3259
+ return Number.isInteger(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime) ? shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime : Math.floor(shiftHourlyEntriesItem.class2TraysPerHourExcludingDowntime);
3260
+ }();
3261
+ } else {
3262
+ shiftHourlyEntriesItemObject.class2TraysPerHourExcludingDowntime = 0;
3263
+ }
3264
+
3265
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class2TraysPerManHourExcludingDowntime' in shiftHourlyEntriesItem) {
3266
+ shiftHourlyEntriesItemObject.class2TraysPerManHourExcludingDowntime = function () {
3267
+ if (shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime === null) {
3268
+ return null;
3269
+ }
3270
+
3271
+ if (typeof shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime !== 'number') {
3272
+ return Number(shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime);
3273
+ }
3274
+
3275
+ return shiftHourlyEntriesItem.class2TraysPerManHourExcludingDowntime;
3276
+ }();
3277
+ } else {
3278
+ shiftHourlyEntriesItemObject.class2TraysPerManHourExcludingDowntime = null;
3279
+ }
3280
+
3281
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1LayeredPercentageTarget' in shiftHourlyEntriesItem) {
3282
+ shiftHourlyEntriesItemObject.class1LayeredPercentageTarget = function () {
3283
+ if (shiftHourlyEntriesItem.class1LayeredPercentageTarget === null) {
3284
+ return null;
3285
+ }
3286
+
3287
+ if (typeof shiftHourlyEntriesItem.class1LayeredPercentageTarget !== 'number') {
3288
+ return Number(shiftHourlyEntriesItem.class1LayeredPercentageTarget);
3289
+ }
3290
+
3291
+ return shiftHourlyEntriesItem.class1LayeredPercentageTarget;
3292
+ }();
3293
+ } else {
3294
+ shiftHourlyEntriesItemObject.class1LayeredPercentageTarget = null;
3295
+ }
3296
+
3297
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1LayeredPercentage' in shiftHourlyEntriesItem) {
3298
+ shiftHourlyEntriesItemObject.class1LayeredPercentage = function () {
3299
+ if (shiftHourlyEntriesItem.class1LayeredPercentage === null) {
3300
+ return null;
3301
+ }
3302
+
3303
+ if (typeof shiftHourlyEntriesItem.class1LayeredPercentage !== 'number') {
3304
+ return Number(shiftHourlyEntriesItem.class1LayeredPercentage);
3305
+ }
3306
+
3307
+ return shiftHourlyEntriesItem.class1LayeredPercentage;
3308
+ }();
3309
+ } else {
3310
+ shiftHourlyEntriesItemObject.class1LayeredPercentage = null;
3311
+ }
3312
+
3313
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'class1BulkPercentage' in shiftHourlyEntriesItem) {
3314
+ shiftHourlyEntriesItemObject.class1BulkPercentage = function () {
3315
+ if (shiftHourlyEntriesItem.class1BulkPercentage === null) {
3316
+ return null;
3317
+ }
3318
+
3319
+ if (typeof shiftHourlyEntriesItem.class1BulkPercentage !== 'number') {
3320
+ return Number(shiftHourlyEntriesItem.class1BulkPercentage);
3321
+ }
3322
+
3323
+ return shiftHourlyEntriesItem.class1BulkPercentage;
3324
+ }();
3325
+ } else {
3326
+ shiftHourlyEntriesItemObject.class1BulkPercentage = null;
3327
+ }
3328
+
3329
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'averageClass1Percentage' in shiftHourlyEntriesItem) {
3330
+ shiftHourlyEntriesItemObject.averageClass1Percentage = function () {
3331
+ if (shiftHourlyEntriesItem.averageClass1Percentage === null) {
3332
+ return null;
3333
+ }
3334
+
3335
+ if (typeof shiftHourlyEntriesItem.averageClass1Percentage !== 'number') {
3336
+ return Number(shiftHourlyEntriesItem.averageClass1Percentage);
3337
+ }
3338
+
3339
+ return shiftHourlyEntriesItem.averageClass1Percentage;
3340
+ }();
3341
+ } else {
3342
+ shiftHourlyEntriesItemObject.averageClass1Percentage = null;
3343
+ }
3344
+
3345
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'qualityR600IdealSamplesTarget' in shiftHourlyEntriesItem) {
3346
+ shiftHourlyEntriesItemObject.qualityR600IdealSamplesTarget = function () {
3347
+ if (shiftHourlyEntriesItem.qualityR600IdealSamplesTarget === null) {
3348
+ return null;
3349
+ }
3350
+
3351
+ if (typeof shiftHourlyEntriesItem.qualityR600IdealSamplesTarget !== 'number') {
3352
+ return Number(shiftHourlyEntriesItem.qualityR600IdealSamplesTarget);
3353
+ }
3354
+
3355
+ return shiftHourlyEntriesItem.qualityR600IdealSamplesTarget;
3356
+ }();
3357
+ } else {
3358
+ shiftHourlyEntriesItemObject.qualityR600IdealSamplesTarget = null;
3359
+ }
3360
+
3361
+ if (_typeof(shiftHourlyEntriesItem) === 'object' && 'qualityR600IdealSamplesActual' in shiftHourlyEntriesItem) {
3362
+ shiftHourlyEntriesItemObject.qualityR600IdealSamplesActual = function () {
3363
+ if (shiftHourlyEntriesItem.qualityR600IdealSamplesActual === null) {
3364
+ return null;
3365
+ }
3366
+
3367
+ if (typeof shiftHourlyEntriesItem.qualityR600IdealSamplesActual !== 'number') {
3368
+ return Number(shiftHourlyEntriesItem.qualityR600IdealSamplesActual);
3369
+ }
3370
+
3371
+ return shiftHourlyEntriesItem.qualityR600IdealSamplesActual;
3372
+ }();
3373
+ } else {
3374
+ shiftHourlyEntriesItemObject.qualityR600IdealSamplesActual = null;
3375
+ }
3376
+
3377
+ return shiftHourlyEntriesItemObject;
3378
+ }();
3379
+ });
3380
+ }();
3381
+ } else {
3382
+ resultObject.shiftHourlyEntries = [];
3383
+ }
3384
+
3385
+ if (_typeof(result) === 'object' && 'downtimeEvents' in result) {
3386
+ resultObject.downtimeEvents = function () {
3387
+ if (Array.isArray(result.downtimeEvents) !== true) {
3388
+ return [];
3389
+ }
3390
+
3391
+ return result.downtimeEvents.map(function (downtimeEventsItem) {
3392
+ return function () {
3393
+ var downtimeEventsItemObject = {};
3394
+
3395
+ if (_typeof(downtimeEventsItem) === 'object' && 'siteId' in downtimeEventsItem) {
3396
+ downtimeEventsItemObject.siteId = function () {
3397
+ if (typeof downtimeEventsItem.siteId !== 'number') {
3398
+ return Number.isInteger(Number(downtimeEventsItem.siteId)) ? Number(downtimeEventsItem.siteId) : Math.floor(Number(downtimeEventsItem.siteId));
3399
+ }
3400
+
3401
+ return Number.isInteger(downtimeEventsItem.siteId) ? downtimeEventsItem.siteId : Math.floor(downtimeEventsItem.siteId);
3402
+ }();
3403
+ } else {
3404
+ downtimeEventsItemObject.siteId = 0;
3405
+ }
3406
+
3407
+ if (_typeof(downtimeEventsItem) === 'object' && 'siteName' in downtimeEventsItem) {
3408
+ downtimeEventsItemObject.siteName = function () {
3409
+ if (typeof downtimeEventsItem.siteName !== 'string') {
3410
+ return String(downtimeEventsItem.siteName);
3411
+ }
3412
+
3413
+ return downtimeEventsItem.siteName;
3414
+ }();
3415
+ } else {
3416
+ downtimeEventsItemObject.siteName = "";
3417
+ }
3418
+
3419
+ if (_typeof(downtimeEventsItem) === 'object' && 'packingLineId' in downtimeEventsItem) {
3420
+ downtimeEventsItemObject.packingLineId = function () {
3421
+ if (typeof downtimeEventsItem.packingLineId !== 'string') {
3422
+ return String(downtimeEventsItem.packingLineId);
3423
+ }
3424
+
3425
+ return downtimeEventsItem.packingLineId;
3426
+ }();
3427
+ } else {
3428
+ downtimeEventsItemObject.packingLineId = "";
3429
+ }
3430
+
3431
+ if (_typeof(downtimeEventsItem) === 'object' && 'packingLineName' in downtimeEventsItem) {
3432
+ downtimeEventsItemObject.packingLineName = function () {
3433
+ if (typeof downtimeEventsItem.packingLineName !== 'string') {
3434
+ return String(downtimeEventsItem.packingLineName);
3435
+ }
3436
+
3437
+ return downtimeEventsItem.packingLineName;
3438
+ }();
3439
+ } else {
3440
+ downtimeEventsItemObject.packingLineName = "";
3441
+ }
3442
+
3443
+ if (_typeof(downtimeEventsItem) === 'object' && 'shiftId' in downtimeEventsItem) {
3444
+ downtimeEventsItemObject.shiftId = function () {
3445
+ if (typeof downtimeEventsItem.shiftId !== 'string') {
3446
+ return String(downtimeEventsItem.shiftId);
3447
+ }
3448
+
3449
+ return downtimeEventsItem.shiftId;
3450
+ }();
3451
+ } else {
3452
+ downtimeEventsItemObject.shiftId = "";
3453
+ }
3454
+
3455
+ if (_typeof(downtimeEventsItem) === 'object' && 'shiftType' in downtimeEventsItem) {
3456
+ downtimeEventsItemObject.shiftType = function () {
3457
+ if (typeof downtimeEventsItem.shiftType !== 'string') {
3458
+ return String(downtimeEventsItem.shiftType);
3459
+ }
3460
+
3461
+ return downtimeEventsItem.shiftType;
3462
+ }();
3463
+ } else {
3464
+ downtimeEventsItemObject.shiftType = "";
3465
+ }
3466
+
3467
+ if (_typeof(downtimeEventsItem) === 'object' && 'isoWeek' in downtimeEventsItem) {
3468
+ downtimeEventsItemObject.isoWeek = function () {
3469
+ if (typeof downtimeEventsItem.isoWeek !== 'number') {
3470
+ return Number.isInteger(Number(downtimeEventsItem.isoWeek)) ? Number(downtimeEventsItem.isoWeek) : Math.floor(Number(downtimeEventsItem.isoWeek));
3471
+ }
3472
+
3473
+ return Number.isInteger(downtimeEventsItem.isoWeek) ? downtimeEventsItem.isoWeek : Math.floor(downtimeEventsItem.isoWeek);
3474
+ }();
3475
+ } else {
3476
+ downtimeEventsItemObject.isoWeek = 0;
3477
+ }
3478
+
3479
+ if (_typeof(downtimeEventsItem) === 'object' && 'startTimestamp' in downtimeEventsItem) {
3480
+ downtimeEventsItemObject.startTimestamp = function () {
3481
+ if (typeof downtimeEventsItem.startTimestamp !== 'string') {
3482
+ return new Date(String(downtimeEventsItem.startTimestamp));
3483
+ }
3484
+
3485
+ return new Date(downtimeEventsItem.startTimestamp);
3486
+ }();
3487
+ } else {
3488
+ downtimeEventsItemObject.startTimestamp = new Date();
3489
+ }
3490
+
3491
+ if (_typeof(downtimeEventsItem) === 'object' && 'endTimestamp' in downtimeEventsItem) {
3492
+ downtimeEventsItemObject.endTimestamp = function () {
3493
+ if (downtimeEventsItem.endTimestamp === null) {
3494
+ return null;
3495
+ }
3496
+
3497
+ if (typeof downtimeEventsItem.endTimestamp !== 'string') {
3498
+ return new Date(String(downtimeEventsItem.endTimestamp));
3499
+ }
3500
+
3501
+ return new Date(downtimeEventsItem.endTimestamp);
3502
+ }();
3503
+ } else {
3504
+ downtimeEventsItemObject.endTimestamp = null;
3505
+ }
3506
+
3507
+ if (_typeof(downtimeEventsItem) === 'object' && 'reasonCategory' in downtimeEventsItem) {
3508
+ downtimeEventsItemObject.reasonCategory = function () {
3509
+ if (downtimeEventsItem.reasonCategory === null) {
3510
+ return null;
3511
+ }
3512
+
3513
+ if (typeof downtimeEventsItem.reasonCategory !== 'string') {
3514
+ return String(downtimeEventsItem.reasonCategory);
3515
+ }
3516
+
3517
+ return downtimeEventsItem.reasonCategory;
3518
+ }();
3519
+ } else {
3520
+ downtimeEventsItemObject.reasonCategory = null;
3521
+ }
3522
+
3523
+ if (_typeof(downtimeEventsItem) === 'object' && 'reasonTag' in downtimeEventsItem) {
3524
+ downtimeEventsItemObject.reasonTag = function () {
3525
+ if (downtimeEventsItem.reasonTag === null) {
3526
+ return null;
3527
+ }
3528
+
3529
+ if (typeof downtimeEventsItem.reasonTag !== 'string') {
3530
+ return String(downtimeEventsItem.reasonTag);
3531
+ }
3532
+
3533
+ return downtimeEventsItem.reasonTag;
3534
+ }();
3535
+ } else {
3536
+ downtimeEventsItemObject.reasonTag = null;
3537
+ }
3538
+
3539
+ if (_typeof(downtimeEventsItem) === 'object' && 'remedyAction' in downtimeEventsItem) {
3540
+ downtimeEventsItemObject.remedyAction = function () {
3541
+ if (downtimeEventsItem.remedyAction === null) {
3542
+ return null;
3543
+ }
3544
+
3545
+ if (typeof downtimeEventsItem.remedyAction !== 'string') {
3546
+ return String(downtimeEventsItem.remedyAction);
3547
+ }
3548
+
3549
+ return downtimeEventsItem.remedyAction;
3550
+ }();
3551
+ } else {
3552
+ downtimeEventsItemObject.remedyAction = null;
3553
+ }
3554
+
3555
+ return downtimeEventsItemObject;
3556
+ }();
3557
+ });
3558
+ }();
3559
+ } else {
3560
+ resultObject.downtimeEvents = [];
3561
+ }
3562
+
3563
+ if (_typeof(result) === 'object' && 'packagingConsumption' in result) {
3564
+ resultObject.packagingConsumption = function () {
3565
+ if (Array.isArray(result.packagingConsumption) !== true) {
3566
+ return [];
3567
+ }
3568
+
3569
+ return result.packagingConsumption.map(function (packagingConsumptionItem) {
3570
+ return function () {
3571
+ var packagingConsumptionItemObject = {};
3572
+
3573
+ if (_typeof(packagingConsumptionItem) === 'object' && 'siteId' in packagingConsumptionItem) {
3574
+ packagingConsumptionItemObject.siteId = function () {
3575
+ if (typeof packagingConsumptionItem.siteId !== 'number') {
3576
+ return Number.isInteger(Number(packagingConsumptionItem.siteId)) ? Number(packagingConsumptionItem.siteId) : Math.floor(Number(packagingConsumptionItem.siteId));
3577
+ }
3578
+
3579
+ return Number.isInteger(packagingConsumptionItem.siteId) ? packagingConsumptionItem.siteId : Math.floor(packagingConsumptionItem.siteId);
3580
+ }();
3581
+ } else {
3582
+ packagingConsumptionItemObject.siteId = 0;
3583
+ }
3584
+
3585
+ if (_typeof(packagingConsumptionItem) === 'object' && 'siteName' in packagingConsumptionItem) {
3586
+ packagingConsumptionItemObject.siteName = function () {
3587
+ if (typeof packagingConsumptionItem.siteName !== 'string') {
3588
+ return String(packagingConsumptionItem.siteName);
3589
+ }
3590
+
3591
+ return packagingConsumptionItem.siteName;
3592
+ }();
3593
+ } else {
3594
+ packagingConsumptionItemObject.siteName = "";
3595
+ }
3596
+
3597
+ if (_typeof(packagingConsumptionItem) === 'object' && 'packingLineId' in packagingConsumptionItem) {
3598
+ packagingConsumptionItemObject.packingLineId = function () {
3599
+ if (typeof packagingConsumptionItem.packingLineId !== 'string') {
3600
+ return String(packagingConsumptionItem.packingLineId);
3601
+ }
3602
+
3603
+ return packagingConsumptionItem.packingLineId;
3604
+ }();
3605
+ } else {
3606
+ packagingConsumptionItemObject.packingLineId = "";
3607
+ }
3608
+
3609
+ if (_typeof(packagingConsumptionItem) === 'object' && 'packingLineName' in packagingConsumptionItem) {
3610
+ packagingConsumptionItemObject.packingLineName = function () {
3611
+ if (typeof packagingConsumptionItem.packingLineName !== 'string') {
3612
+ return String(packagingConsumptionItem.packingLineName);
3613
+ }
3614
+
3615
+ return packagingConsumptionItem.packingLineName;
3616
+ }();
3617
+ } else {
3618
+ packagingConsumptionItemObject.packingLineName = "";
3619
+ }
3620
+
3621
+ if (_typeof(packagingConsumptionItem) === 'object' && 'packrunId' in packagingConsumptionItem) {
3622
+ packagingConsumptionItemObject.packrunId = function () {
3623
+ if (typeof packagingConsumptionItem.packrunId !== 'string') {
3624
+ return String(packagingConsumptionItem.packrunId);
3625
+ }
3626
+
3627
+ return packagingConsumptionItem.packrunId;
3628
+ }();
3629
+ } else {
3630
+ packagingConsumptionItemObject.packrunId = "";
3631
+ }
3632
+
3633
+ if (_typeof(packagingConsumptionItem) === 'object' && 'packrunName' in packagingConsumptionItem) {
3634
+ packagingConsumptionItemObject.packrunName = function () {
3635
+ if (typeof packagingConsumptionItem.packrunName !== 'string') {
3636
+ return String(packagingConsumptionItem.packrunName);
3637
+ }
3638
+
3639
+ return packagingConsumptionItem.packrunName;
3640
+ }();
3641
+ } else {
3642
+ packagingConsumptionItemObject.packrunName = "";
3643
+ }
3644
+
3645
+ if (_typeof(packagingConsumptionItem) === 'object' && 'varietyId' in packagingConsumptionItem) {
3646
+ packagingConsumptionItemObject.varietyId = function () {
3647
+ if (typeof packagingConsumptionItem.varietyId !== 'string') {
3648
+ return String(packagingConsumptionItem.varietyId);
3649
+ }
3650
+
3651
+ return packagingConsumptionItem.varietyId;
3652
+ }();
3653
+ } else {
3654
+ packagingConsumptionItemObject.varietyId = "";
3655
+ }
3656
+
3657
+ if (_typeof(packagingConsumptionItem) === 'object' && 'varietyCode' in packagingConsumptionItem) {
3658
+ packagingConsumptionItemObject.varietyCode = function () {
3659
+ if (typeof packagingConsumptionItem.varietyCode !== 'string') {
3660
+ return String(packagingConsumptionItem.varietyCode);
3661
+ }
3662
+
3663
+ return packagingConsumptionItem.varietyCode;
3664
+ }();
3665
+ } else {
3666
+ packagingConsumptionItemObject.varietyCode = "";
3667
+ }
3668
+
3669
+ if (_typeof(packagingConsumptionItem) === 'object' && 'isoWeek' in packagingConsumptionItem) {
3670
+ packagingConsumptionItemObject.isoWeek = function () {
3671
+ if (typeof packagingConsumptionItem.isoWeek !== 'number') {
3672
+ return Number.isInteger(Number(packagingConsumptionItem.isoWeek)) ? Number(packagingConsumptionItem.isoWeek) : Math.floor(Number(packagingConsumptionItem.isoWeek));
3673
+ }
3674
+
3675
+ return Number.isInteger(packagingConsumptionItem.isoWeek) ? packagingConsumptionItem.isoWeek : Math.floor(packagingConsumptionItem.isoWeek);
3676
+ }();
3677
+ } else {
3678
+ packagingConsumptionItemObject.isoWeek = 0;
3679
+ }
3680
+
3681
+ if (_typeof(packagingConsumptionItem) === 'object' && 'startTimestamp' in packagingConsumptionItem) {
3682
+ packagingConsumptionItemObject.startTimestamp = function () {
3683
+ if (typeof packagingConsumptionItem.startTimestamp !== 'string') {
3684
+ return new Date(String(packagingConsumptionItem.startTimestamp));
3685
+ }
3686
+
3687
+ return new Date(packagingConsumptionItem.startTimestamp);
3688
+ }();
3689
+ } else {
3690
+ packagingConsumptionItemObject.startTimestamp = new Date();
3691
+ }
3692
+
3693
+ if (_typeof(packagingConsumptionItem) === 'object' && 'endTimestamp' in packagingConsumptionItem) {
3694
+ packagingConsumptionItemObject.endTimestamp = function () {
3695
+ if (packagingConsumptionItem.endTimestamp === null) {
3696
+ return null;
3697
+ }
3698
+
3699
+ if (typeof packagingConsumptionItem.endTimestamp !== 'string') {
3700
+ return new Date(String(packagingConsumptionItem.endTimestamp));
3701
+ }
3702
+
3703
+ return new Date(packagingConsumptionItem.endTimestamp);
3704
+ }();
3705
+ } else {
3706
+ packagingConsumptionItemObject.endTimestamp = null;
3707
+ }
3708
+
3709
+ if (_typeof(packagingConsumptionItem) === 'object' && 'packType' in packagingConsumptionItem) {
3710
+ packagingConsumptionItemObject.packType = function () {
3711
+ if (typeof packagingConsumptionItem.packType !== 'string') {
3712
+ return String(packagingConsumptionItem.packType);
3713
+ }
3714
+
3715
+ return packagingConsumptionItem.packType;
3716
+ }();
3717
+ } else {
3718
+ packagingConsumptionItemObject.packType = "";
3719
+ }
3720
+
3721
+ if (_typeof(packagingConsumptionItem) === 'object' && 'quantity' in packagingConsumptionItem) {
3722
+ packagingConsumptionItemObject.quantity = function () {
3723
+ if (typeof packagingConsumptionItem.quantity !== 'number') {
3724
+ return Number.isInteger(Number(packagingConsumptionItem.quantity)) ? Number(packagingConsumptionItem.quantity) : Math.floor(Number(packagingConsumptionItem.quantity));
3725
+ }
3726
+
3727
+ return Number.isInteger(packagingConsumptionItem.quantity) ? packagingConsumptionItem.quantity : Math.floor(packagingConsumptionItem.quantity);
3728
+ }();
3729
+ } else {
3730
+ packagingConsumptionItemObject.quantity = 0;
3731
+ }
3732
+
3733
+ return packagingConsumptionItemObject;
3734
+ }();
3735
+ });
3736
+ }();
3737
+ } else {
3738
+ resultObject.packagingConsumption = [];
3739
+ }
3740
+
3741
+ return resultObject;
3742
+ }();
3743
+
3744
+ resolve(resolveValue);
3745
+ }).catch(function (error) {
3746
+ return reject(error);
3747
+ });
3748
+ });
3749
+ }
3750
+ /**
3751
+ * Retrieve Production Data as an Excel Spreadsheet [GET /packhouse/production-data-export/excel]
3752
+ *
3753
+ * Request a Production Data Export in the form of an Excel Spreadsheet
3754
+ *
3755
+ * @static
3756
+ * @public
3757
+ * @return {Promise<boolean>}
3758
+ */
3759
+
3760
+ }, {
3761
+ key: "excelExport",
3762
+ value: function excelExport() {
3763
+ return new Promise(function (resolve, reject) {
3764
+ _RequestHelper.default.getRequest("/packhouse/production-data-export/excel").then(function (result) {
3765
+ resolve(result !== null && result !== void 0 ? result : true);
3766
+ }).catch(function (error) {
3767
+ return reject(error);
3768
+ });
3769
+ });
3770
+ }
3771
+ /**
3772
+ * Retrieve Production Data as a CSV File [GET /packhouse/production-data-export/csv]
3773
+ *
3774
+ * Request a Production Data Export in the form of a CSV File
3775
+ *
3776
+ * @static
3777
+ * @public
3778
+ * @return {Promise<boolean>}
3779
+ */
3780
+
3781
+ }, {
3782
+ key: "csvExport",
3783
+ value: function csvExport() {
3784
+ return new Promise(function (resolve, reject) {
3785
+ _RequestHelper.default.getRequest("/packhouse/production-data-export/csv").then(function (result) {
3786
+ resolve(result !== null && result !== void 0 ? result : true);
3787
+ }).catch(function (error) {
3788
+ return reject(error);
3789
+ });
3790
+ });
3791
+ }
3792
+ }]);
3793
+
3794
+ return ProductionDataExportController;
3795
+ }();
3796
+
3797
+ var _default = ProductionDataExportController;
3798
+ /**
3799
+ * The Optional Query Parameters for the jsonExport Function
3800
+ *
3801
+ * @typedef {Object} ProductionDataExportController.JsonExportQueryParameters
3802
+ * @property {number[]} [siteIds] A List of Site IDs to Filter by
3803
+ * @property {string[]} [packingLineIds] A List of Packing Line IDs to Filter by
3804
+ * @memberof Controllers.Packhouse
3805
+ */
3806
+
3807
+ /**
3808
+ * A **PackrunData** Type
3809
+ *
3810
+ * @typedef {Object} ProductionDataExportController.PackrunData
3811
+ * @property {number} siteId ID of the Site where this Packrun occurred
3812
+ * @property {string} siteName Name of the Site where this Packrun occurred
3813
+ * @property {string} packingLineId ID of the Packing Line where this Packrun occurred
3814
+ * @property {string} packingLineName Name of the Packing Line where this Packrun occurred
3815
+ * @property {number} isoWeek ISO Week when this Packrun occurred
3816
+ * @property {Date} startTimestamp Timestamp when this Packrun was Started
3817
+ * @property {?Date} finishTimestamp Timestamp when this Packrun was Finished
3818
+ * @property {string} packrunId ID of the Packrun
3819
+ * @property {string} packrunName Name of the Packrun
3820
+ * @property {string} varietyId ID of the Variety associated with this Packrun
3821
+ * @property {string} varietyCode Code of the Variety associated with this Packrun
3822
+ * @property {string} growingMethodId ID of the Growing Method associated with this Packrun
3823
+ * @property {string} growingMethodCode Code of the Growing Method associated with this Packrun
3824
+ * @property {string} growerCode Grower Code of the Packrun
3825
+ * @property {string} growerName Grower Name of the Packrun
3826
+ * @property {string} maturityArea Maturity Area of the Packrun
3827
+ * @property {number} allocatedBins Number of Bins Allocated to this Packrun
3828
+ * @property {number} totalBinsTipped Number of Bins Tipped during this Packrun
3829
+ * @property {number} totalNetWeightTipped Total Net Fruit Weight Tipped during this Packrun
3830
+ * @property {number} averageNetWeightPerBin Average Net Fruit Weight per Bin for this Packrun
3831
+ * @property {number} averageBinsTippedPerHour Average Bins Tipped per Hour during this Packrun
3832
+ * @property {number} averageTimePerTippedBin Average Time Taken in Seconds to Tip a Bin during this Packrun
3833
+ * @property {number} averageBinTipWeightThroughput Average Throughput in Kilograms per Hour for the Bin Tip during this Packrun
3834
+ * @property {number} softSortEventsPerBin Number of Soft-Sort Events per Bin Tipped during this Packrun
3835
+ * @property {number} totalSoftSortEventsCount Total Number of Soft-Sort Events that occurred during this Packrun
3836
+ * @property {number} averageSoftSortEventsDuration Average Duration in Seconds of a Soft-Sort Event during this Packrun
3837
+ * @property {number} totalSoftSortEventsDuration Total Duration in Seconds of all Soft-Sort Events that occurred during this Packrun
3838
+ * @property {?boolean} softSortEventsAccurate Whether the Soft-Sort Events for this Packrun were Accurate according to the Line Manager
3839
+ * @property {?string} softSortEventsNotAccurateReason A Reason for why the Soft-Sort Events were not Accurate
3840
+ * @property {number} class1Percentage Class 1 Percentage for this Packrun
3841
+ * @property {number} class2Percentage Class 2 Percentage for this Packrun
3842
+ * @property {number} class3Percentage Class 3 Percentage for this Packrun
3843
+ * @property {number} nssPercentage Non-Standard Supply Percentage for this Packrun
3844
+ * @property {number} undersizePercentage Undersize Percentage for this Packrun
3845
+ * @property {number} cdmPercentage Culled / Low Dry Matter Percentage for this Packrun
3846
+ * @property {number} wastePercentage Waste Percentage for this Packrun
3847
+ * @property {number} softSortPercentage Soft-Sort Percentage for this Packrun
3848
+ * @property {number} totalNonClass1Percentage Total Non-Class 1 Percentage for this Packrun
3849
+ * @property {number} class1Weight Total Class 1 Weight in Kilograms for this Packrun
3850
+ * @property {number} class2Weight Total Class 2 Weight in Kilograms for this Packrun
3851
+ * @property {number} class3Weight Total Class 3 Weight in Kilograms for this Packrun
3852
+ * @property {number} nssWeight Total Non-Standard Supply Weight in Kilograms for this Packrun
3853
+ * @property {number} undersizeWeight Total Undersize Weight in Kilograms for this Packrun
3854
+ * @property {number} cdmWeight Total Culled / Low Dry Matter Weight in Kilograms for this Packrun
3855
+ * @property {number} wasteWeight Total Waste Weight in Kilograms for this Packrun
3856
+ * @property {number} softSortWeight Total Soft-Sort Weight in Kilograms for this Packrun
3857
+ * @property {number} totalNonClass1Weight Total Non-Class 1 Weight in Kilograms for this Packrun
3858
+ * @property {number} totalClass1Trays Total Class 1 Tray Equivalents Produced during this Packrun
3859
+ * @property {number} totalClass2Trays Total Class 2 Tray Equivalents Produced during this Packrun
3860
+ * @property {number} totalClass1FruitCount Total Number of Class 1 Fruit that were Packed during this Packrun
3861
+ * @property {number} totalClass2FruitCount Total Number of Class 2 Fruit that were Packed during this Packrun
3862
+ * @property {number} averageClass1TrayWeight Average Class 1 Tray Equivalent Weight in Kilograms for this Packrun
3863
+ * @property {number} averageClass2TrayWeight Average Class 2 Tray Equivalent Weight in Kilograms for this Packrun
3864
+ * @property {number} class1TraysPerBin Average Class 1 Trays Produced per Bin Tipped for this Packrun
3865
+ * @property {number} averageFruitSize Average Fruit Size for this Packrun
3866
+ * @property {number} averageFruitWeight Average Fruit Weight in Grams for this Packrun
3867
+ * @property {number} totalRejectBinsCount Total Number of Reject Bins Weighed during this Packrun
3868
+ * @property {number} totalRejectBinsNetWeight Total Net Fruit Weight in Kilograms captured in Reject Bins during this Packrun
3869
+ * @property {?number} qualityR600TotalFruitSampled Total Number of R600 Class 1 Fruit Sampled by Quality Control during this Packrun
3870
+ * @property {?number} qualityR600FruitSampledPercentage Percentage of R600 Class 1 Fruit Sampled by Quality Control during this Packrun
3871
+ * @property {?number} qualityR600AverageSampledFruitSize Average R600 Class 1 Fruit Size that was Sampled by Quality Control during this Packrun
3872
+ * @property {?number} qualityR600TotalSamplesCount Total Number of Class 1 R600 Samples Collected by Quality Control during this Packrun
3873
+ * @property {?number} qualityR600IdealSamplesTarget Target Percentage of R600 Samples that should be in the Ideal Range for this Packrun
3874
+ * @property {?number} qualityR600IdealSamplesActual Actual Percentage of R600 Samples that were in the Ideal Range during this Packrun
3875
+ * @property {?number} qualityR600MinorPackingDefects Percentage of Minor Packing Defects found in Class 1 R600 Samples during this Packrun
3876
+ * @property {?number} qualityR600MajorPackingDefects Percentage of Major Packing Defects found in Class 1 R600 Samples during this Packrun
3877
+ * @property {?number} qualityR600Softs Percentage of Soft Fruit found in Class 1 R600 Samples during this Packrun
3878
+ * @property {?number} qualityR600Cuts Percentage of Cut (Flesh Damaged) Fruit found in Class 1 R600 Samples during this Packrun
3879
+ * @property {?number} qualityR600Rots Percentage of Rotten Fruit found in Class 1 R600 Samples during this Packrun
3880
+ * @property {?number} qualityExportFruitInClass2 Percentage of Export Fruit found in Class 2 during this Packrun
3881
+ * @property {?number} qualityExportFruitInClass3 Percentage of Export Fruit found in Class 3 during this Packrun
3882
+ * @property {?number} qualityExportFruitInWaste Percentage of Export Fruit found in Waste during this Packrun
3883
+ * @property {string[]} shiftIds An Array of Shift IDs this Packrun is associated with
3884
+ * @property {string[]} shiftTypes An Array of Shift Types that were encountered during this Packrun
3885
+ * @property {string[]} lineManagerNames An Array of Line Managers who were involved with this Packrun
3886
+ * @property {string[]} qualityManagerNames An Array of Quality Managers who were involved with this Packrun
3887
+ * @property {number} totalProductionTime Total Shift Production Time in Seconds for this Packrun
3888
+ * @property {number} totalScheduledBreakTime Total Shift Scheduled Break Time in Seconds for this Packrun
3889
+ * @property {number} totalDowntime Total Shift Downtime in Seconds for this Packrun
3890
+ * @property {number} downtimeEventsCount Number of Downtime Events that occurred during this Packrun
3891
+ * @property {number} downtimeEventsAverageDuration Average Duration in Seconds of a Downtime Event during this Packrun
3892
+ * @property {?number} class1ManningTarget Target Number of People working on the Packing Line (excluding Class 2) during this Packrun
3893
+ * @property {?number} averageClass1Manning Average Number of People working on the Packing Line (excluding Class 2) during this Packrun
3894
+ * @property {?number} class1ManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line (excluding Class 2) during this Packrun
3895
+ * @property {?number} class2ManningTarget Target Number of People working in the Class 2 area of the Packing Line during this Packrun
3896
+ * @property {?number} averageClass2Manning Average Number of People working in the Class 2 area of the Packing Line during this Packrun
3897
+ * @property {?number} class2ManningPercentage Percentage of Target vs Actual Number of People working in the Class 2 area of the Packing Line during this Packrun
3898
+ * @property {?number} totalManningTarget Target Number of People working on the Packing Line during this Packrun
3899
+ * @property {?number} averageTotalManning Average Number of People working on the Packing Line during this Packrun
3900
+ * @property {?number} totalManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line during this Packrun
3901
+ * @property {?number} costPerManningUnitHour Average Cost ($) per Person per Hour working on the Packing Line for this Packrun
3902
+ * @property {number} totalHoursWorked Total Hours Worked during this Packrun. Directly relates to Production Time
3903
+ * @property {number} totalHoursWorkedExcludingDowntime Total Hours Worked excluding Downtime during this Packrun. Directly relates to Production Time less Downtime
3904
+ * @property {number} totalHoursPaid Total Hours Paid during this Packrun. Directly relates to Production Time and the Paid portion of Scheduled Break Time combined
3905
+ * @property {?number} class1TotalManningCost Total Cost ($) of Manning the Packing Line (excluding Class 2) during this Packrun
3906
+ * @property {?number} class2TotalManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line during this Packrun
3907
+ * @property {?number} class1DowntimeManningCost Cost ($) of Manning the Packing Line (excluding Class 2) in all Downtime Events during this Packrun
3908
+ * @property {?number} class2DowntimeManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line in all Downtime Events during this Packrun
3909
+ * @property {?number} class1CostPerTrayTarget Target Cost (cents) per Class 1 Tray Equivalent Produced during this Packrun
3910
+ * @property {?number} class1CostPerTrayActual Actual Cost (cents) per Class 1 Tray Equivalent Produced during this Packrun
3911
+ * @property {?number} class2CostPerTrayActual Actual Cost (cents) per Class 2 Tray Equivalent Produced during this Packrun
3912
+ * @property {number} class1TraysPerHour Average Class 1 Tray Equivalents Produced per Hour during this Packrun
3913
+ * @property {number} class1TraysPerHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Hour excluding Downtime during this Packrun
3914
+ * @property {number} class1TraysPerHourExcludingDowntimeTarget Target Class 1 Tray Equivalents to Produce per Hour excluding Downtime during this Packrun
3915
+ * @property {?number} class1TraysPerManHour Average Class 1 Tray Equivalents Produced per Person per Hour during this Packrun
3916
+ * @property {?number} class1TraysPerManHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Person per Hour excluding Downtime during this Packrun
3917
+ * @property {number} class2TraysPerHour Average Class 2 Tray Equivalents Produced per Hour during this Packrun
3918
+ * @property {number} class2TraysPerHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Hour excluding Downtime during this Packrun
3919
+ * @property {?number} class2TraysPerManHour Average Class 2 Tray Equivalents Produced per Person per Hour during this Packrun
3920
+ * @property {?number} class2TraysPerManHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Person per Hour excluding Downtime during this Packrun
3921
+ * @property {?number} class1LayeredPercentageTarget Target Percentage of Layered Trays that should be Produced for this Packrun
3922
+ * @property {?number} class1LayeredPercentage Actual Percentage of Layered Trays that were Produced during this Packrun
3923
+ * @property {?number} class1BulkPercentage Actual Percentage of Bulk Packs that were Produced during this Packrun
3924
+ * @memberof Controllers.Packhouse
3925
+ */
3926
+
3927
+ /**
3928
+ * A **ShiftData** Type
3929
+ *
3930
+ * @typedef {Object} ProductionDataExportController.ShiftData
3931
+ * @property {number} siteId ID of the Site where this Shift took place
3932
+ * @property {string} siteName Name of the Site where this Shift took place
3933
+ * @property {string} packingLineId ID of the Packing Line where this Shift took place
3934
+ * @property {string} packingLineName Name of the Packing Line where this Shift took place
3935
+ * @property {string} shiftId ID of the Shift
3936
+ * @property {string} shiftType Type of the Shift
3937
+ * @property {number} isoWeek ISO Week when this Shift occurred
3938
+ * @property {Date} startTimestamp Timestamp when this Shift was Started
3939
+ * @property {?Date} finishTimestamp Timestamp when this Shift was Finished
3940
+ * @property {?string} lineManagerName Name of the Line Manager who ran this Shift
3941
+ * @property {?string} qualityManagerName Name of the Quality Manager who ran this Shift
3942
+ * @property {string[]} varietyIds An Array of Variety IDs that were Packed during this Shift
3943
+ * @property {string[]} varietyCodes An Array of Variety Codes that were Packed during this Shift
3944
+ * @property {string[]} growingMethodIds An Array of Growing Method IDs that were Packed during this Shift
3945
+ * @property {string[]} growingMethodCodes An Array of Growing Method Codes that were Packed during this Shift
3946
+ * @property {number} binsTippedTarget Target Number of Bins to Tip during this Shift
3947
+ * @property {number} totalBinsTipped Total Number of Bins Tipped during this Shift
3948
+ * @property {number} binsTippedPerHour Number of Bins Tipped per Hour during this Shift
3949
+ * @property {number} binsTippedPerHourExcludingDowntime Number of Bins Tipped per Hour excluding Downtime during this Shift
3950
+ * @property {number} totalProductionTime Total Production Time in Seconds for this Shift
3951
+ * @property {number} totalScheduledBreakTime Total Scheduled Break Time in Seconds for this Shift
3952
+ * @property {number} totalDowntime Total Downtime in Seconds for this Shift
3953
+ * @property {number} downtimeEventsCount Number of Downtime Events that occurred during this Shift
3954
+ * @property {number} downtimeEventsAverageDuration Average Duration in Seconds of a Downtime Event during this Shift
3955
+ * @property {?number} class1ManningTarget Target Number of People working on the Packing Line (excluding Class 2) during this Shift
3956
+ * @property {?number} averageClass1Manning Average Number of People working on the Packing Line (excluding Class 2) during this Shift
3957
+ * @property {?number} class1ManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line (excluding Class 2) during this Shift
3958
+ * @property {?number} class2ManningTarget Target Number of People working in the Class 2 area of the Packing Line during this Shift
3959
+ * @property {?number} averageClass2Manning Average Number of People working in the Class 2 area of the Packing Line during this Shift
3960
+ * @property {?number} class2ManningPercentage Percentage of Target vs Actual Number of People working in the Class 2 area of the Packing Line during this Shift
3961
+ * @property {?number} totalManningTarget Target Number of People working on the Packing Line during this Shift
3962
+ * @property {?number} averageTotalManning Average Number of People working on the Packing Line during this Shift
3963
+ * @property {?number} totalManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line during this Shift
3964
+ * @property {?number} costPerManningUnitHour Average Cost ($) per Person per Hour working on the Packing Line for this Shift
3965
+ * @property {number} totalHoursWorked Total Hours Worked during this Shift. Directly relates to Production Time
3966
+ * @property {number} totalHoursWorkedExcludingDowntime Total Hours Worked excluding Downtime during this Shift. Directly relates to Production Time less Downtime
3967
+ * @property {number} totalHoursPaid Total Hours Paid during this Shift. Directly relates to Production Time and the Paid portion of Scheduled Break Time combined
3968
+ * @property {?number} class1TotalManningCost Total Cost ($) of Manning the Packing Line (excluding Class 2) during this Shift
3969
+ * @property {?number} class2TotalManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line during this Shift
3970
+ * @property {?number} class1DowntimeManningCost Cost ($) of Manning the Packing Line (excluding Class 2) in all Downtime Events during this Shift
3971
+ * @property {?number} class2DowntimeManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line in all Downtime Events during this Shift
3972
+ * @property {?number} class1CostPerTrayTarget Target Cost (cents) per Class 1 Tray Equivalent Produced during this Shift
3973
+ * @property {?number} class1CostPerTrayActual Actual Cost (cents) per Class 1 Tray Equivalent Produced during this Shift
3974
+ * @property {?number} class2CostPerTrayActual Actual Cost (cents) per Class 2 Tray Equivalent Produced during this Shift
3975
+ * @property {number} totalClass1Trays Total Class 1 Tray Equivalents Produced during this Shift
3976
+ * @property {number} totalClass2Trays Total Class 2 Tray Equivalents Produced during this Shift
3977
+ * @property {number} class1TraysPerHour Average Class 1 Tray Equivalents Produced per Hour during this Shift
3978
+ * @property {number} class1TraysPerHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Hour excluding Downtime during this Shift
3979
+ * @property {number} class1TraysPerHourExcludingDowntimeTarget Target Class 1 Tray Equivalents to Produce per Hour excluding Downtime during this Shift
3980
+ * @property {?number} class1TraysPerManHour Average Class 1 Tray Equivalents Produced per Person per Hour during this Shift
3981
+ * @property {?number} class1TraysPerManHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Person per Hour excluding Downtime during this Shift
3982
+ * @property {number} class2TraysPerHour Average Class 2 Tray Equivalents Produced per Hour during this Shift
3983
+ * @property {number} class2TraysPerHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Hour excluding Downtime during this Shift
3984
+ * @property {?number} class2TraysPerManHour Average Class 2 Tray Equivalents Produced per Person per Hour during this Shift
3985
+ * @property {?number} class2TraysPerManHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Person per Hour excluding Downtime during this Shift
3986
+ * @property {?number} class1LayeredPercentageTarget Target Percentage of Layered Trays that should be Produced for this Shift
3987
+ * @property {?number} class1LayeredPercentage Actual Percentage of Layered Trays that were Produced during this Shift
3988
+ * @property {?number} class1BulkPercentage Actual Percentage of Bulk Packs that were Produced during this Shift
3989
+ * @property {?number} averageClass1Percentage Average Class 1 Packout Percentage during this Shift
3990
+ * @property {?number} qualityR600IdealSamplesTarget Target Percentage of R600 Samples that should be in the Ideal Range for this Shift
3991
+ * @property {?number} qualityR600IdealSamplesActual Actual Percentage of R600 Samples that were in the Ideal Range during this Shift
3992
+ * @property {?number} satisfactionRating An Optional Satisfaction Rating between 1 and 10 from the Line Manager of this Shift
3993
+ * @property {?number} keyCelebration An Optional Key Celebration the Line Manager observed during this Shift
3994
+ * @property {?number} keyChallenge An Optional Key Challenge the Line Manager observed during this Shift
3995
+ * @memberof Controllers.Packhouse
3996
+ */
3997
+
3998
+ /**
3999
+ * A **ShiftHourlyData** Type
4000
+ *
4001
+ * @typedef {Object} ProductionDataExportController.ShiftHourlyData
4002
+ * @property {number} siteId ID of the Site where this Hour took place
4003
+ * @property {string} siteName Name of the Site where this Hour took place
4004
+ * @property {string} packingLineId ID of the Packing Line where this Hour took place
4005
+ * @property {string} packingLineName Name of the Packing Line where this Hour took place
4006
+ * @property {string} shiftId ID of the Shift associated with this Hourly Entry
4007
+ * @property {string} shiftType Type of the Shift associated with this Hourly Entry
4008
+ * @property {number} isoWeek ISO Week when this Hour Started
4009
+ * @property {Date} startTimestamp Timestamp when this Hour Started
4010
+ * @property {?Date} endTimestamp Timestamp when this Hour Ended
4011
+ * @property {?string} lineManagerName Name of the Line Manager who ran this Hour
4012
+ * @property {?string} qualityManagerName Name of the Quality Manager who ran this Hour
4013
+ * @property {string[]} varietyIds An Array of Variety IDs that were Packed during this Hour
4014
+ * @property {string[]} varietyCodes An Array of Variety Codes that were Packed during this Hour
4015
+ * @property {string[]} growingMethodIds An Array of Growing Method IDs that were Packed during this Hour
4016
+ * @property {string[]} growingMethodCodes An Array of Growing Method Codes that were Packed during this Hour
4017
+ * @property {number} totalBinsTipped Total Number of Bins Tipped during this Hour
4018
+ * @property {number} totalProductionTime Total Production Time in Seconds for this Hour
4019
+ * @property {number} totalScheduledBreakTime Total Scheduled Break Time in Seconds for this Hour
4020
+ * @property {number} totalDowntime Total Downtime in Seconds for this Hour
4021
+ * @property {number} downtimeEventsCount Number of Downtime Events that occurred during this Hour
4022
+ * @property {number} downtimeEventsAverageDuration Average Duration in Seconds of a Downtime Event during this Hour
4023
+ * @property {?number} class1ManningTarget Target Number of People working on the Packing Line (excluding Class 2) during this Hour
4024
+ * @property {?number} class1Manning Actual Number of People working on the Packing Line (excluding Class 2) during this Hour
4025
+ * @property {?number} class1ManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line (excluding Class 2) during this Hour
4026
+ * @property {?number} class2ManningTarget Target Number of People working in the Class 2 area of the Packing Line during this Hour
4027
+ * @property {?number} class2Manning Actual Number of People working in the Class 2 area of the Packing Line during this Hour
4028
+ * @property {?number} class2ManningPercentage Percentage of Target vs Actual Number of People working in the Class 2 area of the Packing Line during this Hour
4029
+ * @property {?number} totalManningTarget Target Number of People working on the Packing Line during this Hour
4030
+ * @property {?number} totalManning Actual Number of People working on the Packing Line during this Hour
4031
+ * @property {?number} totalManningPercentage Percentage of Target vs Actual Number of People working on the Packing Line during this Hour
4032
+ * @property {?number} costPerManningUnitHour Average Cost ($) per Person per Hour working on the Packing Line for this Hour
4033
+ * @property {number} totalMinutesWorked Total Hours Worked during this Hour. Directly relates to Production Time
4034
+ * @property {number} totalMinutesWorkedExcludingDowntime Total Hours Worked excluding Downtime during this Hour. Directly relates to Production Time less Downtime
4035
+ * @property {number} totalMinutesPaid Total Hours Paid during this Hour. Directly relates to Production Time and the Paid portion of Scheduled Break Time combined
4036
+ * @property {?number} class1TotalManningCost Total Cost ($) of Manning the Packing Line (excluding Class 2) during this Hour
4037
+ * @property {?number} class2TotalManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line during this Hour
4038
+ * @property {?number} class1DowntimeManningCost Cost ($) of Manning the Packing Line (excluding Class 2) in all Downtime Events during this Hour
4039
+ * @property {?number} class2DowntimeManningCost Total Cost ($) of Manning the Class 2 area of the Packing Line in all Downtime Events during this Hour
4040
+ * @property {?number} class1CostPerTrayTarget Target Cost (cents) per Class 1 Tray Equivalent Produced during this Hour
4041
+ * @property {?number} class1CostPerTrayActual Actual Cost (cents) per Class 1 Tray Equivalent Produced during this Hour
4042
+ * @property {?number} class2CostPerTrayActual Actual Cost (cents) per Class 2 Tray Equivalent Produced during this Hour
4043
+ * @property {number} totalClass1Trays Total Class 1 Tray Equivalents Produced during this Hour
4044
+ * @property {number} totalClass2Trays Total Class 2 Tray Equivalents Produced during this Hour
4045
+ * @property {number} class1TraysPerHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Hour excluding Downtime during this Hour
4046
+ * @property {number} class1TraysPerHourExcludingDowntimeTarget Target Class 1 Tray Equivalents to Produce per Hour excluding Downtime during this Hour
4047
+ * @property {?number} class1TraysPerManHourExcludingDowntime Average Class 1 Tray Equivalents Produced per Person per Hour excluding Downtime during this Hour
4048
+ * @property {number} class2TraysPerHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Hour excluding Downtime during this Hour
4049
+ * @property {?number} class2TraysPerManHourExcludingDowntime Average Class 2 Tray Equivalents Produced per Person per Hour excluding Downtime during this Hour
4050
+ * @property {?number} class1LayeredPercentageTarget Target Percentage of Layered Trays that should be Produced for this Hour
4051
+ * @property {?number} class1LayeredPercentage Actual Percentage of Layered Trays that were Produced during this Hour
4052
+ * @property {?number} class1BulkPercentage Actual Percentage of Bulk Packs that were Produced during this Hour
4053
+ * @property {?number} averageClass1Percentage Average Class 1 Packout Percentage during this Hour
4054
+ * @property {?number} qualityR600IdealSamplesTarget Target Percentage of R600 Samples that should be in the Ideal Range for this Hour
4055
+ * @property {?number} qualityR600IdealSamplesActual Actual Percentage of R600 Samples that were in the Ideal Range during this Hour
4056
+ * @memberof Controllers.Packhouse
4057
+ */
4058
+
4059
+ /**
4060
+ * A **DowntimeData** Type
4061
+ *
4062
+ * @typedef {Object} ProductionDataExportController.DowntimeData
4063
+ * @property {number} siteId ID of the Site where this Downtime Event occurred
4064
+ * @property {string} siteName Name of the Site where this Downtime Event occurred
4065
+ * @property {string} packingLineId ID of the Packing Line where this Downtime Event occurred
4066
+ * @property {string} packingLineName Name of the Packing Line where this Downtime Event occurred
4067
+ * @property {string} shiftId ID of the Shift associated with this Downtime Event
4068
+ * @property {string} shiftType Type of the Shift associated with this Downtime Event
4069
+ * @property {number} isoWeek ISO Week when this Downtime Event occurred
4070
+ * @property {Date} startTimestamp Timestamp when this Downtime Event Started
4071
+ * @property {?Date} endTimestamp Timestamp when this Downtime Event Ended
4072
+ * @property {?string} reasonCategory Reason Category for this Downtime Event
4073
+ * @property {?string} reasonTag Reason Tag for this Downtime Event
4074
+ * @property {?string} remedyAction An Optional Summary of the Action taken to Remedy this Downtime Event
4075
+ * @memberof Controllers.Packhouse
4076
+ */
4077
+
4078
+ /**
4079
+ * A **PackagingConsumptionData** Type
4080
+ *
4081
+ * @typedef {Object} ProductionDataExportController.PackagingConsumptionData
4082
+ * @property {number} siteId ID of the Site where this Packaging Consumption occurred
4083
+ * @property {string} siteName Name of the Site where this Packaging Consumption occurred
4084
+ * @property {string} packingLineId ID of the Packing Line where this Packaging Consumption occurred
4085
+ * @property {string} packingLineName Name of the Packing Line where this Packaging Consumption occurred
4086
+ * @property {string} packrunId ID of the Packrun associated with this Packaging Consumption
4087
+ * @property {string} packrunName Name of the Packrun associated with this Packaging Consumption
4088
+ * @property {string} varietyId ID of the Variety associated with this Packaging Consumption
4089
+ * @property {string} varietyCode Code of the Variety associated with this Packaging Consumption
4090
+ * @property {number} isoWeek ISO Week when this Packaging Consumption occurred
4091
+ * @property {Date} startTimestamp Timestamp when this Packaging Consumption Started
4092
+ * @property {?Date} endTimestamp Timestamp when this Packaging Consumption Ended
4093
+ * @property {string} packType Pack Type of the Packaging Consumed
4094
+ * @property {number} quantity Quantity of Packaging Consumed
4095
+ * @memberof Controllers.Packhouse
4096
+ */
4097
+
4098
+ /**
4099
+ * A **ProductionData** Type
4100
+ *
4101
+ * @typedef {Object} ProductionDataExportController.ProductionData
4102
+ * @property {Array<ProductionDataExportController.PackrunData>} packruns An Array of Packrun Data
4103
+ * @property {Array<ProductionDataExportController.ShiftData>} shifts An Array of Shift Data
4104
+ * @property {Array<ProductionDataExportController.ShiftHourlyData>} shiftHourlyEntries An Array of Shift Hourly Entry Data
4105
+ * @property {Array<ProductionDataExportController.DowntimeData>} downtimeEvents An Array of Downtime Event Data
4106
+ * @property {Array<ProductionDataExportController.PackagingConsumptionData>} packagingConsumption An Array of Packaging Consumption Data
4107
+ * @memberof Controllers.Packhouse
4108
+ */
4109
+
4110
+ exports.default = _default;