@ricado/api-client 2.2.0 → 2.3.2

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 (136) hide show
  1. package/dist/ricado.api.client.js +1 -1
  2. package/lib/Controllers/Packhouse/Site/BinTipBinController.js +267 -0
  3. package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +267 -0
  4. package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +267 -0
  5. package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +267 -0
  6. package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +267 -0
  7. package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +267 -0
  8. package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +267 -0
  9. package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +267 -0
  10. package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +267 -0
  11. package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -0
  12. package/lib/Controllers/Packhouse/Site/PackrunController.js +267 -0
  13. package/lib/Controllers/Packhouse/Site/RejectBinController.js +267 -0
  14. package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +267 -0
  15. package/lib/Controllers/Packhouse/Site/ShiftController.js +267 -0
  16. package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +267 -0
  17. package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +267 -0
  18. package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +267 -0
  19. package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +267 -0
  20. package/lib/Controllers/Site/PermanentObjectDataController.js +267 -0
  21. package/lib/DataItems/PointValueItem.js +3 -3
  22. package/lib/Models/AccountPolicyModel.js +7 -7
  23. package/lib/Models/ApiAccountModel.js +7 -7
  24. package/lib/Models/CompanyModel.js +5 -5
  25. package/lib/Models/FirebaseTokenModel.js +8 -8
  26. package/lib/Models/Packhouse/Site/BinTipBinModel.js +13 -13
  27. package/lib/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  28. package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  29. package/lib/Models/Packhouse/Site/CompacSizerModel.js +14 -14
  30. package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  31. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  32. package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  33. package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  34. package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  35. package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  36. package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +10 -10
  37. package/lib/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  38. package/lib/Models/Packhouse/Site/PackTypeModel.js +8 -8
  39. package/lib/Models/Packhouse/Site/PackingLineModel.js +60 -16
  40. package/lib/Models/Packhouse/Site/PackrunModel.js +18 -18
  41. package/lib/Models/Packhouse/Site/RejectBinModel.js +9 -9
  42. package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
  43. package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  44. package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  45. package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +44 -44
  46. package/lib/Models/Packhouse/Site/ShiftModel.js +26 -19
  47. package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +14 -14
  48. package/lib/Models/Packhouse/Site/ShiftTaskModel.js +14 -14
  49. package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
  50. package/lib/Models/Packhouse/Site/VarietyModel.js +8 -8
  51. package/lib/Models/RTUModel.js +6 -6
  52. package/lib/Models/RTUPluginModel.js +5 -5
  53. package/lib/Models/Site/AlarmGroupModel.js +7 -7
  54. package/lib/Models/Site/AlarmModel.js +17 -17
  55. package/lib/Models/Site/DefinitionModel.js +6 -6
  56. package/lib/Models/Site/PermanentObjectDataModel.js +8 -8
  57. package/lib/Models/Site/PermanentObjectModel.js +7 -7
  58. package/lib/Models/Site/PointModel.js +11 -11
  59. package/lib/Models/Site/TemporaryObjectModel.js +6 -6
  60. package/lib/Models/SiteModel.js +6 -6
  61. package/lib/Models/TokenModel.js +10 -10
  62. package/lib/Models/UserAccountActionTokenModel.js +11 -11
  63. package/lib/Models/UserAccountModel.js +10 -10
  64. package/lib/PackageVersion.js +1 -1
  65. package/lib/Points.js +22 -12
  66. package/lib/WebSocketHelper.js +29 -13
  67. package/lib/index.d.ts +715 -361
  68. package/lib/index.js +3 -3
  69. package/package.json +1 -1
  70. package/src/Controllers/Packhouse/Site/BinTipBinController.js +355 -0
  71. package/src/Controllers/Packhouse/Site/BinTipWeightController.js +355 -0
  72. package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +355 -0
  73. package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +355 -0
  74. package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +355 -0
  75. package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +355 -0
  76. package/src/Controllers/Packhouse/Site/DowntimeEventController.js +355 -0
  77. package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +355 -0
  78. package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +355 -0
  79. package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -0
  80. package/src/Controllers/Packhouse/Site/PackrunController.js +355 -0
  81. package/src/Controllers/Packhouse/Site/RejectBinController.js +355 -0
  82. package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +355 -0
  83. package/src/Controllers/Packhouse/Site/ShiftController.js +355 -0
  84. package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +355 -0
  85. package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +355 -0
  86. package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +355 -0
  87. package/src/Controllers/Packhouse/Site/ShiftTaskController.js +355 -0
  88. package/src/Controllers/Site/PermanentObjectDataController.js +355 -0
  89. package/src/DataItems/PointValueItem.js +3 -3
  90. package/src/Models/AccountPolicyModel.js +7 -7
  91. package/src/Models/ApiAccountModel.js +7 -7
  92. package/src/Models/CompanyModel.js +5 -5
  93. package/src/Models/FirebaseTokenModel.js +8 -8
  94. package/src/Models/Packhouse/Site/BinTipBinModel.js +13 -13
  95. package/src/Models/Packhouse/Site/BinTipWeightModel.js +9 -9
  96. package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +8 -8
  97. package/src/Models/Packhouse/Site/CompacSizerModel.js +14 -14
  98. package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +10 -10
  99. package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +8 -8
  100. package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +6 -6
  101. package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +12 -12
  102. package/src/Models/Packhouse/Site/DowntimeEventModel.js +14 -14
  103. package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +8 -8
  104. package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +10 -10
  105. package/src/Models/Packhouse/Site/GrowingMethodModel.js +6 -6
  106. package/src/Models/Packhouse/Site/PackTypeModel.js +8 -8
  107. package/src/Models/Packhouse/Site/PackingLineModel.js +66 -16
  108. package/src/Models/Packhouse/Site/PackrunModel.js +18 -18
  109. package/src/Models/Packhouse/Site/RejectBinModel.js +9 -9
  110. package/src/Models/Packhouse/Site/RejectBinScaleModel.js +23 -23
  111. package/src/Models/Packhouse/Site/RejectBinWeightModel.js +10 -10
  112. package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +12 -12
  113. package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +44 -44
  114. package/src/Models/Packhouse/Site/ShiftModel.js +29 -19
  115. package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +14 -14
  116. package/src/Models/Packhouse/Site/ShiftTaskModel.js +14 -14
  117. package/src/Models/Packhouse/Site/SoftSortBeltModel.js +7 -7
  118. package/src/Models/Packhouse/Site/VarietyModel.js +8 -8
  119. package/src/Models/RTUModel.js +6 -6
  120. package/src/Models/RTUPluginModel.js +5 -5
  121. package/src/Models/Site/AlarmGroupModel.js +7 -7
  122. package/src/Models/Site/AlarmModel.js +17 -17
  123. package/src/Models/Site/DefinitionModel.js +6 -6
  124. package/src/Models/Site/PermanentObjectDataModel.js +8 -8
  125. package/src/Models/Site/PermanentObjectModel.js +7 -7
  126. package/src/Models/Site/PointModel.js +11 -11
  127. package/src/Models/Site/TemporaryObjectModel.js +6 -6
  128. package/src/Models/SiteModel.js +6 -6
  129. package/src/Models/TokenModel.js +10 -10
  130. package/src/Models/UserAccountActionTokenModel.js +11 -11
  131. package/src/Models/UserAccountModel.js +10 -10
  132. package/src/PackageVersion.js +1 -1
  133. package/src/Points.js +24 -12
  134. package/src/WebSocketHelper.js +34 -13
  135. package/src/index.js +3 -3
  136. package/types/tslint.json +2 -1
