@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.
- package/README.md +5 -7
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipBinController.js +622 -0
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +7 -7
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +657 -0
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +29 -5
- package/lib/Controllers/Packhouse/Site/PackrunController.js +46 -4
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +19 -4
- package/lib/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +661 -0
- package/lib/Controllers/Packhouse/Site/ShiftTaskController.js +628 -0
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +453 -0
- package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/lib/Controllers/Packhouse/Site/index.js +15 -0
- package/lib/Controllers/Site/AlarmController.js +4 -4
- package/lib/Controllers/Site/AlarmGroupController.js +4 -4
- package/lib/Controllers/Site/DefinitionController.js +4 -4
- package/lib/Controllers/Site/PermanentObjectController.js +4 -4
- package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
- package/lib/Controllers/Site/PointController.js +4 -4
- package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
- package/lib/Errors/BadRequestError.js +1 -1
- package/lib/Errors/ForbiddenError.js +1 -1
- package/lib/Errors/NetworkError.js +1 -1
- package/lib/Errors/NotAllowedError.js +1 -1
- package/lib/Errors/NotFoundError.js +1 -1
- package/lib/Errors/ServerError.js +1 -1
- package/lib/Errors/UnauthorizedError.js +1 -1
- package/lib/Models/AccountPolicyModel.js +1 -1
- package/lib/Models/ApiAccountModel.js +1 -1
- package/lib/Models/CompanyModel.js +1 -1
- package/lib/Models/FirebaseTokenModel.js +1 -1
- package/lib/Models/Packhouse/Site/BinTipBinModel.js +367 -0
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +14 -4
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +14 -4
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +15 -5
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +14 -4
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +14 -4
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +14 -4
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +14 -4
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +14 -4
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +14 -4
- package/lib/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +481 -0
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +14 -4
- package/lib/Models/Packhouse/Site/PackTypeModel.js +14 -4
- package/lib/Models/Packhouse/Site/PackingLineModel.js +538 -5
- package/lib/Models/Packhouse/Site/PackrunModel.js +80 -4
- package/lib/Models/Packhouse/Site/RejectBinModel.js +14 -4
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +274 -8
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +14 -4
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +14 -4
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +181 -5
- package/lib/Models/Packhouse/Site/ShiftModel.js +14 -4
- package/lib/Models/Packhouse/Site/ShiftQualitySummaryModel.js +599 -0
- package/lib/Models/Packhouse/Site/ShiftTaskModel.js +373 -0
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
- package/lib/Models/Packhouse/Site/VarietyModel.js +14 -4
- package/lib/Models/Packhouse/Site/index.js +15 -0
- package/lib/Models/RTUModel.js +1 -1
- package/lib/Models/RTUPluginModel.js +1 -1
- package/lib/Models/Site/AlarmGroupModel.js +14 -4
- package/lib/Models/Site/AlarmModel.js +14 -4
- package/lib/Models/Site/DefinitionModel.js +14 -4
- package/lib/Models/Site/PermanentObjectDataModel.js +14 -4
- package/lib/Models/Site/PermanentObjectModel.js +14 -4
- package/lib/Models/Site/PointModel.js +14 -4
- package/lib/Models/Site/TemporaryObjectModel.js +14 -4
- package/lib/Models/SiteModel.js +1 -1
- package/lib/Models/TokenModel.js +1 -1
- package/lib/Models/UserAccountActionTokenModel.js +1 -1
- package/lib/Models/UserAccountModel.js +1 -1
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +4039 -1071
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipBinController.js +665 -0
- package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +7 -7
- package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/FreshQualityPackrunSummaryController.js +700 -0
- package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackingLineController.js +29 -5
- package/src/Controllers/Packhouse/Site/PackrunController.js +56 -4
- package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +28 -6
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +19 -4
- package/src/Controllers/Packhouse/Site/ShiftQualitySummaryController.js +704 -0
- package/src/Controllers/Packhouse/Site/ShiftTaskController.js +671 -0
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +474 -0
- package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/src/Controllers/Packhouse/Site/index.js +10 -0
- package/src/Controllers/Site/AlarmController.js +4 -4
- package/src/Controllers/Site/AlarmGroupController.js +4 -4
- package/src/Controllers/Site/DefinitionController.js +4 -4
- package/src/Controllers/Site/PermanentObjectController.js +4 -4
- package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
- package/src/Controllers/Site/PointController.js +4 -4
- package/src/Controllers/Site/TemporaryObjectController.js +4 -4
- package/src/Models/Packhouse/Site/BinTipBinModel.js +365 -0
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerModel.js +14 -4
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +13 -3
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/FreshQualityPackrunSummaryModel.js +523 -0
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +13 -3
- package/src/Models/Packhouse/Site/PackTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/PackingLineModel.js +718 -4
- package/src/Models/Packhouse/Site/PackrunModel.js +88 -3
- package/src/Models/Packhouse/Site/RejectBinModel.js +13 -3
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +310 -7
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +205 -4
- package/src/Models/Packhouse/Site/ShiftModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftQualitySummaryModel.js +664 -0
- package/src/Models/Packhouse/Site/ShiftTaskModel.js +369 -0
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
- package/src/Models/Packhouse/Site/VarietyModel.js +13 -3
- package/src/Models/Packhouse/Site/index.js +10 -0
- package/src/Models/Site/AlarmGroupModel.js +13 -3
- package/src/Models/Site/AlarmModel.js +13 -3
- package/src/Models/Site/DefinitionModel.js +13 -3
- package/src/Models/Site/PermanentObjectDataModel.js +13 -3
- package/src/Models/Site/PermanentObjectModel.js +13 -3
- package/src/Models/Site/PointModel.js +13 -3
- package/src/Models/Site/TemporaryObjectModel.js +13 -3
- package/src/PackageVersion.js +1 -1
|
@@ -19,8 +19,9 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
19
19
|
* ShiftHourlyEntryModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Shift Hourly Entry
|
|
22
23
|
*/
|
|
23
|
-
constructor()
|
|
24
|
+
constructor(siteId)
|
|
24
25
|
{
|
|
25
26
|
super();
|
|
26
27
|
|
|
@@ -96,6 +97,14 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
96
97
|
*/
|
|
97
98
|
this.averageManningTarget = undefined;
|
|
98
99
|
|
|
100
|
+
/**
|
|
101
|
+
* The Average Cost per Person working in all Areas for this Hour
|
|
102
|
+
*
|
|
103
|
+
* @type {?number}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.averageCostPerManningUnit = undefined;
|
|
107
|
+
|
|
99
108
|
/**
|
|
100
109
|
* The Percentage of Total Tray Equivalents that are Layered for this Hour
|
|
101
110
|
*
|
|
@@ -120,10 +129,18 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
120
129
|
*/
|
|
121
130
|
this.qualityR600IdealSamplesPercentage = undefined;
|
|
122
131
|
|
|
132
|
+
/**
|
|
133
|
+
* The Average Target Number of Quality R600 Samples that should be Ideal for this Hour
|
|
134
|
+
*
|
|
135
|
+
* @type {?number}
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
this.averageQualityR600IdealSamplesTarget = undefined;
|
|
139
|
+
|
|
123
140
|
/**
|
|
124
141
|
* An Array of Custom Quality Data Items for this Hour
|
|
125
142
|
*
|
|
126
|
-
* @type {Array<{id: string, name: string, type: string, value: number}>}
|
|
143
|
+
* @type {Array<{id: string, name: string, type: string, value: number, averageTarget: number}>}
|
|
127
144
|
* @public
|
|
128
145
|
*/
|
|
129
146
|
this.customQualityData = undefined;
|
|
@@ -184,6 +201,30 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
184
201
|
*/
|
|
185
202
|
this.class1TraysPerHourExcludingDowntimeTarget = undefined;
|
|
186
203
|
|
|
204
|
+
/**
|
|
205
|
+
* The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %, Class 1 %, Soft-Sort %) for this Hour
|
|
206
|
+
*
|
|
207
|
+
* @type {?number}
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
210
|
+
this.averageClass1TraysPerHourAdjustedTarget = undefined;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The Average Cost per Tray Equivalent for this Hour
|
|
214
|
+
*
|
|
215
|
+
* @type {?number}
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
this.averageCostPerTray = undefined;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The Average Cost per Tray Equivalent Target for this Hour
|
|
222
|
+
*
|
|
223
|
+
* @type {?number}
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
this.averageCostPerTrayTarget = undefined;
|
|
227
|
+
|
|
187
228
|
/**
|
|
188
229
|
* The Primary Issue Category for this Hourly Entry
|
|
189
230
|
*
|
|
@@ -200,6 +241,14 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
200
241
|
*/
|
|
201
242
|
this.primaryIssueTag = undefined;
|
|
202
243
|
|
|
244
|
+
/**
|
|
245
|
+
* A Percentage between 0% and 100% indicating how much the Primary Issue impacted Throughput for this Hourly Entry
|
|
246
|
+
*
|
|
247
|
+
* @type {?number}
|
|
248
|
+
* @public
|
|
249
|
+
*/
|
|
250
|
+
this.primaryIssuePercentage = undefined;
|
|
251
|
+
|
|
203
252
|
/**
|
|
204
253
|
* The Secondary Issue Category for this Hourly Entry
|
|
205
254
|
*
|
|
@@ -216,6 +265,14 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
216
265
|
*/
|
|
217
266
|
this.secondaryIssueTag = undefined;
|
|
218
267
|
|
|
268
|
+
/**
|
|
269
|
+
* A Percentage between 0% and 100% indicating how much the Secondary Issue impacted Throughput for this Hourly Entry
|
|
270
|
+
*
|
|
271
|
+
* @type {?number}
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
274
|
+
this.secondaryIssuePercentage = undefined;
|
|
275
|
+
|
|
219
276
|
/**
|
|
220
277
|
* An Optional Focus for the Next Hour
|
|
221
278
|
*
|
|
@@ -319,6 +376,14 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
319
376
|
* @public
|
|
320
377
|
*/
|
|
321
378
|
this.updateTimestamp = undefined;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* The Site ID associated with this Shift Hourly Entry
|
|
382
|
+
*
|
|
383
|
+
* @type {number}
|
|
384
|
+
* @public
|
|
385
|
+
*/
|
|
386
|
+
this.siteId = siteId;
|
|
322
387
|
}
|
|
323
388
|
|
|
324
389
|
/**
|
|
@@ -327,11 +392,12 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
327
392
|
* @static
|
|
328
393
|
* @public
|
|
329
394
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
395
|
+
* @param {number} siteId The Site ID associated with this Shift Hourly Entry
|
|
330
396
|
* @return {ShiftHourlyEntryModel}
|
|
331
397
|
*/
|
|
332
|
-
static fromJSON(json)
|
|
398
|
+
static fromJSON(json, siteId)
|
|
333
399
|
{
|
|
334
|
-
let model = new ShiftHourlyEntryModel();
|
|
400
|
+
let model = new ShiftHourlyEntryModel(siteId);
|
|
335
401
|
|
|
336
402
|
/**
|
|
337
403
|
* The JSON Object
|
|
@@ -472,6 +538,23 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
472
538
|
}());
|
|
473
539
|
}
|
|
474
540
|
|
|
541
|
+
if('averageCostPerManningUnit' in jsonObject)
|
|
542
|
+
{
|
|
543
|
+
model.averageCostPerManningUnit = (function(){
|
|
544
|
+
if(jsonObject['averageCostPerManningUnit'] === null)
|
|
545
|
+
{
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if(typeof jsonObject['averageCostPerManningUnit'] !== 'number')
|
|
550
|
+
{
|
|
551
|
+
return Number(jsonObject['averageCostPerManningUnit']);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
return jsonObject['averageCostPerManningUnit'];
|
|
555
|
+
}());
|
|
556
|
+
}
|
|
557
|
+
|
|
475
558
|
if('layeredTrayPercentage' in jsonObject)
|
|
476
559
|
{
|
|
477
560
|
model.layeredTrayPercentage = (function(){
|
|
@@ -523,6 +606,23 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
523
606
|
}());
|
|
524
607
|
}
|
|
525
608
|
|
|
609
|
+
if('averageQualityR600IdealSamplesTarget' in jsonObject)
|
|
610
|
+
{
|
|
611
|
+
model.averageQualityR600IdealSamplesTarget = (function(){
|
|
612
|
+
if(jsonObject['averageQualityR600IdealSamplesTarget'] === null)
|
|
613
|
+
{
|
|
614
|
+
return null;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
if(typeof jsonObject['averageQualityR600IdealSamplesTarget'] !== 'number')
|
|
618
|
+
{
|
|
619
|
+
return Number(jsonObject['averageQualityR600IdealSamplesTarget']);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
return jsonObject['averageQualityR600IdealSamplesTarget'];
|
|
623
|
+
}());
|
|
624
|
+
}
|
|
625
|
+
|
|
526
626
|
if('customQualityData' in jsonObject)
|
|
527
627
|
{
|
|
528
628
|
model.customQualityData = (function(){
|
|
@@ -598,6 +698,22 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
598
698
|
{
|
|
599
699
|
customQualityDataItemObject.value = 0;
|
|
600
700
|
}
|
|
701
|
+
|
|
702
|
+
if(typeof customQualityDataItem === 'object' && 'averageTarget' in customQualityDataItem)
|
|
703
|
+
{
|
|
704
|
+
customQualityDataItemObject.averageTarget = (function(){
|
|
705
|
+
if(typeof customQualityDataItem.averageTarget !== 'number')
|
|
706
|
+
{
|
|
707
|
+
return Number(customQualityDataItem.averageTarget);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
return customQualityDataItem.averageTarget;
|
|
711
|
+
}());
|
|
712
|
+
}
|
|
713
|
+
else
|
|
714
|
+
{
|
|
715
|
+
customQualityDataItemObject.averageTarget = 0;
|
|
716
|
+
}
|
|
601
717
|
|
|
602
718
|
return customQualityDataItemObject;
|
|
603
719
|
}());
|
|
@@ -689,6 +805,57 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
689
805
|
}());
|
|
690
806
|
}
|
|
691
807
|
|
|
808
|
+
if('averageClass1TraysPerHourAdjustedTarget' in jsonObject)
|
|
809
|
+
{
|
|
810
|
+
model.averageClass1TraysPerHourAdjustedTarget = (function(){
|
|
811
|
+
if(jsonObject['averageClass1TraysPerHourAdjustedTarget'] === null)
|
|
812
|
+
{
|
|
813
|
+
return null;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
if(typeof jsonObject['averageClass1TraysPerHourAdjustedTarget'] !== 'number')
|
|
817
|
+
{
|
|
818
|
+
return Number.isInteger(Number(jsonObject['averageClass1TraysPerHourAdjustedTarget'])) ? Number(jsonObject['averageClass1TraysPerHourAdjustedTarget']) : Math.floor(Number(jsonObject['averageClass1TraysPerHourAdjustedTarget']));
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
return Number.isInteger(jsonObject['averageClass1TraysPerHourAdjustedTarget']) ? jsonObject['averageClass1TraysPerHourAdjustedTarget'] : Math.floor(jsonObject['averageClass1TraysPerHourAdjustedTarget']);
|
|
822
|
+
}());
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
if('averageCostPerTray' in jsonObject)
|
|
826
|
+
{
|
|
827
|
+
model.averageCostPerTray = (function(){
|
|
828
|
+
if(jsonObject['averageCostPerTray'] === null)
|
|
829
|
+
{
|
|
830
|
+
return null;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
if(typeof jsonObject['averageCostPerTray'] !== 'number')
|
|
834
|
+
{
|
|
835
|
+
return Number(jsonObject['averageCostPerTray']);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
return jsonObject['averageCostPerTray'];
|
|
839
|
+
}());
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
if('averageCostPerTrayTarget' in jsonObject)
|
|
843
|
+
{
|
|
844
|
+
model.averageCostPerTrayTarget = (function(){
|
|
845
|
+
if(jsonObject['averageCostPerTrayTarget'] === null)
|
|
846
|
+
{
|
|
847
|
+
return null;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
if(typeof jsonObject['averageCostPerTrayTarget'] !== 'number')
|
|
851
|
+
{
|
|
852
|
+
return Number(jsonObject['averageCostPerTrayTarget']);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
return jsonObject['averageCostPerTrayTarget'];
|
|
856
|
+
}());
|
|
857
|
+
}
|
|
858
|
+
|
|
692
859
|
if('primaryIssueCategory' in jsonObject)
|
|
693
860
|
{
|
|
694
861
|
model.primaryIssueCategory = (function(){
|
|
@@ -723,6 +890,23 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
723
890
|
}());
|
|
724
891
|
}
|
|
725
892
|
|
|
893
|
+
if('primaryIssuePercentage' in jsonObject)
|
|
894
|
+
{
|
|
895
|
+
model.primaryIssuePercentage = (function(){
|
|
896
|
+
if(jsonObject['primaryIssuePercentage'] === null)
|
|
897
|
+
{
|
|
898
|
+
return null;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
if(typeof jsonObject['primaryIssuePercentage'] !== 'number')
|
|
902
|
+
{
|
|
903
|
+
return Number(jsonObject['primaryIssuePercentage']);
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
return jsonObject['primaryIssuePercentage'];
|
|
907
|
+
}());
|
|
908
|
+
}
|
|
909
|
+
|
|
726
910
|
if('secondaryIssueCategory' in jsonObject)
|
|
727
911
|
{
|
|
728
912
|
model.secondaryIssueCategory = (function(){
|
|
@@ -757,6 +941,23 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
757
941
|
}());
|
|
758
942
|
}
|
|
759
943
|
|
|
944
|
+
if('secondaryIssuePercentage' in jsonObject)
|
|
945
|
+
{
|
|
946
|
+
model.secondaryIssuePercentage = (function(){
|
|
947
|
+
if(jsonObject['secondaryIssuePercentage'] === null)
|
|
948
|
+
{
|
|
949
|
+
return null;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
if(typeof jsonObject['secondaryIssuePercentage'] !== 'number')
|
|
953
|
+
{
|
|
954
|
+
return Number(jsonObject['secondaryIssuePercentage']);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
return jsonObject['secondaryIssuePercentage'];
|
|
958
|
+
}());
|
|
959
|
+
}
|
|
960
|
+
|
|
760
961
|
if('nextHourFocus' in jsonObject)
|
|
761
962
|
{
|
|
762
963
|
model.nextHourFocus = (function(){
|
|
@@ -19,8 +19,9 @@ class ShiftModel extends BaseModel
|
|
|
19
19
|
* ShiftModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this Shift
|
|
22
23
|
*/
|
|
23
|
-
constructor()
|
|
24
|
+
constructor(siteId)
|
|
24
25
|
{
|
|
25
26
|
super();
|
|
26
27
|
|
|
@@ -175,6 +176,14 @@ class ShiftModel extends BaseModel
|
|
|
175
176
|
* @public
|
|
176
177
|
*/
|
|
177
178
|
this.updateTimestamp = undefined;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The Site ID associated with this Shift
|
|
182
|
+
*
|
|
183
|
+
* @type {number}
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
this.siteId = siteId;
|
|
178
187
|
}
|
|
179
188
|
|
|
180
189
|
/**
|
|
@@ -183,11 +192,12 @@ class ShiftModel extends BaseModel
|
|
|
183
192
|
* @static
|
|
184
193
|
* @public
|
|
185
194
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
195
|
+
* @param {number} siteId The Site ID associated with this Shift
|
|
186
196
|
* @return {ShiftModel}
|
|
187
197
|
*/
|
|
188
|
-
static fromJSON(json)
|
|
198
|
+
static fromJSON(json, siteId)
|
|
189
199
|
{
|
|
190
|
-
let model = new ShiftModel();
|
|
200
|
+
let model = new ShiftModel(siteId);
|
|
191
201
|
|
|
192
202
|
/**
|
|
193
203
|
* The JSON Object
|