@ricado/api-client 2.3.8 → 2.3.11
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/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +2 -0
- package/lib/Controllers/Packhouse/Site/MAFSizerBatchController.js +926 -0
- package/lib/Controllers/Packhouse/Site/MAFSizerController.js +217 -0
- package/lib/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +879 -0
- package/lib/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +922 -0
- package/lib/Controllers/Packhouse/Site/PackrunController.js +54 -33
- package/lib/Controllers/Packhouse/Site/ShiftController.js +23 -0
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
- package/lib/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
- package/lib/Controllers/Packhouse/Site/index.js +12 -0
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +26 -0
- package/lib/Models/Packhouse/Site/MAFSizerBatchModel.js +555 -0
- package/lib/Models/Packhouse/Site/MAFSizerModel.js +445 -0
- package/lib/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +253 -0
- package/lib/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +473 -0
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +75 -5
- package/lib/Models/Packhouse/Site/index.js +12 -0
- package/lib/PackageVersion.js +2 -2
- package/lib/index.d.ts +4922 -3160
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +2 -0
- package/src/Controllers/Packhouse/Site/MAFSizerBatchController.js +1057 -0
- package/src/Controllers/Packhouse/Site/MAFSizerController.js +194 -0
- package/src/Controllers/Packhouse/Site/MAFSizerOutletArticleChangeController.js +1010 -0
- package/src/Controllers/Packhouse/Site/MAFSizerPackrunSummaryController.js +1053 -0
- package/src/Controllers/Packhouse/Site/PackrunController.js +59 -33
- package/src/Controllers/Packhouse/Site/ShiftController.js +22 -0
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +13 -7
- package/src/Controllers/Packhouse/Site/SoftSortBeltController.js +1 -0
- package/src/Controllers/Packhouse/Site/index.js +8 -0
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +29 -0
- package/src/Models/Packhouse/Site/MAFSizerBatchModel.js +598 -0
- package/src/Models/Packhouse/Site/MAFSizerModel.js +450 -0
- package/src/Models/Packhouse/Site/MAFSizerOutletArticleChangeModel.js +235 -0
- package/src/Models/Packhouse/Site/MAFSizerPackrunSummaryModel.js +511 -0
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +85 -5
- package/src/Models/Packhouse/Site/index.js +8 -0
- package/src/PackageVersion.js +2 -2
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Auto-Generated by the RICADO Gen 4 PHP API Project
|
|
3
|
+
*
|
|
4
|
+
* Do Not Edit this File Manually!
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import BaseModel from '../../../Models/BaseModel';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Model Class for a MAF Sizer Packrun Summary
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @extends BaseModel
|
|
15
|
+
*/
|
|
16
|
+
class MAFSizerPackrunSummaryModel extends BaseModel
|
|
17
|
+
{
|
|
18
|
+
/**
|
|
19
|
+
* MAFSizerPackrunSummaryModel Constructor
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {number} siteId The Site ID associated with this MAF Sizer Packrun Summary
|
|
23
|
+
*/
|
|
24
|
+
constructor(siteId)
|
|
25
|
+
{
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The MAF Sizer Packrun Summary ID
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
this.id = "";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The MAF Sizer ID this Summary is associated with
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
this.mafSizerId = "";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Packrun ID this Summary is associated with
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
this.packrunId = "";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* When this Summary was Created
|
|
54
|
+
*
|
|
55
|
+
* @type {Date}
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
this.createdTimestamp = new Date();
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The Time Batch this Summary is associated with
|
|
62
|
+
*
|
|
63
|
+
* @type {?string}
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
this.timeBatchId = null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* An Array of Packrun Summary Data Objects for each Class Type
|
|
70
|
+
*
|
|
71
|
+
* @type {Array<{classType: string, totals: Array<{fruitSize: string, packType: ?string, weight: number, fruitCount: number, packCount: ?number}>}>}
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
this.classTypeSummaries = [];
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* An Array that contains the Articles initially Assigned to each Outlet
|
|
78
|
+
*
|
|
79
|
+
* @type {Array<{outletNumber: number, articleName: ?string}>}
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
this.initialOutletArticles = [];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* An Array that contains the Types initially configured for each Outlet
|
|
86
|
+
*
|
|
87
|
+
* @type {Array<{outletNumber: number, type: string, typeId: ?string}>}
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
this.initialOutletTypes = [];
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether the MAF Sizer Packrun Summary has been deleted
|
|
94
|
+
*
|
|
95
|
+
* @type {boolean}
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
this.deleted = false;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* When the MAF Sizer Packrun Summary was last updated
|
|
102
|
+
*
|
|
103
|
+
* @type {Date}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.updateTimestamp = new Date();
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The Site ID associated with this MAF Sizer Packrun Summary
|
|
110
|
+
*
|
|
111
|
+
* @type {number}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.siteId = siteId;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Create a new **MAFSizerPackrunSummaryModel** from a JSON Object or JSON String
|
|
119
|
+
*
|
|
120
|
+
* @static
|
|
121
|
+
* @public
|
|
122
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
123
|
+
* @param {number} siteId The Site ID associated with this MAF Sizer Packrun Summary
|
|
124
|
+
* @return {MAFSizerPackrunSummaryModel}
|
|
125
|
+
*/
|
|
126
|
+
static fromJSON(json, siteId)
|
|
127
|
+
{
|
|
128
|
+
let model = new MAFSizerPackrunSummaryModel(siteId);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The JSON Object
|
|
132
|
+
*
|
|
133
|
+
* @type {Object<string, any>}
|
|
134
|
+
*/
|
|
135
|
+
let jsonObject = {};
|
|
136
|
+
|
|
137
|
+
if(typeof json === 'string')
|
|
138
|
+
{
|
|
139
|
+
jsonObject = JSON.parse(json);
|
|
140
|
+
}
|
|
141
|
+
else if(typeof json === 'object')
|
|
142
|
+
{
|
|
143
|
+
jsonObject = json;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if('id' in jsonObject)
|
|
147
|
+
{
|
|
148
|
+
model.id = (function(){
|
|
149
|
+
if(typeof jsonObject['id'] !== 'string')
|
|
150
|
+
{
|
|
151
|
+
return String(jsonObject['id']);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return jsonObject['id'];
|
|
155
|
+
}());
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if('mafSizerId' in jsonObject)
|
|
159
|
+
{
|
|
160
|
+
model.mafSizerId = (function(){
|
|
161
|
+
if(typeof jsonObject['mafSizerId'] !== 'string')
|
|
162
|
+
{
|
|
163
|
+
return String(jsonObject['mafSizerId']);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return jsonObject['mafSizerId'];
|
|
167
|
+
}());
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if('packrunId' in jsonObject)
|
|
171
|
+
{
|
|
172
|
+
model.packrunId = (function(){
|
|
173
|
+
if(typeof jsonObject['packrunId'] !== 'string')
|
|
174
|
+
{
|
|
175
|
+
return String(jsonObject['packrunId']);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return jsonObject['packrunId'];
|
|
179
|
+
}());
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if('createdTimestamp' in jsonObject)
|
|
183
|
+
{
|
|
184
|
+
model.createdTimestamp = (function(){
|
|
185
|
+
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
186
|
+
{
|
|
187
|
+
return new Date(String(jsonObject['createdTimestamp']));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return new Date(jsonObject['createdTimestamp']);
|
|
191
|
+
}());
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if('timeBatchId' in jsonObject)
|
|
195
|
+
{
|
|
196
|
+
model.timeBatchId = (function(){
|
|
197
|
+
if(jsonObject['timeBatchId'] === null)
|
|
198
|
+
{
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if(typeof jsonObject['timeBatchId'] !== 'string')
|
|
203
|
+
{
|
|
204
|
+
return String(jsonObject['timeBatchId']);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return jsonObject['timeBatchId'];
|
|
208
|
+
}());
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if('classTypeSummaries' in jsonObject)
|
|
212
|
+
{
|
|
213
|
+
model.classTypeSummaries = (function(){
|
|
214
|
+
if(Array.isArray(jsonObject['classTypeSummaries']) !== true)
|
|
215
|
+
{
|
|
216
|
+
return [];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return jsonObject['classTypeSummaries'].map((classTypeSummariesItem) => {
|
|
220
|
+
return (function(){
|
|
221
|
+
let classTypeSummariesItemObject = {};
|
|
222
|
+
|
|
223
|
+
if(typeof classTypeSummariesItem === 'object' && 'classType' in classTypeSummariesItem)
|
|
224
|
+
{
|
|
225
|
+
classTypeSummariesItemObject.classType = (function(){
|
|
226
|
+
if(typeof classTypeSummariesItem.classType !== 'string')
|
|
227
|
+
{
|
|
228
|
+
return String(classTypeSummariesItem.classType);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return classTypeSummariesItem.classType;
|
|
232
|
+
}());
|
|
233
|
+
}
|
|
234
|
+
else
|
|
235
|
+
{
|
|
236
|
+
classTypeSummariesItemObject.classType = "";
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if(typeof classTypeSummariesItem === 'object' && 'totals' in classTypeSummariesItem)
|
|
240
|
+
{
|
|
241
|
+
classTypeSummariesItemObject.totals = (function(){
|
|
242
|
+
if(Array.isArray(classTypeSummariesItem.totals) !== true)
|
|
243
|
+
{
|
|
244
|
+
return [];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return classTypeSummariesItem.totals.map((totalsItem) => {
|
|
248
|
+
return (function(){
|
|
249
|
+
let totalsItemObject = {};
|
|
250
|
+
|
|
251
|
+
if(typeof totalsItem === 'object' && 'fruitSize' in totalsItem)
|
|
252
|
+
{
|
|
253
|
+
totalsItemObject.fruitSize = (function(){
|
|
254
|
+
if(typeof totalsItem.fruitSize !== 'string')
|
|
255
|
+
{
|
|
256
|
+
return String(totalsItem.fruitSize);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return totalsItem.fruitSize;
|
|
260
|
+
}());
|
|
261
|
+
}
|
|
262
|
+
else
|
|
263
|
+
{
|
|
264
|
+
totalsItemObject.fruitSize = "";
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if(typeof totalsItem === 'object' && 'packType' in totalsItem)
|
|
268
|
+
{
|
|
269
|
+
totalsItemObject.packType = (function(){
|
|
270
|
+
if(totalsItem.packType === null)
|
|
271
|
+
{
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if(typeof totalsItem.packType !== 'string')
|
|
276
|
+
{
|
|
277
|
+
return String(totalsItem.packType);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return totalsItem.packType;
|
|
281
|
+
}());
|
|
282
|
+
}
|
|
283
|
+
else
|
|
284
|
+
{
|
|
285
|
+
totalsItemObject.packType = null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if(typeof totalsItem === 'object' && 'weight' in totalsItem)
|
|
289
|
+
{
|
|
290
|
+
totalsItemObject.weight = (function(){
|
|
291
|
+
if(typeof totalsItem.weight !== 'number')
|
|
292
|
+
{
|
|
293
|
+
return Number(totalsItem.weight);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return totalsItem.weight;
|
|
297
|
+
}());
|
|
298
|
+
}
|
|
299
|
+
else
|
|
300
|
+
{
|
|
301
|
+
totalsItemObject.weight = 0;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if(typeof totalsItem === 'object' && 'fruitCount' in totalsItem)
|
|
305
|
+
{
|
|
306
|
+
totalsItemObject.fruitCount = (function(){
|
|
307
|
+
if(typeof totalsItem.fruitCount !== 'number')
|
|
308
|
+
{
|
|
309
|
+
return Number.isInteger(Number(totalsItem.fruitCount)) ? Number(totalsItem.fruitCount) : Math.floor(Number(totalsItem.fruitCount));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return Number.isInteger(totalsItem.fruitCount) ? totalsItem.fruitCount : Math.floor(totalsItem.fruitCount);
|
|
313
|
+
}());
|
|
314
|
+
}
|
|
315
|
+
else
|
|
316
|
+
{
|
|
317
|
+
totalsItemObject.fruitCount = 0;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if(typeof totalsItem === 'object' && 'packCount' in totalsItem)
|
|
321
|
+
{
|
|
322
|
+
totalsItemObject.packCount = (function(){
|
|
323
|
+
if(totalsItem.packCount === null)
|
|
324
|
+
{
|
|
325
|
+
return null;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if(typeof totalsItem.packCount !== 'number')
|
|
329
|
+
{
|
|
330
|
+
return Number(totalsItem.packCount);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return totalsItem.packCount;
|
|
334
|
+
}());
|
|
335
|
+
}
|
|
336
|
+
else
|
|
337
|
+
{
|
|
338
|
+
totalsItemObject.packCount = null;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return totalsItemObject;
|
|
342
|
+
}());
|
|
343
|
+
});
|
|
344
|
+
}());
|
|
345
|
+
}
|
|
346
|
+
else
|
|
347
|
+
{
|
|
348
|
+
classTypeSummariesItemObject.totals = [];
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return classTypeSummariesItemObject;
|
|
352
|
+
}());
|
|
353
|
+
});
|
|
354
|
+
}());
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if('initialOutletArticles' in jsonObject)
|
|
358
|
+
{
|
|
359
|
+
model.initialOutletArticles = (function(){
|
|
360
|
+
if(Array.isArray(jsonObject['initialOutletArticles']) !== true)
|
|
361
|
+
{
|
|
362
|
+
return [];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return jsonObject['initialOutletArticles'].map((initialOutletArticlesItem) => {
|
|
366
|
+
return (function(){
|
|
367
|
+
let initialOutletArticlesItemObject = {};
|
|
368
|
+
|
|
369
|
+
if(typeof initialOutletArticlesItem === 'object' && 'outletNumber' in initialOutletArticlesItem)
|
|
370
|
+
{
|
|
371
|
+
initialOutletArticlesItemObject.outletNumber = (function(){
|
|
372
|
+
if(typeof initialOutletArticlesItem.outletNumber !== 'number')
|
|
373
|
+
{
|
|
374
|
+
return Number.isInteger(Number(initialOutletArticlesItem.outletNumber)) ? Number(initialOutletArticlesItem.outletNumber) : Math.floor(Number(initialOutletArticlesItem.outletNumber));
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return Number.isInteger(initialOutletArticlesItem.outletNumber) ? initialOutletArticlesItem.outletNumber : Math.floor(initialOutletArticlesItem.outletNumber);
|
|
378
|
+
}());
|
|
379
|
+
}
|
|
380
|
+
else
|
|
381
|
+
{
|
|
382
|
+
initialOutletArticlesItemObject.outletNumber = 0;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if(typeof initialOutletArticlesItem === 'object' && 'articleName' in initialOutletArticlesItem)
|
|
386
|
+
{
|
|
387
|
+
initialOutletArticlesItemObject.articleName = (function(){
|
|
388
|
+
if(initialOutletArticlesItem.articleName === null)
|
|
389
|
+
{
|
|
390
|
+
return null;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if(typeof initialOutletArticlesItem.articleName !== 'string')
|
|
394
|
+
{
|
|
395
|
+
return String(initialOutletArticlesItem.articleName);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return initialOutletArticlesItem.articleName;
|
|
399
|
+
}());
|
|
400
|
+
}
|
|
401
|
+
else
|
|
402
|
+
{
|
|
403
|
+
initialOutletArticlesItemObject.articleName = null;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return initialOutletArticlesItemObject;
|
|
407
|
+
}());
|
|
408
|
+
});
|
|
409
|
+
}());
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if('initialOutletTypes' in jsonObject)
|
|
413
|
+
{
|
|
414
|
+
model.initialOutletTypes = (function(){
|
|
415
|
+
if(Array.isArray(jsonObject['initialOutletTypes']) !== true)
|
|
416
|
+
{
|
|
417
|
+
return [];
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
return jsonObject['initialOutletTypes'].map((initialOutletTypesItem) => {
|
|
421
|
+
return (function(){
|
|
422
|
+
let initialOutletTypesItemObject = {};
|
|
423
|
+
|
|
424
|
+
if(typeof initialOutletTypesItem === 'object' && 'outletNumber' in initialOutletTypesItem)
|
|
425
|
+
{
|
|
426
|
+
initialOutletTypesItemObject.outletNumber = (function(){
|
|
427
|
+
if(typeof initialOutletTypesItem.outletNumber !== 'number')
|
|
428
|
+
{
|
|
429
|
+
return Number.isInteger(Number(initialOutletTypesItem.outletNumber)) ? Number(initialOutletTypesItem.outletNumber) : Math.floor(Number(initialOutletTypesItem.outletNumber));
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return Number.isInteger(initialOutletTypesItem.outletNumber) ? initialOutletTypesItem.outletNumber : Math.floor(initialOutletTypesItem.outletNumber);
|
|
433
|
+
}());
|
|
434
|
+
}
|
|
435
|
+
else
|
|
436
|
+
{
|
|
437
|
+
initialOutletTypesItemObject.outletNumber = 0;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
if(typeof initialOutletTypesItem === 'object' && 'type' in initialOutletTypesItem)
|
|
441
|
+
{
|
|
442
|
+
initialOutletTypesItemObject.type = (function(){
|
|
443
|
+
if(typeof initialOutletTypesItem.type !== 'string')
|
|
444
|
+
{
|
|
445
|
+
return String(initialOutletTypesItem.type);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return initialOutletTypesItem.type;
|
|
449
|
+
}());
|
|
450
|
+
}
|
|
451
|
+
else
|
|
452
|
+
{
|
|
453
|
+
initialOutletTypesItemObject.type = "";
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if(typeof initialOutletTypesItem === 'object' && 'typeId' in initialOutletTypesItem)
|
|
457
|
+
{
|
|
458
|
+
initialOutletTypesItemObject.typeId = (function(){
|
|
459
|
+
if(initialOutletTypesItem.typeId === null)
|
|
460
|
+
{
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
if(typeof initialOutletTypesItem.typeId !== 'string')
|
|
465
|
+
{
|
|
466
|
+
return String(initialOutletTypesItem.typeId);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return initialOutletTypesItem.typeId;
|
|
470
|
+
}());
|
|
471
|
+
}
|
|
472
|
+
else
|
|
473
|
+
{
|
|
474
|
+
initialOutletTypesItemObject.typeId = null;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
return initialOutletTypesItemObject;
|
|
478
|
+
}());
|
|
479
|
+
});
|
|
480
|
+
}());
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if('deleted' in jsonObject)
|
|
484
|
+
{
|
|
485
|
+
model.deleted = (function(){
|
|
486
|
+
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
487
|
+
{
|
|
488
|
+
return Boolean(jsonObject['deleted']);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
return jsonObject['deleted'];
|
|
492
|
+
}());
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if('updateTimestamp' in jsonObject)
|
|
496
|
+
{
|
|
497
|
+
model.updateTimestamp = (function(){
|
|
498
|
+
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
499
|
+
{
|
|
500
|
+
return new Date(String(jsonObject['updateTimestamp']));
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return new Date(jsonObject['updateTimestamp']);
|
|
504
|
+
}());
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
return model;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export default MAFSizerPackrunSummaryModel;
|
|
@@ -97,6 +97,22 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
97
97
|
*/
|
|
98
98
|
this.averageManningTarget = null;
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* The Average Target Number of People that should be working in all Areas except Class 2 for this Hour
|
|
102
|
+
*
|
|
103
|
+
* @type {?number}
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
this.averageClass1ManningTarget = null;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The Average Target Number of People that should be working in the Class 2 Area for this Hour
|
|
110
|
+
*
|
|
111
|
+
* @type {?number}
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
this.averageClass2ManningTarget = null;
|
|
115
|
+
|
|
100
116
|
/**
|
|
101
117
|
* The Average Cost per Person working in all Areas for this Hour
|
|
102
118
|
*
|
|
@@ -106,13 +122,21 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
106
122
|
this.averageCostPerManningUnit = null;
|
|
107
123
|
|
|
108
124
|
/**
|
|
109
|
-
* The Percentage of Total Tray Equivalents that are Layered for this Hour
|
|
125
|
+
* The Actual Percentage of Total Tray Equivalents that are Layered for this Hour
|
|
110
126
|
*
|
|
111
127
|
* @type {?number}
|
|
112
128
|
* @public
|
|
113
129
|
*/
|
|
114
130
|
this.layeredTrayPercentage = null;
|
|
115
131
|
|
|
132
|
+
/**
|
|
133
|
+
* The Target Percentage of Total Tray Equivalents that should be Layered for this Hour
|
|
134
|
+
*
|
|
135
|
+
* @type {?number}
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
this.layeredTrayPercentageTarget = null;
|
|
139
|
+
|
|
116
140
|
/**
|
|
117
141
|
* The Average Class 1 Percentage for this Hour
|
|
118
142
|
*
|
|
@@ -140,7 +164,7 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
140
164
|
/**
|
|
141
165
|
* An Array of Custom Quality Data Items for this Hour
|
|
142
166
|
*
|
|
143
|
-
* @type {Array<{id: string, name: string, type: string, value: number, averageTarget: number}>}
|
|
167
|
+
* @type {Array<{id: string, name: string, type: string, value: number, averageTarget: ?number}>}
|
|
144
168
|
* @public
|
|
145
169
|
*/
|
|
146
170
|
this.customQualityData = [];
|
|
@@ -202,7 +226,7 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
202
226
|
this.class1TraysPerHourExcludingDowntimeTarget = 0;
|
|
203
227
|
|
|
204
228
|
/**
|
|
205
|
-
* The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning
|
|
229
|
+
* The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %) for this Hour
|
|
206
230
|
*
|
|
207
231
|
* @type {?number}
|
|
208
232
|
* @public
|
|
@@ -218,7 +242,7 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
218
242
|
this.averageCostPerTray = null;
|
|
219
243
|
|
|
220
244
|
/**
|
|
221
|
-
* The Average Cost per Tray Equivalent Target for this Hour
|
|
245
|
+
* The Average Cost per Tray Equivalent Target after Adjustment (Class 1 %, Soft-Sort %) for this Hour
|
|
222
246
|
*
|
|
223
247
|
* @type {?number}
|
|
224
248
|
* @public
|
|
@@ -538,6 +562,40 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
538
562
|
}());
|
|
539
563
|
}
|
|
540
564
|
|
|
565
|
+
if('averageClass1ManningTarget' in jsonObject)
|
|
566
|
+
{
|
|
567
|
+
model.averageClass1ManningTarget = (function(){
|
|
568
|
+
if(jsonObject['averageClass1ManningTarget'] === null)
|
|
569
|
+
{
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
if(typeof jsonObject['averageClass1ManningTarget'] !== 'number')
|
|
574
|
+
{
|
|
575
|
+
return Number.isInteger(Number(jsonObject['averageClass1ManningTarget'])) ? Number(jsonObject['averageClass1ManningTarget']) : Math.floor(Number(jsonObject['averageClass1ManningTarget']));
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return Number.isInteger(jsonObject['averageClass1ManningTarget']) ? jsonObject['averageClass1ManningTarget'] : Math.floor(jsonObject['averageClass1ManningTarget']);
|
|
579
|
+
}());
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if('averageClass2ManningTarget' in jsonObject)
|
|
583
|
+
{
|
|
584
|
+
model.averageClass2ManningTarget = (function(){
|
|
585
|
+
if(jsonObject['averageClass2ManningTarget'] === null)
|
|
586
|
+
{
|
|
587
|
+
return null;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
if(typeof jsonObject['averageClass2ManningTarget'] !== 'number')
|
|
591
|
+
{
|
|
592
|
+
return Number.isInteger(Number(jsonObject['averageClass2ManningTarget'])) ? Number(jsonObject['averageClass2ManningTarget']) : Math.floor(Number(jsonObject['averageClass2ManningTarget']));
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
return Number.isInteger(jsonObject['averageClass2ManningTarget']) ? jsonObject['averageClass2ManningTarget'] : Math.floor(jsonObject['averageClass2ManningTarget']);
|
|
596
|
+
}());
|
|
597
|
+
}
|
|
598
|
+
|
|
541
599
|
if('averageCostPerManningUnit' in jsonObject)
|
|
542
600
|
{
|
|
543
601
|
model.averageCostPerManningUnit = (function(){
|
|
@@ -572,6 +630,23 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
572
630
|
}());
|
|
573
631
|
}
|
|
574
632
|
|
|
633
|
+
if('layeredTrayPercentageTarget' in jsonObject)
|
|
634
|
+
{
|
|
635
|
+
model.layeredTrayPercentageTarget = (function(){
|
|
636
|
+
if(jsonObject['layeredTrayPercentageTarget'] === null)
|
|
637
|
+
{
|
|
638
|
+
return null;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
if(typeof jsonObject['layeredTrayPercentageTarget'] !== 'number')
|
|
642
|
+
{
|
|
643
|
+
return Number(jsonObject['layeredTrayPercentageTarget']);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
return jsonObject['layeredTrayPercentageTarget'];
|
|
647
|
+
}());
|
|
648
|
+
}
|
|
649
|
+
|
|
575
650
|
if('averageClass1Percentage' in jsonObject)
|
|
576
651
|
{
|
|
577
652
|
model.averageClass1Percentage = (function(){
|
|
@@ -702,6 +777,11 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
702
777
|
if(typeof customQualityDataItem === 'object' && 'averageTarget' in customQualityDataItem)
|
|
703
778
|
{
|
|
704
779
|
customQualityDataItemObject.averageTarget = (function(){
|
|
780
|
+
if(customQualityDataItem.averageTarget === null)
|
|
781
|
+
{
|
|
782
|
+
return null;
|
|
783
|
+
}
|
|
784
|
+
|
|
705
785
|
if(typeof customQualityDataItem.averageTarget !== 'number')
|
|
706
786
|
{
|
|
707
787
|
return Number(customQualityDataItem.averageTarget);
|
|
@@ -712,7 +792,7 @@ class ShiftHourlyEntryModel extends BaseModel
|
|
|
712
792
|
}
|
|
713
793
|
else
|
|
714
794
|
{
|
|
715
|
-
customQualityDataItemObject.averageTarget =
|
|
795
|
+
customQualityDataItemObject.averageTarget = null;
|
|
716
796
|
}
|
|
717
797
|
|
|
718
798
|
return customQualityDataItemObject;
|
|
@@ -20,6 +20,10 @@ import DowntimeEventModel from './DowntimeEventModel';
|
|
|
20
20
|
import FreshPackPackrunSummaryModel from './FreshPackPackrunSummaryModel';
|
|
21
21
|
import FreshQualityPackrunSummaryModel from './FreshQualityPackrunSummaryModel';
|
|
22
22
|
import GrowingMethodModel from './GrowingMethodModel';
|
|
23
|
+
import MAFSizerBatchModel from './MAFSizerBatchModel';
|
|
24
|
+
import MAFSizerModel from './MAFSizerModel';
|
|
25
|
+
import MAFSizerOutletArticleChangeModel from './MAFSizerOutletArticleChangeModel';
|
|
26
|
+
import MAFSizerPackrunSummaryModel from './MAFSizerPackrunSummaryModel';
|
|
23
27
|
import PackTypeModel from './PackTypeModel';
|
|
24
28
|
import PackingLineModel from './PackingLineModel';
|
|
25
29
|
import PackrunModel from './PackrunModel';
|
|
@@ -49,6 +53,10 @@ const Site = {
|
|
|
49
53
|
FreshPackPackrunSummaryModel,
|
|
50
54
|
FreshQualityPackrunSummaryModel,
|
|
51
55
|
GrowingMethodModel,
|
|
56
|
+
MAFSizerBatchModel,
|
|
57
|
+
MAFSizerModel,
|
|
58
|
+
MAFSizerOutletArticleChangeModel,
|
|
59
|
+
MAFSizerPackrunSummaryModel,
|
|
52
60
|
PackTypeModel,
|
|
53
61
|
PackingLineModel,
|
|
54
62
|
PackrunModel,
|
package/src/PackageVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
//
|
|
2
|
-
export const version = '2.3.
|
|
1
|
+
// Generated by genversion.
|
|
2
|
+
export const version = '2.3.11';
|