@@ -31,7 +31,7 @@ class ShiftHourlyEntryModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The Packing Line ID this Hourly Entry is associated with
@@ -39,7 +39,7 @@ class ShiftHourlyEntryModel extends BaseModel
39
39
  * @type {string}
40
40
  * @public
41
41
  */
42
- this.packingLineId = undefined;
42
+ this.packingLineId = "";
43
43
 
44
44
  /**
45
45
  * The Shift ID this Hourly Entry is asssociated with
@@ -47,7 +47,7 @@ class ShiftHourlyEntryModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.shiftId = undefined;
50
+ this.shiftId = "";
51
51
 
52
52
  /**
53
53
  * When this Hourly Entry was Created
@@ -55,7 +55,7 @@ class ShiftHourlyEntryModel extends BaseModel
55
55
  * @type {Date}
56
56
  * @public
57
57
  */
58
- this.createdTimestamp = undefined;
58
+ this.createdTimestamp = new Date();
59
59
 
60
60
  /**
61
61
  * The Start Timestamp of this Hourly Entry
@@ -63,7 +63,7 @@ class ShiftHourlyEntryModel extends BaseModel
63
63
  * @type {Date}
64
64
  * @public
65
65
  */
66
- this.startTimestamp = undefined;
66
+ this.startTimestamp = new Date();
67
67
 
