@ricado/api-client 2.0.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +5 -7
  2. package/dist/ricado.api.client.js +1 -1
  3. package/lib/Controllers/Packhouse/Site/BinTipBinController.js +622 -0
  4. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  5. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  6. package/lib/Controllers/Packhouse/Site/CompacSizerController.js +7 -7
  7. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  8. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  9. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  10. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  11. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  12. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  13. package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +657 -0
  14. package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  15. package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  16. package/lib/Controllers/Packhouse/Site/PackingLineController.js +29 -5
  17. package/lib/Controllers/Packhouse/Site/PackrunController.js +46 -4
  18. package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  19. package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
  20. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  21. package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
  22. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  23. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +19 -4
  24. package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +661 -0
  25. package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +628 -0
  26. package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +453 -0
  27. package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
  28. package/lib/Controllers/Packhouse/Site/index.js +15 -0
  29. package/lib/Controllers/Site/AlarmController.js +4 -4
  30. package/lib/Controllers/Site/AlarmGroupController.js +4 -4
  31. package/lib/Controllers/Site/DefinitionController.js +4 -4
  32. package/lib/Controllers/Site/PermanentObjectController.js +4 -4
  33. package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
  34. package/lib/Controllers/Site/PointController.js +4 -4
  35. package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
  36. package/lib/Errors/BadRequestError.js +1 -1
  37. package/lib/Errors/ForbiddenError.js +1 -1
  38. package/lib/Errors/NetworkError.js +1 -1
  39. package/lib/Errors/NotAllowedError.js +1 -1
  40. package/lib/Errors/NotFoundError.js +1 -1
  41. package/lib/Errors/ServerError.js +1 -1
  42. package/lib/Errors/UnauthorizedError.js +1 -1
  43. package/lib/Models/AccountPolicyModel.js +1 -1
  44. package/lib/Models/ApiAccountModel.js +1 -1
  45. package/lib/Models/CompanyModel.js +1 -1
  46. package/lib/Models/FirebaseTokenModel.js +1 -1
  47. package/lib/Models/Packhouse/Site/BinTipBinModel.js +367 -0
  48. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +14 -4
  49. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +14 -4
  50. package/lib/Models/Packhouse/Site/CompacSizerModel.js +15 -5
  51. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +14 -4
  52. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +14 -4
  53. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +14 -4
  54. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +14 -4
  55. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -4
  56. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +14 -4
  57. package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +481 -0
  58. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +14 -4
  59. package/lib/Models/Packhouse/Site/PackTypeModel.js +14 -4
  60. package/lib/Models/Packhouse/Site/PackingLineModel.js +538 -5
  61. package/lib/Models/Packhouse/Site/PackrunModel.js +80 -4
  62. package/lib/Models/Packhouse/Site/RejectBinModel.js +14 -4
  63. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +274 -8
  64. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +14 -4
  65. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +14 -4
  66. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +181 -5
  67. package/lib/Models/Packhouse/Site/ShiftModel.js +14 -4
  68. package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +599 -0
  69. package/lib/Models/Packhouse/Site/ShiftTaskModel.js +373 -0
  70. package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
  71. package/lib/Models/Packhouse/Site/VarietyModel.js +14 -4
  72. package/lib/Models/Packhouse/Site/index.js +15 -0
  73. package/lib/Models/RTUModel.js +1 -1
  74. package/lib/Models/RTUPluginModel.js +1 -1
  75. package/lib/Models/Site/AlarmGroupModel.js +14 -4
  76. package/lib/Models/Site/AlarmModel.js +14 -4
  77. package/lib/Models/Site/DefinitionModel.js +14 -4
  78. package/lib/Models/Site/PermanentObjectDataModel.js +14 -4
  79. package/lib/Models/Site/PermanentObjectModel.js +14 -4
  80. package/lib/Models/Site/PointModel.js +14 -4
  81. package/lib/Models/Site/TemporaryObjectModel.js +14 -4
  82. package/lib/Models/SiteModel.js +1 -1
  83. package/lib/Models/TokenModel.js +1 -1
  84. package/lib/Models/UserAccountActionTokenModel.js +1 -1
  85. package/lib/Models/UserAccountModel.js +1 -1
  86. package/lib/PackageVersion.js +1 -1
  87. package/lib/index.d.ts +4039 -1071
  88. package/package.json +1 -1
  89. package/src/Controllers/Packhouse/Site/BinTipBinController.js +665 -0
  90. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
  91. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
  92. package/src/Controllers/Packhouse/Site/CompacSizerController.js +7 -7
  93. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
  94. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
  95. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
  96. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
  97. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
  98. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
  99. package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +700 -0
  100. package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
  101. package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
  102. package/src/Controllers/Packhouse/Site/PackingLineController.js +29 -5
  103. package/src/Controllers/Packhouse/Site/PackrunController.js +56 -4
  104. package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
  105. package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
  106. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
  107. package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
  108. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
  109. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +19 -4
  110. package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +704 -0
  111. package/src/Controllers/Packhouse/Site/ShiftTaskController.js +671 -0
  112. package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +474 -0
  113. package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
  114. package/src/Controllers/Packhouse/Site/index.js +10 -0
  115. package/src/Controllers/Site/AlarmController.js +4 -4
  116. package/src/Controllers/Site/AlarmGroupController.js +4 -4
  117. package/src/Controllers/Site/DefinitionController.js +4 -4
  118. package/src/Controllers/Site/PermanentObjectController.js +4 -4
  119. package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
  120. package/src/Controllers/Site/PointController.js +4 -4
  121. package/src/Controllers/Site/TemporaryObjectController.js +4 -4
  122. package/src/Models/Packhouse/Site/BinTipBinModel.js +365 -0
  123. package/src/Models/Packhouse/Site/BinTipWeightModel.js +13 -3
  124. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +13 -3
  125. package/src/Models/Packhouse/Site/CompacSizerModel.js +14 -4
  126. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +13 -3
  127. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +13 -3
  128. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +13 -3
  129. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +13 -3
  130. package/src/Models/Packhouse/Site/DowntimeEventModel.js +13 -3
  131. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +13 -3
  132. package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +523 -0
  133. package/src/Models/Packhouse/Site/GrowingMethodModel.js +13 -3
  134. package/src/Models/Packhouse/Site/PackTypeModel.js +13 -3
  135. package/src/Models/Packhouse/Site/PackingLineModel.js +718 -4
  136. package/src/Models/Packhouse/Site/PackrunModel.js +88 -3
  137. package/src/Models/Packhouse/Site/RejectBinModel.js +13 -3
  138. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +310 -7
  139. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +13 -3
  140. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +13 -3
  141. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +205 -4
  142. package/src/Models/Packhouse/Site/ShiftModel.js +13 -3
  143. package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +664 -0
  144. package/src/Models/Packhouse/Site/ShiftTaskModel.js +369 -0
  145. package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
  146. package/src/Models/Packhouse/Site/VarietyModel.js +13 -3
  147. package/src/Models/Packhouse/Site/index.js +10 -0
  148. package/src/Models/Site/AlarmGroupModel.js +13 -3
  149. package/src/Models/Site/AlarmModel.js +13 -3
  150. package/src/Models/Site/DefinitionModel.js +13 -3
  151. package/src/Models/Site/PermanentObjectDataModel.js +13 -3
  152. package/src/Models/Site/PermanentObjectModel.js +13 -3
  153. package/src/Models/Site/PointModel.js +13 -3
  154. package/src/Models/Site/TemporaryObjectModel.js +13 -3
  155. package/src/PackageVersion.js +1 -1
