@ricado/api-client 2.3.10 → 2.3.13

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