68
68
  /**
69
69
  * The End Timestamp of this Hourly Entry
@@ -71,7 +71,7 @@ class ShiftHourlyEntryModel extends BaseModel
71
71
  * @type {Date}
72
72
  * @public
73
73
  */
74
- this.endTimestamp = undefined;
74
+ this.endTimestamp = new Date();
75
75
 
76
76
  /**
77
77
  * The Number of People working in all Areas except Class 2 for this Hour
@@ -79,7 +79,7 @@ class ShiftHourlyEntryModel extends BaseModel
79
79
  * @type {?number}
80
80
  * @public
81
81
  */
82
- this.class1Manning = undefined;
82
+ this.class1Manning = null;
83
83
 
84
84
  /**
85
85
  * The Number of People working in the Class 2 Area for this Hour
@@ -87,7 +87,7 @@ class ShiftHourlyEntryModel extends BaseModel
87
87
  * @type {?number}
88
88
  * @public
89
89
  */
90
- this.class2Manning = undefined;
90
+ this.class2Manning = null;
91
91
 
92
92
  /**
93
93
  * The Average Target Number of People that should be working for this Hour
@@ -95,7 +95,7 @@ class ShiftHourlyEntryModel extends BaseModel
95
95
  * @type {?number}
96
96
  * @public
97
97
  */
98
- this.averageManningTarget = undefined;
98
+ this.averageManningTarget = null;
99
99
 
100
100
  /**
101
101
  * The Average Cost per Person working in all Areas for this Hour
@@ -103,7 +103,7 @@ class ShiftHourlyEntryModel extends BaseModel
103
103
  * @type {?number}
104
104
  * @public
105
105
  */
106
- this.averageCostPerManningUnit = undefined;
106
+ this.averageCostPerManningUnit = null;
107
107
 
108
108
  /**
109
109
  * The Percentage of Total Tray Equivalents that are Layered for this Hour
@@ -111,7 +111,7 @@ class ShiftHourlyEntryModel extends BaseModel
111
111
  * @type {?number}
112
112
  * @public
113
113
  */
114
- this.layeredTrayPercentage = undefined;
114
+ this.layeredTrayPercentage = null;
115
115
 
116
116
  /**
117
117
  * The Average Class 1 Percentage for this Hour
@@ -119,7 +119,7 @@ class ShiftHourlyEntryModel extends BaseModel
119
119
  * @type {?number}
120
120
  * @public
121
121
  */
122
- this.averageClass1Percentage = undefined;
122
+ this.averageClass1Percentage = null;
123
123
 
124
124
  /**
125
125
  * The Number of Quality R600 Samples that were Ideal for this Hour
@@ -127,7 +127,7 @@ class ShiftHourlyEntryModel extends BaseModel
127
127
  * @type {?number}
128
128
  * @public
129
129
  */
130
- this.qualityR600IdealSamplesPercentage = undefined;
130
+ this.qualityR600IdealSamplesPercentage = null;
131
131
 
132
132
  /**
133
133
  * The Average Target Number of Quality R600 Samples that should be Ideal for this Hour
@@ -135,7 +135,7 @@ class ShiftHourlyEntryModel extends BaseModel
135
135
  * @type {?number}
136
136
  * @public
137
137
  */
138
- this.averageQualityR600IdealSamplesTarget = undefined;
138
+ this.averageQualityR600IdealSamplesTarget = null;
139
139
 
140
140
  /**
141
141
  * An Array of Custom Quality Data Items for this Hour
@@ -143,7 +143,7 @@ class ShiftHourlyEntryModel extends BaseModel
143
143
  * @type {Array<{id: string, name: string, type: string, value: number, averageTarget: number}>}
144
144
  * @public
145
145
  */
146
- this.customQualityData = undefined;
146
+ this.customQualityData = [];
147
147
 
148
148
  /**
149
149
  * The Total Number of Bins Tipped for this Hour
@@ -151,7 +151,7 @@ class ShiftHourlyEntryModel extends BaseModel
151
151
  * @type {number}
152
152
  * @public
153
153
  */
154
- this.totalBinsTipped = undefined;
154
+ this.totalBinsTipped = 0;
155
155
 