@@ -19,8 +19,9 @@ class PackingLineModel extends BaseModel
19
19
  * PackingLineModel Constructor
20
20
  *
21
21
  * @protected
22
+ * @param {number} siteId The Site ID associated with this Packing Line
22
23
  */
23
- constructor()
24
+ constructor(siteId)
24
25
  {
25
26
  super();
26
27
 
@@ -80,6 +81,14 @@ class PackingLineModel extends BaseModel
80
81
  */
81
82
  this.rejectBinScales = undefined;
82
83
 
84
+ /**
85
+ * An Optional Secondary Packing Line Reference
86
+ *
87
+ * @type {?Object}
88
+ * @public
89
+ */
90
+ this.secondaryPackingLine = undefined;
91
+
83
92
  /**
84
93
  * The Automation Object for this Packing Line
85
94
  *
@@ -107,7 +116,7 @@ class PackingLineModel extends BaseModel
107
116
  /**
108
117
  * The Optional Shift Management Object for this Packing Line
109
118
  *
110
- * @type {?{points: {currentShiftId: number, createNewDayShiftRequest: number, createNewNightShiftRequest: number, startCurrentShiftRequest: number, finishCurrentShiftRequest: number, currentFocusMeetingId: number, startFocusMeetingRequest: number, finishFocusMeetingRequest: number, shiftSchedules: number}, enabled: boolean}}
119
+ * @type {?{points: {currentShiftId: number, createNewDayShiftRequest: number, createNewNightShiftRequest: number, startCurrentShiftRequest: number, finishCurrentShiftRequest: number, currentFocusMeetingId: number, startFocusMeetingRequest: number, finishFocusMeetingRequest: number, currentShiftStatus: number, currentShiftModifyHourlyEntryRequest: number, shiftSchedules: number, currentShiftClass1TraysPerHourTarget: number, currentShiftClass1TraysPerHourAdjustedTarget: number, currentShiftClass1TraysPerHour: number, currentShiftCostPerTrayTarget: number, currentShiftCostPerTrayAdjustedTarget: number, currentShiftCostPerTray: number, currentShiftManningTarget: number, currentShiftClass1Manning: number, currentShiftClass2Manning: number, currentShiftQualityR600IdealTarget: number, currentShiftQualityR600Ideal: number, currentShiftScorePercentage: number, class1TraysPerHourTargets: number, costPerTrayTargets: number, manningTargets: number, qualityR600IdealTargets: number, costPerManningUnitHour: number, class1TraysPerHourScoreWeighting: number, costPerTrayScoreWeighting: number, qualityR600IdealScoreWeighting: number}, customQualityConfiguration: Array<{id: string, name: string, type: string, points: {currentShiftCustomQualityTarget: number, currentShiftCustomQualityValue: number, customQualityTargets: number, customQualityScoreWeighting: number}}>, enabled: boolean, taskDefinitions: Array<{type: string, tags: Array<{id: string, name: string, color: string, deleted: boolean}>}>}}
111
120
  * @public
112
121
  */
113
122
  this.shiftManagement = undefined;
@@ -143,6 +152,14 @@ class PackingLineModel extends BaseModel
143
152
  * @public
144
153
  */
145
154
  this.updateTimestamp = undefined;
155
+
156
+ /**
157
+ * The Site ID associated with this Packing Line
158
+ *
159
+ * @type {number}
160
+ * @public
161
+ */
162
+ this.siteId = siteId;
146
163
  }
147
164
 
148
165
  /**
@@ -151,11 +168,12 @@ class PackingLineModel extends BaseModel
151
168
  * @static
152
169
  * @public
153
170
  * @param {Object<string, any>|string} json A JSON Object or JSON String
171
+ * @param {number} siteId The Site ID associated with this Packing Line
154
172
  * @return {PackingLineModel}
155
173
  */