156
156
  /**
157
157
  * The Target Number of Bins to Tip for this Hour
@@ -159,7 +159,7 @@ class ShiftHourlyEntryModel extends BaseModel
159
159
  * @type {number}
160
160
  * @public
161
161
  */
162
- this.binsTippedTarget = undefined;
162
+ this.binsTippedTarget = 0;
163
163
 
164
164
  /**
165
165
  * The Total Downtime for this Hour expressed in Seconds
@@ -167,7 +167,7 @@ class ShiftHourlyEntryModel extends BaseModel
167
167
  * @type {number}
168
168
  * @public
169
169
  */
170
- this.totalDowntime = undefined;
170
+ this.totalDowntime = 0;
171
171
 
172
172
  /**
173
173
  * The Total Time that could be Utilized for Packing Fruit (excludes Planned Downtime such as Smoko Breaks) for this Hour expressed in Seconds
@@ -175,7 +175,7 @@ class ShiftHourlyEntryModel extends BaseModel
175
175
  * @type {number}
176
176
  * @public
177
177
  */
178
- this.totalProductionTime = undefined;
178
+ this.totalProductionTime = 0;
179
179
 
180
180
  /**
181
181
  * The Total Number of Class 1 Tray Equivalents Packed for this Hour
@@ -183,7 +183,7 @@ class ShiftHourlyEntryModel extends BaseModel
183
183
  * @type {number}
184
184
  * @public
185
185
  */
186
- this.totalClass1Trays = undefined;
186
+ this.totalClass1Trays = 0;
187
187
 
188
188
  /**
189
189
  * The Total Number of Class 2 Tray Equivalents Packed for this Hour
@@ -191,7 +191,7 @@ class ShiftHourlyEntryModel extends BaseModel
191
191
  * @type {number}
192
192
  * @public
193
193
  */
194
- this.totalClass2Trays = undefined;
194
+ this.totalClass2Trays = 0;
195
195
 
196
196
  /**
197
197
  * The Target Number of Class 1 Tray Equivalents that should be Packed excluding all Downtime for this Hour
@@ -199,7 +199,7 @@ class ShiftHourlyEntryModel extends BaseModel
199
199
  * @type {number}
200
200
  * @public
201
201
  */
202
- this.class1TraysPerHourExcludingDowntimeTarget = undefined;
202
+ this.class1TraysPerHourExcludingDowntimeTarget = 0;
203
203
 
204
204
  /**
205
205
  * The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %, Class 1 %, Soft-Sort %) for this Hour
@@ -207,7 +207,7 @@ class ShiftHourlyEntryModel extends BaseModel
207
207
  * @type {?number}
208
208
  * @public
209
209
  */
210
- this.averageClass1TraysPerHourAdjustedTarget = undefined;
210
+ this.averageClass1TraysPerHourAdjustedTarget = null;
211
211
 
212
212
  /**
213
213
  * The Average Cost per Tray Equivalent for this Hour
@@ -215,7 +215,7 @@ class ShiftHourlyEntryModel extends BaseModel
215
215
  * @type {?number}
216
216
  * @public
217
217
  */
218
- this.averageCostPerTray = undefined;
218
+ this.averageCostPerTray = null;
219
219
 
220
220
  /**
221
221
  * The Average Cost per Tray Equivalent Target for this Hour
@@ -223,7 +223,7 @@ class ShiftHourlyEntryModel extends BaseModel
223
223
  * @type {?number}
224
224
  * @public
225
225
  */
226
- this.averageCostPerTrayTarget = undefined;
226
+ this.averageCostPerTrayTarget = null;
227
227
 
228
228
  /**
229
229
  * The Primary Issue Category for this Hourly Entry
@@ -231,7 +231,7 @@ class ShiftHourlyEntryModel extends BaseModel
231
231
  * @type {?string}
232
232
  * @public
233
233
  */
234
- this.primaryIssueCategory = undefined;
234
+ this.primaryIssueCategory = null;
235
235
 
236
236
  /**
237
237
  * The Primary Issue Tag for this Hourly Entry
@@ -239,7 +239,7 @@ class ShiftHourlyEntryModel extends BaseModel
239
239
  * @type {?string}
240
240
  * @public
241
241
  */
242
- this.primaryIssueTag = undefined;
242
+ this.primaryIssueTag = null;
243
243
 
244
244
  /**
245
245
  * A Percentage between 0% and 100% indicating how much the Primary Issue impacted Throughput for this Hourly Entry
@@ -247,7 +247,7 @@ class ShiftHourlyEntryModel extends BaseModel
247
247
  * @type {?number}
248
248
  * @public
249
249
  */
250
- this.primaryIssuePercentage = undefined;
250
+ this.primaryIssuePercentage = null;
251
251
 
252
252
  /**
253
253
  * The Secondary Issue Category for this Hourly Entry
@@ -255,7 +255,7 @@ class ShiftHourlyEntryModel extends BaseModel
255
255
  * @type {?string}
256
256
  * @public
257
257
  */
258
- this.secondaryIssueCategory = undefined;
258
+ this.secondaryIssueCategory = null;
259
259
 
260
260
  /**
261
261
  * The Secondary Issue Tag for this Hourly Entry
@@ -263,7 +263,7 @@ class ShiftHourlyEntryModel extends BaseModel
263
263
  * @type {?string}
264
264
  * @public
265
265
  */
266
- this.secondaryIssueTag = undefined;
266
+ this.secondaryIssueTag = null;
267
267
 
268
268
  /**
269
269
  * A Percentage between 0% and 100% indicating how much the Secondary Issue impacted Throughput for this Hourly Entry
@@ -271,7 +271,7 @@ class ShiftHourlyEntryModel extends BaseModel
271
271
  * @type {?number}
272
272
  * @public
273
273
  */
274
- this.secondaryIssuePercentage = undefined;
274
+ this.secondaryIssuePercentage = null;
275
275
 
276
276
  /**
277
277
  * An Optional Focus for the Next Hour
@@ -279,7 +279,7 @@ class ShiftHourlyEntryModel extends BaseModel
279
279
  * @type {?string}
280
280
  * @public
281
281
  */
282
- this.nextHourFocus = undefined;
282
+ this.nextHourFocus = null;
283
283
 
284
284
  /**
285
285
  * An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Hour
@@ -287,7 +287,7 @@ class ShiftHourlyEntryModel extends BaseModel
287
287
  * @type {?number}
288
288
  * @public
289
289
  */
290
- this.satisfactionRating = undefined;
290
+ this.satisfactionRating = null;
291
291
 
292
292
  /**
293
293
  * The Status of this Hourly Entry
@@ -295,7 +295,7 @@ class ShiftHourlyEntryModel extends BaseModel
295
295
  * @type {string}
296
296
  * @public
297
297
  */
298
- this.status = undefined;
298
+ this.status = "";
299
299
 
300
300
  /**
301
301
  * The Number of Class 1 Tray Equivalents that would have been Packed this Hour without Planned Downtime (e.g. Smoko Breaks)
@@ -303,7 +303,7 @@ class ShiftHourlyEntryModel extends BaseModel
303
303
  * @type {number}
304
304
  * @public
305
305
  */
306
- this.class1TraysPerHourPotential = undefined;
306
+ this.class1TraysPerHourPotential = 0;
307
307
 
308
308
  /**
309
309
  * The Number of Class 1 Tray Equivalents that would have been Packed this Hour with Zero Downtime
@@ -311,7 +311,7 @@ class ShiftHourlyEntryModel extends BaseModel
311
311
  * @type {number}
312
312
  * @public
313
313
  */
314
- this.class1TraysPerHourExcludingDowntime = undefined;
314
+ this.class1TraysPerHourExcludingDowntime = 0;
315
315
 
316
316
  /**
317
317
  * The Number of Class 1 Tray Equivalents that would have been Packed per Person this Hour without Planned Downtime (e.g. Smoko Breaks)
@@ -319,7 +319,7 @@ class ShiftHourlyEntryModel extends BaseModel
319
319
  * @type {?number}
320
320
  * @public
321
321
  */
322
- this.class1TraysPerManHourPotential = undefined;
322
+ this.class1TraysPerManHourPotential = null;
323
323
 
324
324
  /**
325
325
  * The Number of Class 1 Tray Equivalents that would have been Packed per Person this Hour with Zero Downtime
@@ -327,7 +327,7 @@ class ShiftHourlyEntryModel extends BaseModel
327
327
  * @type {?number}
328
328
  * @public
329
329
  */
330
- this.class1TraysPerManHourExcludingDowntime = undefined;
330
+ this.class1TraysPerManHourExcludingDowntime = null;
331
331
 
332
332
  /**
333
333
  * The Manning Percentage based on the Average Target for this Hour
@@ -335,7 +335,7 @@ class ShiftHourlyEntryModel extends BaseModel
335
335
  * @type {?number}
336
336
  * @public
337
337
  */