156
- static fromJSON(json)
174
+ static fromJSON(json, siteId)
157
175
  {
158
- let model = new PackingLineModel();
176
+ let model = new PackingLineModel(siteId);
159
177
 
160
178
  /**
161
179
  * The JSON Object
@@ -289,6 +307,23 @@ class PackingLineModel extends BaseModel
289
307
  }());
290
308
  }
291
309
 
310
+ if('secondaryPackingLine' in jsonObject)
311
+ {
312
+ model.secondaryPackingLine = (function(){
313
+ if(jsonObject['secondaryPackingLine'] === null)
314
+ {
315
+ return null;
316
+ }
317
+
318
+ if(typeof jsonObject['secondaryPackingLine'] !== 'object')
319
+ {
320
+ return Object(jsonObject['secondaryPackingLine']);
321
+ }
322
+
323
+ return jsonObject['secondaryPackingLine'];
324
+ }());
325
+ }
326
+
292
327
  if('automation' in jsonObject)
293
328
  {
294
329
  model.automation = (function(){
@@ -491,6 +526,38 @@ class PackingLineModel extends BaseModel
491
526
  pointsObject.finishFocusMeetingRequest = 0;
492
527
  }
493
528
 
529
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftStatus' in jsonObject['shiftManagement'].points)
530
+ {
531
+ pointsObject.currentShiftStatus = (function(){
532
+ if(typeof jsonObject['shiftManagement'].points.currentShiftStatus !== 'number')
533
+ {
534
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftStatus)) ? Number(jsonObject['shiftManagement'].points.currentShiftStatus) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftStatus));
535
+ }
536
+
537
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftStatus) ? jsonObject['shiftManagement'].points.currentShiftStatus : Math.floor(jsonObject['shiftManagement'].points.currentShiftStatus);
538
+ }());
539
+ }
540
+ else
541
+ {
542
+ pointsObject.currentShiftStatus = 0;
543
+ }
544
+
545
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftModifyHourlyEntryRequest' in jsonObject['shiftManagement'].points)
546
+ {
547
+ pointsObject.currentShiftModifyHourlyEntryRequest = (function(){
548
+ if(typeof jsonObject['shiftManagement'].points.currentShiftModifyHourlyEntryRequest !== 'number')
549
+ {
550
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftModifyHourlyEntryRequest)) ? Number(jsonObject['shiftManagement'].points.currentShiftModifyHourlyEntryRequest) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftModifyHourlyEntryRequest));
551
+ }
552
+
553
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftModifyHourlyEntryRequest) ? jsonObject['shiftManagement'].points.currentShiftModifyHourlyEntryRequest : Math.floor(jsonObject['shiftManagement'].points.currentShiftModifyHourlyEntryRequest);
554
+ }());
555
+ }
556
+ else
557
+ {
558
+ pointsObject.currentShiftModifyHourlyEntryRequest = 0;
559
+ }
560
+
494
561
  if(typeof jsonObject['shiftManagement'].points === 'object' && 'shiftSchedules' in jsonObject['shiftManagement'].points)
495
562
  {
496
563
  pointsObject.shiftSchedules = (function(){
@@ -506,6 +573,326 @@ class PackingLineModel extends BaseModel
506
573
  {
507
574
  pointsObject.shiftSchedules = 0;
508
575
  }
576
+
577
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftClass1TraysPerHourTarget' in jsonObject['shiftManagement'].points)
578
+ {
579
+ pointsObject.currentShiftClass1TraysPerHourTarget = (function(){
580
+ if(typeof jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourTarget !== 'number')
581
+ {
582
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourTarget)) ? Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourTarget) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourTarget));
583
+ }
584
+
585
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourTarget) ? jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourTarget : Math.floor(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourTarget);
586
+ }());
587
+ }
588
+ else
589
+ {
590
+ pointsObject.currentShiftClass1TraysPerHourTarget = 0;
591
+ }
592
+
593
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftClass1TraysPerHourAdjustedTarget' in jsonObject['shiftManagement'].points)
594
+ {
595
+ pointsObject.currentShiftClass1TraysPerHourAdjustedTarget = (function(){
596
+ if(typeof jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourAdjustedTarget !== 'number')
597
+ {
598
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourAdjustedTarget)) ? Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourAdjustedTarget) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourAdjustedTarget));
599
+ }
600
+
601
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourAdjustedTarget) ? jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourAdjustedTarget : Math.floor(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHourAdjustedTarget);
602
+ }());
603
+ }
604
+ else
605
+ {
606
+ pointsObject.currentShiftClass1TraysPerHourAdjustedTarget = 0;
607
+ }
608
+
609
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftClass1TraysPerHour' in jsonObject['shiftManagement'].points)
610
+ {
611
+ pointsObject.currentShiftClass1TraysPerHour = (function(){
612
+ if(typeof jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHour !== 'number')
613
+ {
614
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHour)) ? Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHour) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHour));
615
+ }
616
+
617
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHour) ? jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHour : Math.floor(jsonObject['shiftManagement'].points.currentShiftClass1TraysPerHour);
618
+ }());
619
+ }
620
+ else
621
+ {
622
+ pointsObject.currentShiftClass1TraysPerHour = 0;
623
+ }
624
+
625
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftCostPerTrayTarget' in jsonObject['shiftManagement'].points)
626
+ {
627
+ pointsObject.currentShiftCostPerTrayTarget = (function(){
628
+ if(typeof jsonObject['shiftManagement'].points.currentShiftCostPerTrayTarget !== 'number')
629
+ {
630
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftCostPerTrayTarget)) ? Number(jsonObject['shiftManagement'].points.currentShiftCostPerTrayTarget) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftCostPerTrayTarget));
631
+ }
632
+
633
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftCostPerTrayTarget) ? jsonObject['shiftManagement'].points.currentShiftCostPerTrayTarget : Math.floor(jsonObject['shiftManagement'].points.currentShiftCostPerTrayTarget);
634
+ }());
635
+ }
636
+ else
637
+ {
638
+ pointsObject.currentShiftCostPerTrayTarget = 0;
639
+ }
640
+
641
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftCostPerTrayAdjustedTarget' in jsonObject['shiftManagement'].points)
642
+ {
643
+ pointsObject.currentShiftCostPerTrayAdjustedTarget = (function(){
644
+ if(typeof jsonObject['shiftManagement'].points.currentShiftCostPerTrayAdjustedTarget !== 'number')
645
+ {
646
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftCostPerTrayAdjustedTarget)) ? Number(jsonObject['shiftManagement'].points.currentShiftCostPerTrayAdjustedTarget) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftCostPerTrayAdjustedTarget));
647
+ }
648
+
649
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftCostPerTrayAdjustedTarget) ? jsonObject['shiftManagement'].points.currentShiftCostPerTrayAdjustedTarget : Math.floor(jsonObject['shiftManagement'].points.currentShiftCostPerTrayAdjustedTarget);
650
+ }());
651
+ }
652
+ else
653
+ {
654
+ pointsObject.currentShiftCostPerTrayAdjustedTarget = 0;
655
+ }
656
+
657
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftCostPerTray' in jsonObject['shiftManagement'].points)
658
+ {
659
+ pointsObject.currentShiftCostPerTray = (function(){
660
+ if(typeof jsonObject['shiftManagement'].points.currentShiftCostPerTray !== 'number')
661
+ {
662
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftCostPerTray)) ? Number(jsonObject['shiftManagement'].points.currentShiftCostPerTray) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftCostPerTray));
663
+ }
664
+
665
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftCostPerTray) ? jsonObject['shiftManagement'].points.currentShiftCostPerTray : Math.floor(jsonObject['shiftManagement'].points.currentShiftCostPerTray);
666
+ }());
667
+ }
668
+ else
669
+ {
670
+ pointsObject.currentShiftCostPerTray = 0;
671
+ }
672
+
673
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftManningTarget' in jsonObject['shiftManagement'].points)
674
+ {
675
+ pointsObject.currentShiftManningTarget = (function(){
676
+ if(typeof jsonObject['shiftManagement'].points.currentShiftManningTarget !== 'number')
677
+ {
678
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftManningTarget)) ? Number(jsonObject['shiftManagement'].points.currentShiftManningTarget) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftManningTarget));
679
+ }
680
+
681
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftManningTarget) ? jsonObject['shiftManagement'].points.currentShiftManningTarget : Math.floor(jsonObject['shiftManagement'].points.currentShiftManningTarget);
682
+ }());
683
+ }
684
+ else
685
+ {
686
+ pointsObject.currentShiftManningTarget = 0;
687
+ }
688
+
689
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftClass1Manning' in jsonObject['shiftManagement'].points)
690
+ {
691
+ pointsObject.currentShiftClass1Manning = (function(){
692
+ if(typeof jsonObject['shiftManagement'].points.currentShiftClass1Manning !== 'number')
693
+ {
694
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftClass1Manning)) ? Number(jsonObject['shiftManagement'].points.currentShiftClass1Manning) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftClass1Manning));
695
+ }
696
+
697
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftClass1Manning) ? jsonObject['shiftManagement'].points.currentShiftClass1Manning : Math.floor(jsonObject['shiftManagement'].points.currentShiftClass1Manning);
698
+ }());
699
+ }
700
+ else
701
+ {
702
+ pointsObject.currentShiftClass1Manning = 0;
703
+ }
704
+
705
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftClass2Manning' in jsonObject['shiftManagement'].points)
706
+ {
707
+ pointsObject.currentShiftClass2Manning = (function(){
708
+ if(typeof jsonObject['shiftManagement'].points.currentShiftClass2Manning !== 'number')
709
+ {
710
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftClass2Manning)) ? Number(jsonObject['shiftManagement'].points.currentShiftClass2Manning) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftClass2Manning));
711
+ }
712
+
713
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftClass2Manning) ? jsonObject['shiftManagement'].points.currentShiftClass2Manning : Math.floor(jsonObject['shiftManagement'].points.currentShiftClass2Manning);
714
+ }());
715
+ }
716
+ else
717
+ {
718
+ pointsObject.currentShiftClass2Manning = 0;
719
+ }
720
+
721
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftQualityR600IdealTarget' in jsonObject['shiftManagement'].points)
722
+ {
723
+ pointsObject.currentShiftQualityR600IdealTarget = (function(){
724
+ if(typeof jsonObject['shiftManagement'].points.currentShiftQualityR600IdealTarget !== 'number')
725
+ {
726
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftQualityR600IdealTarget)) ? Number(jsonObject['shiftManagement'].points.currentShiftQualityR600IdealTarget) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftQualityR600IdealTarget));
727
+ }
728
+
729
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftQualityR600IdealTarget) ? jsonObject['shiftManagement'].points.currentShiftQualityR600IdealTarget : Math.floor(jsonObject['shiftManagement'].points.currentShiftQualityR600IdealTarget);
730
+ }());
731
+ }
732
+ else
733
+ {
734
+ pointsObject.currentShiftQualityR600IdealTarget = 0;
735
+ }
736
+
737
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftQualityR600Ideal' in jsonObject['shiftManagement'].points)
738
+ {
739
+ pointsObject.currentShiftQualityR600Ideal = (function(){
740
+ if(typeof jsonObject['shiftManagement'].points.currentShiftQualityR600Ideal !== 'number')
741
+ {
742
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftQualityR600Ideal)) ? Number(jsonObject['shiftManagement'].points.currentShiftQualityR600Ideal) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftQualityR600Ideal));
743
+ }
744
+
745
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftQualityR600Ideal) ? jsonObject['shiftManagement'].points.currentShiftQualityR600Ideal : Math.floor(jsonObject['shiftManagement'].points.currentShiftQualityR600Ideal);
746
+ }());
747
+ }
748
+ else
749
+ {
750
+ pointsObject.currentShiftQualityR600Ideal = 0;
751
+ }
752
+
753
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'currentShiftScorePercentage' in jsonObject['shiftManagement'].points)
754
+ {
755
+ pointsObject.currentShiftScorePercentage = (function(){
756
+ if(typeof jsonObject['shiftManagement'].points.currentShiftScorePercentage !== 'number')
757
+ {
758
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.currentShiftScorePercentage)) ? Number(jsonObject['shiftManagement'].points.currentShiftScorePercentage) : Math.floor(Number(jsonObject['shiftManagement'].points.currentShiftScorePercentage));
759
+ }
760
+
761
+ return Number.isInteger(jsonObject['shiftManagement'].points.currentShiftScorePercentage) ? jsonObject['shiftManagement'].points.currentShiftScorePercentage : Math.floor(jsonObject['shiftManagement'].points.currentShiftScorePercentage);
762
+ }());
763
+ }
764
+ else
765
+ {
766
+ pointsObject.currentShiftScorePercentage = 0;
767
+ }
768
+
769
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'class1TraysPerHourTargets' in jsonObject['shiftManagement'].points)
770
+ {
771
+ pointsObject.class1TraysPerHourTargets = (function(){
772
+ if(typeof jsonObject['shiftManagement'].points.class1TraysPerHourTargets !== 'number')
773
+ {
774
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.class1TraysPerHourTargets)) ? Number(jsonObject['shiftManagement'].points.class1TraysPerHourTargets) : Math.floor(Number(jsonObject['shiftManagement'].points.class1TraysPerHourTargets));
775
+ }
776
+
777
+ return Number.isInteger(jsonObject['shiftManagement'].points.class1TraysPerHourTargets) ? jsonObject['shiftManagement'].points.class1TraysPerHourTargets : Math.floor(jsonObject['shiftManagement'].points.class1TraysPerHourTargets);
778
+ }());
779
+ }
780
+ else
781
+ {
782
+ pointsObject.class1TraysPerHourTargets = 0;
783
+ }
784
+
785
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'costPerTrayTargets' in jsonObject['shiftManagement'].points)
786
+ {
787
+ pointsObject.costPerTrayTargets = (function(){
788
+ if(typeof jsonObject['shiftManagement'].points.costPerTrayTargets !== 'number')
789
+ {
790
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.costPerTrayTargets)) ? Number(jsonObject['shiftManagement'].points.costPerTrayTargets) : Math.floor(Number(jsonObject['shiftManagement'].points.costPerTrayTargets));
791
+ }
792
+
793
+ return Number.isInteger(jsonObject['shiftManagement'].points.costPerTrayTargets) ? jsonObject['shiftManagement'].points.costPerTrayTargets : Math.floor(jsonObject['shiftManagement'].points.costPerTrayTargets);
794
+ }());
795
+ }
796
+ else
797
+ {
798
+ pointsObject.costPerTrayTargets = 0;
799
+ }
800
+
801
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'manningTargets' in jsonObject['shiftManagement'].points)
802
+ {
803
+ pointsObject.manningTargets = (function(){
804
+ if(typeof jsonObject['shiftManagement'].points.manningTargets !== 'number')
805
+ {
806
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.manningTargets)) ? Number(jsonObject['shiftManagement'].points.manningTargets) : Math.floor(Number(jsonObject['shiftManagement'].points.manningTargets));
807
+ }
808
+
809
+ return Number.isInteger(jsonObject['shiftManagement'].points.manningTargets) ? jsonObject['shiftManagement'].points.manningTargets : Math.floor(jsonObject['shiftManagement'].points.manningTargets);
810
+ }());
811
+ }
812
+ else
813
+ {
814
+ pointsObject.manningTargets = 0;
815
+ }
816
+
817
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'qualityR600IdealTargets' in jsonObject['shiftManagement'].points)
818
+ {
819
+ pointsObject.qualityR600IdealTargets = (function(){
820
+ if(typeof jsonObject['shiftManagement'].points.qualityR600IdealTargets !== 'number')
821
+ {
822
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.qualityR600IdealTargets)) ? Number(jsonObject['shiftManagement'].points.qualityR600IdealTargets) : Math.floor(Number(jsonObject['shiftManagement'].points.qualityR600IdealTargets));
823
+ }
824
+
825
+ return Number.isInteger(jsonObject['shiftManagement'].points.qualityR600IdealTargets) ? jsonObject['shiftManagement'].points.qualityR600IdealTargets : Math.floor(jsonObject['shiftManagement'].points.qualityR600IdealTargets);
826
+ }());
827
+ }
828
+ else
829
+ {
830
+ pointsObject.qualityR600IdealTargets = 0;
831
+ }
832
+
833
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'costPerManningUnitHour' in jsonObject['shiftManagement'].points)
834
+ {
835
+ pointsObject.costPerManningUnitHour = (function(){
836
+ if(typeof jsonObject['shiftManagement'].points.costPerManningUnitHour !== 'number')
837
+ {
838
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.costPerManningUnitHour)) ? Number(jsonObject['shiftManagement'].points.costPerManningUnitHour) : Math.floor(Number(jsonObject['shiftManagement'].points.costPerManningUnitHour));
839
+ }
840
+
841
+ return Number.isInteger(jsonObject['shiftManagement'].points.costPerManningUnitHour) ? jsonObject['shiftManagement'].points.costPerManningUnitHour : Math.floor(jsonObject['shiftManagement'].points.costPerManningUnitHour);
842
+ }());
843
+ }
844
+ else
845
+ {
846
+ pointsObject.costPerManningUnitHour = 0;
847
+ }
848
+
849
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'class1TraysPerHourScoreWeighting' in jsonObject['shiftManagement'].points)
850
+ {
851
+ pointsObject.class1TraysPerHourScoreWeighting = (function(){
852
+ if(typeof jsonObject['shiftManagement'].points.class1TraysPerHourScoreWeighting !== 'number')
853
+ {
854
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.class1TraysPerHourScoreWeighting)) ? Number(jsonObject['shiftManagement'].points.class1TraysPerHourScoreWeighting) : Math.floor(Number(jsonObject['shiftManagement'].points.class1TraysPerHourScoreWeighting));
855
+ }
856
+
857
+ return Number.isInteger(jsonObject['shiftManagement'].points.class1TraysPerHourScoreWeighting) ? jsonObject['shiftManagement'].points.class1TraysPerHourScoreWeighting : Math.floor(jsonObject['shiftManagement'].points.class1TraysPerHourScoreWeighting);
858
+ }());
859
+ }
860
+ else
861
+ {
862
+ pointsObject.class1TraysPerHourScoreWeighting = 0;
863
+ }
864
+
865
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'costPerTrayScoreWeighting' in jsonObject['shiftManagement'].points)
866
+ {
867
+ pointsObject.costPerTrayScoreWeighting = (function(){
868
+ if(typeof jsonObject['shiftManagement'].points.costPerTrayScoreWeighting !== 'number')
869
+ {
870
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.costPerTrayScoreWeighting)) ? Number(jsonObject['shiftManagement'].points.costPerTrayScoreWeighting) : Math.floor(Number(jsonObject['shiftManagement'].points.costPerTrayScoreWeighting));
871
+ }
872
+
873
+ return Number.isInteger(jsonObject['shiftManagement'].points.costPerTrayScoreWeighting) ? jsonObject['shiftManagement'].points.costPerTrayScoreWeighting : Math.floor(jsonObject['shiftManagement'].points.costPerTrayScoreWeighting);
874
+ }());
875
+ }
876
+ else
877
+ {
878
+ pointsObject.costPerTrayScoreWeighting = 0;
879
+ }
880
+
881
+ if(typeof jsonObject['shiftManagement'].points === 'object' && 'qualityR600IdealScoreWeighting' in jsonObject['shiftManagement'].points)
882
+ {
883
+ pointsObject.qualityR600IdealScoreWeighting = (function(){
884
+ if(typeof jsonObject['shiftManagement'].points.qualityR600IdealScoreWeighting !== 'number')
885
+ {
886
+ return Number.isInteger(Number(jsonObject['shiftManagement'].points.qualityR600IdealScoreWeighting)) ? Number(jsonObject['shiftManagement'].points.qualityR600IdealScoreWeighting) : Math.floor(Number(jsonObject['shiftManagement'].points.qualityR600IdealScoreWeighting));
887
+ }
888
+
889
+ return Number.isInteger(jsonObject['shiftManagement'].points.qualityR600IdealScoreWeighting) ? jsonObject['shiftManagement'].points.qualityR600IdealScoreWeighting : Math.floor(jsonObject['shiftManagement'].points.qualityR600IdealScoreWeighting);
890
+ }());
891
+ }
892
+ else
893
+ {
894
+ pointsObject.qualityR600IdealScoreWeighting = 0;
895
+ }
509
896
 
510
897
  return pointsObject;
511
898
  }());
@@ -531,12 +918,215 @@ class PackingLineModel extends BaseModel
531
918
 
532
919
  pointsDefaultValue.finishFocusMeetingRequest = 0;
533
920
 
921
+ pointsDefaultValue.currentShiftStatus = 0;
922
+
923
+ pointsDefaultValue.currentShiftModifyHourlyEntryRequest = 0;
924
+
534
925
  pointsDefaultValue.shiftSchedules = 0;
535
926
 
927
+ pointsDefaultValue.currentShiftClass1TraysPerHourTarget = 0;
928
+
929
+ pointsDefaultValue.currentShiftClass1TraysPerHourAdjustedTarget = 0;
930
+
931
+ pointsDefaultValue.currentShiftClass1TraysPerHour = 0;
932
+
933
+ pointsDefaultValue.currentShiftCostPerTrayTarget = 0;
934
+
935
+ pointsDefaultValue.currentShiftCostPerTrayAdjustedTarget = 0;
936
+
937
+ pointsDefaultValue.currentShiftCostPerTray = 0;
938
+
939
+ pointsDefaultValue.currentShiftManningTarget = 0;
940
+
941
+ pointsDefaultValue.currentShiftClass1Manning = 0;
942
+
943
+ pointsDefaultValue.currentShiftClass2Manning = 0;
944
+
945
+ pointsDefaultValue.currentShiftQualityR600IdealTarget = 0;
946
+
947
+ pointsDefaultValue.currentShiftQualityR600Ideal = 0;
948
+
949
+ pointsDefaultValue.currentShiftScorePercentage = 0;
950
+
951
+ pointsDefaultValue.class1TraysPerHourTargets = 0;
952
+
953
+ pointsDefaultValue.costPerTrayTargets = 0;
954
+
955
+ pointsDefaultValue.manningTargets = 0;
956
+
957
+ pointsDefaultValue.qualityR600IdealTargets = 0;
958
+
959
+ pointsDefaultValue.costPerManningUnitHour = 0;
960
+
961
+ pointsDefaultValue.class1TraysPerHourScoreWeighting = 0;
962
+
963
+ pointsDefaultValue.costPerTrayScoreWeighting = 0;
964
+
965
+ pointsDefaultValue.qualityR600IdealScoreWeighting = 0;
966
+
536
967
  return pointsDefaultValue;
537
968
  }());
538
969
  }
539
970
 
971
+ if(typeof jsonObject['shiftManagement'] === 'object' && 'customQualityConfiguration' in jsonObject['shiftManagement'])
972
+ {
973
+ shiftManagementObject.customQualityConfiguration = (function(){
974
+ if(Array.isArray(jsonObject['shiftManagement'].customQualityConfiguration) !== true)
975
+ {
976
+ return [];
977
+ }
978
+
979
+ return jsonObject['shiftManagement'].customQualityConfiguration.map((customQualityConfigurationItem) => {
980
+ return (function(){
981
+ let customQualityConfigurationItemObject = {};
982
+
983
+ if(typeof customQualityConfigurationItem === 'object' && 'id' in customQualityConfigurationItem)
984
+ {
985
+ customQualityConfigurationItemObject.id = (function(){
986
+ if(typeof customQualityConfigurationItem.id !== 'string')
987
+ {
988
+ return String(customQualityConfigurationItem.id);
989
+ }
990
+
991
+ return customQualityConfigurationItem.id;
992
+ }());
993
+ }
994
+ else
995
+ {
996
+ customQualityConfigurationItemObject.id = "";
997
+ }
998
+
999
+ if(typeof customQualityConfigurationItem === 'object' && 'name' in customQualityConfigurationItem)
1000
+ {
1001
+ customQualityConfigurationItemObject.name = (function(){
1002
+ if(typeof customQualityConfigurationItem.name !== 'string')
1003
+ {
1004
+ return String(customQualityConfigurationItem.name);
1005
+ }
1006
+
1007
+ return customQualityConfigurationItem.name;
1008
+ }());
1009
+ }
1010
+ else
1011
+ {
1012
+ customQualityConfigurationItemObject.name = "";
1013
+ }
1014
+
1015
+ if(typeof customQualityConfigurationItem === 'object' && 'type' in customQualityConfigurationItem)
1016
+ {
1017
+ customQualityConfigurationItemObject.type = (function(){
1018
+ if(typeof customQualityConfigurationItem.type !== 'string')
1019
+ {
1020
+ return String(customQualityConfigurationItem.type);
1021
+ }
1022
+
1023
+ return customQualityConfigurationItem.type;
1024
+ }());
1025
+ }
1026
+ else
1027
+ {
1028
+ customQualityConfigurationItemObject.type = "";
1029
+ }
1030
+
1031
+ if(typeof customQualityConfigurationItem === 'object' && 'points' in customQualityConfigurationItem)
1032
+ {
1033
+ customQualityConfigurationItemObject.points = (function(){
1034
+ let pointsObject = {};
1035
+
1036
+ if(typeof customQualityConfigurationItem.points === 'object' && 'currentShiftCustomQualityTarget' in customQualityConfigurationItem.points)
1037
+ {
1038
+ pointsObject.currentShiftCustomQualityTarget = (function(){
1039
+ if(typeof customQualityConfigurationItem.points.currentShiftCustomQualityTarget !== 'number')
1040
+ {
1041
+ return Number.isInteger(Number(customQualityConfigurationItem.points.currentShiftCustomQualityTarget)) ? Number(customQualityConfigurationItem.points.currentShiftCustomQualityTarget) : Math.floor(Number(customQualityConfigurationItem.points.currentShiftCustomQualityTarget));
1042
+ }
1043
+
1044
+ return Number.isInteger(customQualityConfigurationItem.points.currentShiftCustomQualityTarget) ? customQualityConfigurationItem.points.currentShiftCustomQualityTarget : Math.floor(customQualityConfigurationItem.points.currentShiftCustomQualityTarget);
1045
+ }());
1046
+ }
1047
+ else
1048
+ {
1049
+ pointsObject.currentShiftCustomQualityTarget = 0;
1050
+ }
1051
+
1052
+ if(typeof customQualityConfigurationItem.points === 'object' && 'currentShiftCustomQualityValue' in customQualityConfigurationItem.points)
1053
+ {
1054
+ pointsObject.currentShiftCustomQualityValue = (function(){
1055
+ if(typeof customQualityConfigurationItem.points.currentShiftCustomQualityValue !== 'number')
1056
+ {
1057
+ return Number.isInteger(Number(customQualityConfigurationItem.points.currentShiftCustomQualityValue)) ? Number(customQualityConfigurationItem.points.currentShiftCustomQualityValue) : Math.floor(Number(customQualityConfigurationItem.points.currentShiftCustomQualityValue));
1058
+ }
1059
+
1060
+ return Number.isInteger(customQualityConfigurationItem.points.currentShiftCustomQualityValue) ? customQualityConfigurationItem.points.currentShiftCustomQualityValue : Math.floor(customQualityConfigurationItem.points.currentShiftCustomQualityValue);
1061
+ }());
1062
+ }
1063
+ else
1064
+ {
1065
+ pointsObject.currentShiftCustomQualityValue = 0;
1066
+ }
1067
+
1068
+ if(typeof customQualityConfigurationItem.points === 'object' && 'customQualityTargets' in customQualityConfigurationItem.points)
1069
+ {
1070
+ pointsObject.customQualityTargets = (function(){
1071
+ if(typeof customQualityConfigurationItem.points.customQualityTargets !== 'number')
1072
+ {
1073
+ return Number.isInteger(Number(customQualityConfigurationItem.points.customQualityTargets)) ? Number(customQualityConfigurationItem.points.customQualityTargets) : Math.floor(Number(customQualityConfigurationItem.points.customQualityTargets));
1074
+ }
1075
+
1076
+ return Number.isInteger(customQualityConfigurationItem.points.customQualityTargets) ? customQualityConfigurationItem.points.customQualityTargets : Math.floor(customQualityConfigurationItem.points.customQualityTargets);
1077
+ }());
1078
+ }
1079
+ else
1080
+ {
1081
+ pointsObject.customQualityTargets = 0;
1082
+ }
1083
+
1084
+ if(typeof customQualityConfigurationItem.points === 'object' && 'customQualityScoreWeighting' in customQualityConfigurationItem.points)
1085
+ {
1086
+ pointsObject.customQualityScoreWeighting = (function(){
1087
+ if(typeof customQualityConfigurationItem.points.customQualityScoreWeighting !== 'number')
1088
+ {
1089
+ return Number.isInteger(Number(customQualityConfigurationItem.points.customQualityScoreWeighting)) ? Number(customQualityConfigurationItem.points.customQualityScoreWeighting) : Math.floor(Number(customQualityConfigurationItem.points.customQualityScoreWeighting));
1090
+ }
1091
+
1092
+ return Number.isInteger(customQualityConfigurationItem.points.customQualityScoreWeighting) ? customQualityConfigurationItem.points.customQualityScoreWeighting : Math.floor(customQualityConfigurationItem.points.customQualityScoreWeighting);
1093
+ }());
1094
+ }
1095
+ else
1096
+ {
1097
+ pointsObject.customQualityScoreWeighting = 0;
1098
+ }
1099
+
1100
+ return pointsObject;
1101
+ }());
1102
+ }
1103
+ else
1104
+ {
1105
+ customQualityConfigurationItemObject.points = (function(){
1106
+ let pointsDefaultValue = {};
1107
+
1108
+ pointsDefaultValue.currentShiftCustomQualityTarget = 0;
1109
+
1110
+ pointsDefaultValue.currentShiftCustomQualityValue = 0;
1111
+
1112
+ pointsDefaultValue.customQualityTargets = 0;
1113
+
1114
+ pointsDefaultValue.customQualityScoreWeighting = 0;
1115
+
1116
+ return pointsDefaultValue;
1117
+ }());
1118
+ }
1119
+
1120
+ return customQualityConfigurationItemObject;
1121
+ }());
1122
+ });
1123
+ }());
1124
+ }
1125
+ else
1126
+ {
1127
+ shiftManagementObject.customQualityConfiguration = [];
1128
+ }
1129
+
540
1130
  if(typeof jsonObject['shiftManagement'] === 'object' && 'enabled' in jsonObject['shiftManagement'])
541
1131
  {
542
1132
  shiftManagementObject.enabled = (function(){
@@ -552,6 +1142,130 @@ class PackingLineModel extends BaseModel
552
1142
  {
553
1143
  shiftManagementObject.enabled = false;
554
1144
  }
1145
+
1146
+ if(typeof jsonObject['shiftManagement'] === 'object' && 'taskDefinitions' in jsonObject['shiftManagement'])
1147
+ {
1148
+ shiftManagementObject.taskDefinitions = (function(){
1149
+ if(Array.isArray(jsonObject['shiftManagement'].taskDefinitions) !== true)
1150
+ {
1151
+ return [];
1152
+ }
1153
+
1154
+ return jsonObject['shiftManagement'].taskDefinitions.map((taskDefinitionsItem) => {
1155
+ return (function(){
1156
+ let taskDefinitionsItemObject = {};
1157
+
1158
+ if(typeof taskDefinitionsItem === 'object' && 'type' in taskDefinitionsItem)
1159
+ {
1160
+ taskDefinitionsItemObject.type = (function(){
1161
+ if(typeof taskDefinitionsItem.type !== 'string')
1162
+ {
1163
+ return String(taskDefinitionsItem.type);
1164
+ }
1165
+
1166
+ return taskDefinitionsItem.type;
1167
+ }());
1168
+ }
1169
+ else
1170
+ {
1171
+ taskDefinitionsItemObject.type = "";
1172
+ }
1173
+
1174
+ if(typeof taskDefinitionsItem === 'object' && 'tags' in taskDefinitionsItem)
1175
+ {
1176
+ taskDefinitionsItemObject.tags = (function(){
1177
+ if(Array.isArray(taskDefinitionsItem.tags) !== true)
1178
+ {
1179
+ return [];
1180
+ }
1181
+
1182
+ return taskDefinitionsItem.tags.map((tagsItem) => {
1183
+ return (function(){
1184
+ let tagsItemObject = {};
1185
+
1186
+ if(typeof tagsItem === 'object' && 'id' in tagsItem)
1187
+ {
1188
+ tagsItemObject.id = (function(){
1189
+ if(typeof tagsItem.id !== 'string')
1190
+ {
1191
+ return String(tagsItem.id);
1192
+ }
1193
+
1194
+ return tagsItem.id;
1195
+ }());
1196
+ }
1197
+ else
1198
+ {
1199
+ tagsItemObject.id = "";
1200
+ }
1201
+
1202
+ if(typeof tagsItem === 'object' && 'name' in tagsItem)
1203
+ {
1204
+ tagsItemObject.name = (function(){
1205
+ if(typeof tagsItem.name !== 'string')
1206
+ {
1207
+ return String(tagsItem.name);
1208
+ }
1209
+
1210
+ return tagsItem.name;
1211
+ }());
1212
+ }
1213
+ else
1214
+ {
1215
+ tagsItemObject.name = "";
1216
+ }
1217
+
1218
+ if(typeof tagsItem === 'object' && 'color' in tagsItem)
1219
+ {
1220
+ tagsItemObject.color = (function(){
1221
+ if(typeof tagsItem.color !== 'string')
1222
+ {
1223
+ return String(tagsItem.color);
1224
+ }
1225
+
1226
+ return tagsItem.color;
1227
+ }());
1228
+ }
1229
+ else
1230
+ {
1231
+ tagsItemObject.color = "";
1232
+ }
1233
+
1234
+ if(typeof tagsItem === 'object' && 'deleted' in tagsItem)
1235
+ {
1236
+ tagsItemObject.deleted = (function(){
1237
+ if(typeof tagsItem.deleted !== 'boolean')
1238
+ {
1239
+ return Boolean(tagsItem.deleted);
1240
+ }
1241
+
1242
+ return tagsItem.deleted;
1243
+ }());
1244
+ }
1245
+ else
1246
+ {
1247
+ tagsItemObject.deleted = false;
1248
+ }
1249
+
1250
+ return tagsItemObject;
1251
+ }());
1252
+ });
1253
+ }());
1254
+ }
1255
+ else
1256
+ {
1257
+ taskDefinitionsItemObject.tags = [];
1258
+ }
1259
+
1260
+ return taskDefinitionsItemObject;
1261
+ }());
1262
+ });
1263
+ }());
1264
+ }
1265
+ else
1266
+ {
1267
+ shiftManagementObject.taskDefinitions = [];
1268
+ }
555
1269
 
556
1270
  return shiftManagementObject;
557
1271
  }());