338
- this.manningPercentage = undefined;
338
+ this.manningPercentage = null;
339
339
 
340
340
  /**
341
341
  * The Total Number of People working for this Hour
@@ -343,7 +343,7 @@ class ShiftHourlyEntryModel extends BaseModel
343
343
  * @type {?number}
344
344
  * @public
345
345
  */
346
- this.totalManning = undefined;
346
+ this.totalManning = null;
347
347
 
348
348
  /**
349
349
  * The Percentage of Production Time without Downtime for this Hour
@@ -351,7 +351,7 @@ class ShiftHourlyEntryModel extends BaseModel
351
351
  * @type {number}
352
352
  * @public
353
353
  */
354
- this.uptimePercentage = undefined;
354
+ this.uptimePercentage = 0;
355
355
 
356
356
  /**
357
357
  * The Percentage of Downtime for this Hour
@@ -359,7 +359,7 @@ class ShiftHourlyEntryModel extends BaseModel
359
359
  * @type {number}
360
360
  * @public
361
361
  */
362
- this.downtimePercentage = undefined;
362
+ this.downtimePercentage = 0;
363
363
 
364
364
  /**
365
365
  * Whether the Shift Hourly Entry has been deleted
@@ -367,7 +367,7 @@ class ShiftHourlyEntryModel extends BaseModel
367
367
  * @type {boolean}
368
368
  * @public
369
369
  */
370
- this.deleted = undefined;
370
+ this.deleted = false;
371
371
 
372
372
  /**
373
373
  * When the Shift Hourly Entry was last updated
@@ -375,7 +375,7 @@ class ShiftHourlyEntryModel extends BaseModel
375
375
  * @type {Date}
376
376
  * @public
377
377
  */
378
- this.updateTimestamp = undefined;
378
+ this.updateTimestamp = new Date();
379
379
 
380
380
  /**
381
381
  * The Site ID associated with this Shift Hourly Entry
@@ -31,7 +31,7 @@ class ShiftModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The Packing Line ID this Shift is associated with
@@ -39,7 +39,7 @@ class ShiftModel extends BaseModel
39
39
  * @type {string}
40
40
  * @public
41
41
  */
42
- this.packingLineId = undefined;
42
+ this.packingLineId = "";
43
43
 
44
44
  /**
45
45
  * When this Shift was Created
@@ -47,7 +47,7 @@ class ShiftModel extends BaseModel
47
47
  * @type {Date}
48
48
  * @public
49
49
  */
50
- this.createdTimestamp = undefined;
50
+ this.createdTimestamp = new Date();
51
51
 
52
52
  /**
53
53
  * The Type of Shift
@@ -55,7 +55,7 @@ class ShiftModel extends BaseModel
55
55
  * @type {string}
56
56
  * @public
57
57
  */
58
- this.type = undefined;
58
+ this.type = "";
59
59
 
60
60
  /**
61
61
  * The Name of the Line Manager for this Shift
@@ -63,7 +63,7 @@ class ShiftModel extends BaseModel
63
63
  * @type {?string}
64
64
  * @public
65
65
  */
66
- this.lineManagerName = undefined;
66
+ this.lineManagerName = null;
67
67
 
68
68
  /**
69
69
  * The Target Number of Bins to Tip for this Shift
@@ -71,7 +71,7 @@ class ShiftModel extends BaseModel
71
71
  * @type {?number}
72
72
  * @public
73
73
  */
74
- this.binsTippedTarget = undefined;
74
+ this.binsTippedTarget = null;
75
75
 
76
76
  /**
77
77
  * *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
@@ -79,7 +79,7 @@ class ShiftModel extends BaseModel
79
79
  * @type {?number}
80
80
  * @public
81
81
  */
82
- this.initialClass1Manning = undefined;
82
+ this.initialClass1Manning = null;
83
83
 
84
84
  /**
85
85
  * *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
@@ -87,7 +87,7 @@ class ShiftModel extends BaseModel
87
87
  * @type {?number}
88
88
  * @public
89
89
  */
90
- this.initialClass2Manning = undefined;
90
+ this.initialClass2Manning = null;
91
91
 
92
92
  /**
93
93
  * When this Shift was Ready for Packing
@@ -95,7 +95,7 @@ class ShiftModel extends BaseModel
95
95
  * @type {?Date}
96
96
  * @public
97
97
  */
98
- this.readyTimestamp = undefined;
98
+ this.readyTimestamp = null;
99
99
 
100
100
  /**
101
101
  * When this Shift was Started
@@ -103,7 +103,7 @@ class ShiftModel extends BaseModel
103
103
  * @type {?Date}
104
104
  * @public
105
105
  */
106
- this.startTimestamp = undefined;
106
+ this.startTimestamp = null;
107
107
 
108
108
  /**
109
109
  * When this Shift was Finished
@@ -111,7 +111,7 @@ class ShiftModel extends BaseModel
111
111
  * @type {?Date}
112
112
  * @public
113
113
  */
114
- this.finishTimestamp = undefined;
114
+ this.finishTimestamp = null;
115
115
 
116
116
  /**
117
117
  * When this Shift was Published
@@ -119,7 +119,7 @@ class ShiftModel extends BaseModel
119
119
  * @type {?Date}
120
120
  * @public
121
121
  */
122
- this.publishTimestamp = undefined;
122
+ this.publishTimestamp = null;
123
123
 
124
124
  /**
125
125
  * An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
@@ -127,7 +127,7 @@ class ShiftModel extends BaseModel
127
127
  * @type {?number}
128
128
  * @public
129
129
  */
130
- this.satisfactionRating = undefined;
130
+ this.satisfactionRating = null;
131
131
 
132
132
  /**
133
133
  * *DEPRECATED* An Optional Array of Handover Notes for this Shift
@@ -135,7 +135,7 @@ class ShiftModel extends BaseModel
135
135
  * @type {Array<{area: string, noteContent: string}>}
136
136
  * @public
137
137
  */
138
- this.handoverNotes = undefined;
138
+ this.handoverNotes = [];
139
139
 
140
140
  /**
141
141
  * An Optional Array of Notes for this Shift
@@ -143,7 +143,7 @@ class ShiftModel extends BaseModel
143
143
  * @type {Array<{area: string, timestamp: Date, content: string}>}
144
144
  * @public
145
145
  */
146
- this.areaNotes = undefined;
146
+ this.areaNotes = [];
147
147
 
148
148
  /**
149
149
  * The Schedule for this Shift
@@ -151,7 +151,17 @@ class ShiftModel extends BaseModel
151
151
  * @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
152
152
  * @public
153
153
  */
154
- this.schedule = undefined;
154
+ this.schedule = (function(){
155
+ let scheduleDefaultValue = {};
156
+
157
+ scheduleDefaultValue.startTime = "";
158
+
159
+ scheduleDefaultValue.endTime = "";
160
+
161
+ scheduleDefaultValue.breaks = [];
162
+
163
+ return scheduleDefaultValue;
164
+ }());
155
165
 
156
166
  /**
157
167
  * The Status of this Shift
@@ -159,7 +169,7 @@ class ShiftModel extends BaseModel
159
169
  * @type {string}
160
170
  * @public
161
171
  */
162
- this.status = undefined;
172
+ this.status = "";
163
173
 
164
174
  /**
165
175
  * Whether the Shift has been deleted
@@ -167,7 +177,7 @@ class ShiftModel extends BaseModel
167
177
  * @type {boolean}
168
178
  * @public
169
179
  */
170
- this.deleted = undefined;
180
+ this.deleted = false;
171
181
 
172
182
  /**
173
183
  * When the Shift was last updated
@@ -175,7 +185,7 @@ class ShiftModel extends BaseModel
175
185
  * @type {Date}
176
186
  * @public
177
187
  */
178
- this.updateTimestamp = undefined;
188
+ this.updateTimestamp = new Date();
179
189
 
180
190
  /**
181
191
  * The Site ID associated with this Shift
@@ -31,7 +31,7 @@ class ShiftQualitySummaryModel extends BaseModel
31
31
  * @type {string}
32
32
  * @public
33
33
  */
34
- this.id = undefined;
34
+ this.id = "";
35
35
 
36
36
  /**
37
37
  * The Packing Line ID this Quality Summary is associated with
@@ -39,7 +39,7 @@ class ShiftQualitySummaryModel extends BaseModel
39
39
  * @type {string}
40
40
  * @public
41
41
  */
42
- this.packingLineId = undefined;
42
+ this.packingLineId = "";
43
43
 
44
44
  /**
45
45
  * The Shift ID this Quality Summary is asssociated with
@@ -47,7 +47,7 @@ class ShiftQualitySummaryModel extends BaseModel
47
47
  * @type {string}
48
48
  * @public
49
49
  */
50
- this.shiftId = undefined;
50
+ this.shiftId = "";
51
51
 
52
52
  /**
53
53
  * When this Quality Summary was Created
@@ -55,7 +55,7 @@ class ShiftQualitySummaryModel extends BaseModel
55
55
  * @type {Date}
56
56
  * @public
57
57
  */
58
- this.createdTimestamp = undefined;
58
+ this.createdTimestamp = new Date();
59
59
 
60
60
  /**
61
61
  * When this Quality Summary was Published
@@ -63,7 +63,7 @@ class ShiftQualitySummaryModel extends BaseModel
63
63
  * @type {?Date}
64
64
  * @public
65
65
  */
66
- this.publishTimestamp = undefined;
66
+ this.publishTimestamp = null;
67
67
 
68
68
  /**
69
69
  * The User ID of the Quality Manager for this Summary
@@ -71,7 +71,7 @@ class ShiftQualitySummaryModel extends BaseModel
71
71
  * @type {?string}
72
72
  * @public
73
73
  */
74
- this.qualityManagerUserId = undefined;
74
+ this.qualityManagerUserId = null;
75
75
 
76
76
  /**
77
77
  * The Name of the Quality Manager for this Summary
@@ -79,7 +79,7 @@ class ShiftQualitySummaryModel extends BaseModel
79
79
  * @type {string}
80
80
  * @public
81
81
  */
82
- this.qualityManagerName = undefined;
82
+ this.qualityManagerName = "";
83
83
 
84
84
  /**
85
85
  * An Array of Accuracy Results for this Summary
@@ -87,7 +87,7 @@ class ShiftQualitySummaryModel extends BaseModel
87
87
  * @type {Array<{type: string, value: number}>}
88
88
  * @public
89
89
  */
90
- this.accuracyResults = undefined;
90
+ this.accuracyResults = [];
91
91
 
92
92
  /**
93
93
  * An Array of Audit Results for this Summary
@@ -95,7 +95,7 @@ class ShiftQualitySummaryModel extends BaseModel
95
95
  * @type {Array<{type: string, value: number}>}
96
96
  * @public
97
97
  */
98
- this.auditResults = undefined;
98
+ this.auditResults = [];
99
99
 
100
100
  /**
101
101
  * An Array of Packrun Results for this Summary
@@ -103,7 +103,7 @@ class ShiftQualitySummaryModel extends BaseModel
103
103
  * @type {Array<{packrunId: string, packrunName: string, minorPackingDefects: number, majorPackingDefects: number, softs: number, cuts: number, rots: number, softsLineAverageSampleSize: ?number, softsLineAverageValue: ?number, exportFruitInClass2: ?number, exportFruitInLocalMarket: ?number, exportFruitInWaste: ?number}>}
104
104
  * @public
105
105
  */
106
- this.packrunResults = undefined;
106
+ this.packrunResults = [];
107
107
 
108
108
  /**
109
109
  * An Optional Rating between 1 and 10 on how Satisfied the Quality Manager was with this Shift
@@ -111,7 +111,7 @@ class ShiftQualitySummaryModel extends BaseModel
111
111
  * @type {?number}
112
112
  * @public
113
113
  */
114
- this.satisfactionRating = undefined;
114
+ this.satisfactionRating = null;
115
115
 
116
116
  /**
117
117
  * The Status of this Quality Summary
@@ -119,7 +119,7 @@ class ShiftQualitySummaryModel extends BaseModel
119
119
  * @type {string}
120
120
  * @public
121
121
  */
122
- this.status = undefined;
122
+ this.status = "";
123
123
 
124
124
  /**
125
125
  * Whether the Shift Quality Summary has been deleted
@@ -127,7 +127,7 @@ class ShiftQualitySummaryModel extends BaseModel
127
127
  * @type {boolean}
128
128
  * @public
129
129
  */
130
- this.deleted = undefined;
130
+ this.deleted = false;
131
131
 
132
132
  /**
133
133
  * When the Shift Quality Summary was last updated
@@ -135,7 +135,7 @@ class ShiftQualitySummaryModel extends BaseModel
135
135
  * @type {Date}
136
136
  * @public
137
137
  */
138
- this.updateTimestamp = undefined;
138
+ this.updateTimestamp = new Date();
139
139
 
140
140
  /**
141
141
  * The Site ID associated with this Shift Quality Summary