@ricado/api-client 1.4.1 → 2.1.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/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/AccountPolicyController.js +1 -1
- package/lib/Controllers/ApiAccountController.js +2 -2
- package/lib/Controllers/CompanyController.js +1 -1
- package/lib/Controllers/FirebaseTokenController.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +1 -1
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +2 -2
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +1 -1
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +2 -2
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +2 -2
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +2 -2
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +1 -1
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +1 -1
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +1 -1
- package/lib/Controllers/Packhouse/Site/PackrunController.js +288 -2
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +2 -2
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +1 -1
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +2 -2
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +2 -2
- package/lib/Controllers/Packhouse/Site/VarietyController.js +1 -1
- package/lib/Controllers/RTU/GlobalSettingsController.js +2 -2
- package/lib/Controllers/RTU/PluginSettingsController.js +2 -2
- package/lib/Controllers/RTUController.js +1 -1
- package/lib/Controllers/RTUPluginController.js +1 -1
- package/lib/Controllers/Site/AlarmController.js +2 -2
- package/lib/Controllers/Site/AlarmGroupController.js +1 -1
- package/lib/Controllers/Site/DefinitionController.js +1 -1
- package/lib/Controllers/Site/PermanentObjectController.js +1 -1
- package/lib/Controllers/Site/PermanentObjectDataController.js +2 -2
- package/lib/Controllers/Site/PointController.js +2 -2
- package/lib/Controllers/Site/TemporaryObjectController.js +1 -1
- package/lib/Controllers/SiteController.js +1 -1
- package/lib/Controllers/TokenController.js +2 -2
- package/lib/Controllers/ToolsController.js +1 -1
- package/lib/Controllers/UserAccountActionTokenController.js +2 -2
- package/lib/Controllers/UserAccountController.js +2 -2
- package/lib/DataItems/PointValueItem.js +2 -2
- package/lib/Errors/BadRequestError.js +7 -3
- package/lib/Errors/ForbiddenError.js +7 -3
- package/lib/Errors/NetworkError.js +7 -3
- package/lib/Errors/NotAllowedError.js +7 -3
- package/lib/Errors/NotFoundError.js +7 -3
- package/lib/Errors/ServerError.js +7 -3
- package/lib/Errors/UnauthorizedError.js +7 -3
- package/lib/Models/AccountPolicyModel.js +29 -133
- package/lib/Models/ApiAccountModel.js +29 -133
- package/lib/Models/BaseModel.js +6 -2
- package/lib/Models/CompanyModel.js +23 -101
- package/lib/Models/FirebaseTokenModel.js +32 -149
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +43 -185
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +40 -169
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +58 -265
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +46 -201
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +40 -169
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +34 -137
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +52 -233
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +58 -265
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +40 -169
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +34 -137
- package/lib/Models/Packhouse/Site/PackTypeModel.js +40 -169
- package/lib/Models/Packhouse/Site/PackingLineModel.js +61 -281
- package/lib/Models/Packhouse/Site/PackrunModel.js +61 -281
- package/lib/Models/Packhouse/Site/RejectBinModel.js +43 -185
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +52 -233
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +46 -201
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +52 -233
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +127 -633
- package/lib/Models/Packhouse/Site/ShiftModel.js +73 -345
- package/lib/Models/Packhouse/Site/VarietyModel.js +40 -169
- package/lib/Models/RTUModel.js +26 -117
- package/lib/Models/RTUPluginModel.js +23 -101
- package/lib/Models/Site/AlarmGroupModel.js +37 -153
- package/lib/Models/Site/AlarmModel.js +67 -313
- package/lib/Models/Site/DefinitionModel.js +34 -137
- package/lib/Models/Site/PermanentObjectDataModel.js +40 -169
- package/lib/Models/Site/PermanentObjectModel.js +37 -153
- package/lib/Models/Site/PointModel.js +49 -217
- package/lib/Models/Site/TemporaryObjectModel.js +34 -137
- package/lib/Models/Site/index.js +0 -3
- package/lib/Models/SiteModel.js +26 -117
- package/lib/Models/TokenModel.js +38 -181
- package/lib/Models/UserAccountActionTokenModel.js +41 -197
- package/lib/Models/UserAccountModel.js +38 -181
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +1 -1
- package/lib/RequestHelper.js +2 -2
- package/lib/WebSocketHelper.js +1 -1
- package/lib/index.d.ts +945 -1206
- package/package.json +3 -3
- package/src/Controllers/Packhouse/Site/PackrunController.js +361 -0
- package/src/Models/AccountPolicyModel.js +21 -117
- package/src/Models/ApiAccountModel.js +21 -117
- package/src/Models/CompanyModel.js +15 -87
- package/src/Models/FirebaseTokenModel.js +24 -132
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +32 -163
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +29 -148
- package/src/Models/Packhouse/Site/CompacSizerModel.js +47 -238
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +35 -178
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +29 -148
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +23 -118
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +41 -208
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +47 -238
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +29 -148
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +23 -118
- package/src/Models/Packhouse/Site/PackTypeModel.js +29 -148
- package/src/Models/Packhouse/Site/PackingLineModel.js +50 -253
- package/src/Models/Packhouse/Site/PackrunModel.js +50 -253
- package/src/Models/Packhouse/Site/RejectBinModel.js +32 -163
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +41 -208
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +35 -178
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +41 -208
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +116 -583
- package/src/Models/Packhouse/Site/ShiftModel.js +62 -313
- package/src/Models/Packhouse/Site/VarietyModel.js +29 -148
- package/src/Models/RTUModel.js +18 -102
- package/src/Models/RTUPluginModel.js +15 -87
- package/src/Models/Site/AlarmGroupModel.js +26 -133
- package/src/Models/Site/AlarmModel.js +56 -283
- package/src/Models/Site/DefinitionModel.js +23 -118
- package/src/Models/Site/PermanentObjectDataModel.js +29 -148
- package/src/Models/Site/PermanentObjectModel.js +26 -133
- package/src/Models/Site/PointModel.js +38 -193
- package/src/Models/Site/TemporaryObjectModel.js +23 -118
- package/src/Models/Site/index.js +0 -2
- package/src/Models/SiteModel.js +18 -102
- package/src/Models/TokenModel.js +30 -162
- package/src/Models/UserAccountActionTokenModel.js +33 -177
- package/src/Models/UserAccountModel.js +30 -162
- package/src/PackageVersion.js +1 -1
- package/lib/Models/Site/BaseSiteModel.js +0 -58
- package/src/Models/Site/BaseSiteModel.js +0 -30
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* Do Not Edit this File Manually!
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import BaseModel from '../../../Models/BaseModel';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Model Class for a Packrun
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
14
|
-
* @extends
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class PackrunModel extends
|
|
16
|
+
class PackrunModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* PackrunModel Constructor
|
|
@@ -29,332 +29,129 @@ class PackrunModel extends BaseSiteModel
|
|
|
29
29
|
* The Packrun ID
|
|
30
30
|
*
|
|
31
31
|
* @type {string}
|
|
32
|
-
* @
|
|
32
|
+
* @public
|
|
33
33
|
*/
|
|
34
|
-
this.
|
|
34
|
+
this.id = undefined;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The Packing Line ID this Packrun is associated with
|
|
38
38
|
*
|
|
39
39
|
* @type {string}
|
|
40
|
-
* @
|
|
40
|
+
* @public
|
|
41
41
|
*/
|
|
42
|
-
this.
|
|
42
|
+
this.packingLineId = undefined;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* The Packrun Name
|
|
46
46
|
*
|
|
47
47
|
* @type {string}
|
|
48
|
-
* @
|
|
48
|
+
* @public
|
|
49
49
|
*/
|
|
50
|
-
this.
|
|
50
|
+
this.name = undefined;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* When this Packrun was Created
|
|
54
54
|
*
|
|
55
55
|
* @type {Date}
|
|
56
|
-
* @
|
|
56
|
+
* @public
|
|
57
57
|
*/
|
|
58
|
-
this.
|
|
58
|
+
this.createdTimestamp = undefined;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* The Grower Name for this Packrun
|
|
62
62
|
*
|
|
63
63
|
* @type {string}
|
|
64
|
-
* @
|
|
64
|
+
* @public
|
|
65
65
|
*/
|
|
66
|
-
this.
|
|
66
|
+
this.growerName = undefined;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* The Grower Code for this Packrun
|
|
70
70
|
*
|
|
71
71
|
* @type {string}
|
|
72
|
-
* @
|
|
72
|
+
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.growerCode = undefined;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* The Maturity Area for this Packrun
|
|
78
78
|
*
|
|
79
79
|
* @type {string}
|
|
80
|
-
* @
|
|
80
|
+
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
82
|
+
this.maturityArea = undefined;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* When this Packrun was Started
|
|
86
86
|
*
|
|
87
87
|
* @type {?Date}
|
|
88
|
-
* @
|
|
88
|
+
* @public
|
|
89
89
|
*/
|
|
90
|
-
this.
|
|
90
|
+
this.startTimestamp = undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* When this Packrun was Finished
|
|
94
94
|
*
|
|
95
95
|
* @type {?Date}
|
|
96
|
-
* @
|
|
96
|
+
* @public
|
|
97
97
|
*/
|
|
98
|
-
this.
|
|
98
|
+
this.finishTimestamp = undefined;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* The Variety for this Packrun
|
|
102
102
|
*
|
|
103
103
|
* @type {string}
|
|
104
|
-
* @
|
|
104
|
+
* @public
|
|
105
105
|
*/
|
|
106
|
-
this.
|
|
106
|
+
this.varietyId = undefined;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* The Growing Method for this Packrun
|
|
110
110
|
*
|
|
111
111
|
* @type {?string}
|
|
112
|
-
* @
|
|
112
|
+
* @public
|
|
113
113
|
*/
|
|
114
|
-
this.
|
|
114
|
+
this.growingMethodId = undefined;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* The Number of Allocated Bins for this Packrun
|
|
118
118
|
*
|
|
119
119
|
* @type {number}
|
|
120
|
-
* @
|
|
120
|
+
* @public
|
|
121
121
|
*/
|
|
122
|
-
this.
|
|
122
|
+
this.allocatedBins = undefined;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* The Time Batches for this Packrun
|
|
126
126
|
*
|
|
127
127
|
* @type {Object[]}
|
|
128
|
-
* @
|
|
128
|
+
* @public
|
|
129
129
|
*/
|
|
130
|
-
this.
|
|
130
|
+
this.timeBatches = undefined;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Whether the Packrun has been deleted
|
|
134
134
|
*
|
|
135
135
|
* @type {boolean}
|
|
136
|
-
* @
|
|
136
|
+
* @public
|
|
137
137
|
*/
|
|
138
|
-
this.
|
|
138
|
+
this.deleted = undefined;
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* When the Packrun was last updated
|
|
142
142
|
*
|
|
143
143
|
* @type {Date}
|
|
144
|
-
* @
|
|
144
|
+
* @public
|
|
145
145
|
*/
|
|
146
|
-
this.
|
|
146
|
+
this.updateTimestamp = undefined;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* The Site ID associated with this Packrun
|
|
150
150
|
*
|
|
151
151
|
* @type {number}
|
|
152
|
-
* @
|
|
152
|
+
* @public
|
|
153
153
|
*/
|
|
154
|
-
this.
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* The Packrun ID
|
|
159
|
-
*
|
|
160
|
-
* @public
|
|
161
|
-
* @type {string}
|
|
162
|
-
*/
|
|
163
|
-
get id()
|
|
164
|
-
{
|
|
165
|
-
return this._id;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* The Packing Line ID this Packrun is associated with
|
|
170
|
-
*
|
|
171
|
-
* @public
|
|
172
|
-
* @type {string}
|
|
173
|
-
*/
|
|
174
|
-
get packingLineId()
|
|
175
|
-
{
|
|
176
|
-
return this._packingLineId;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* The Packrun Name
|
|
181
|
-
*
|
|
182
|
-
* @public
|
|
183
|
-
* @type {string}
|
|
184
|
-
*/
|
|
185
|
-
get name()
|
|
186
|
-
{
|
|
187
|
-
return this._name;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* When this Packrun was Created
|
|
192
|
-
*
|
|
193
|
-
* @public
|
|
194
|
-
* @type {Date}
|
|
195
|
-
*/
|
|
196
|
-
get createdTimestamp()
|
|
197
|
-
{
|
|
198
|
-
return this._createdTimestamp;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* The Grower Name for this Packrun
|
|
203
|
-
*
|
|
204
|
-
* @public
|
|
205
|
-
* @type {string}
|
|
206
|
-
*/
|
|
207
|
-
get growerName()
|
|
208
|
-
{
|
|
209
|
-
return this._growerName;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* The Grower Code for this Packrun
|
|
214
|
-
*
|
|
215
|
-
* @public
|
|
216
|
-
* @type {string}
|
|
217
|
-
*/
|
|
218
|
-
get growerCode()
|
|
219
|
-
{
|
|
220
|
-
return this._growerCode;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* The Maturity Area for this Packrun
|
|
225
|
-
*
|
|
226
|
-
* @public
|
|
227
|
-
* @type {string}
|
|
228
|
-
*/
|
|
229
|
-
get maturityArea()
|
|
230
|
-
{
|
|
231
|
-
return this._maturityArea;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* When this Packrun was Started
|
|
236
|
-
*
|
|
237
|
-
* @public
|
|
238
|
-
* @type {?Date}
|
|
239
|
-
*/
|
|
240
|
-
get startTimestamp()
|
|
241
|
-
{
|
|
242
|
-
return this._startTimestamp;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* When this Packrun was Finished
|
|
247
|
-
*
|
|
248
|
-
* @public
|
|
249
|
-
* @type {?Date}
|
|
250
|
-
*/
|
|
251
|
-
get finishTimestamp()
|
|
252
|
-
{
|
|
253
|
-
return this._finishTimestamp;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* The Variety for this Packrun
|
|
258
|
-
*
|
|
259
|
-
* @public
|
|
260
|
-
* @type {string}
|
|
261
|
-
*/
|
|
262
|
-
get varietyId()
|
|
263
|
-
{
|
|
264
|
-
return this._varietyId;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* The Growing Method for this Packrun
|
|
269
|
-
*
|
|
270
|
-
* @public
|
|
271
|
-
* @type {?string}
|
|
272
|
-
*/
|
|
273
|
-
get growingMethodId()
|
|
274
|
-
{
|
|
275
|
-
return this._growingMethodId;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* The Number of Allocated Bins for this Packrun
|
|
280
|
-
*
|
|
281
|
-
* @public
|
|
282
|
-
* @type {number}
|
|
283
|
-
*/
|
|
284
|
-
get allocatedBins()
|
|
285
|
-
{
|
|
286
|
-
return this._allocatedBins;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* The Time Batches for this Packrun
|
|
291
|
-
*
|
|
292
|
-
* @public
|
|
293
|
-
* @type {Object[]}
|
|
294
|
-
*/
|
|
295
|
-
get timeBatches()
|
|
296
|
-
{
|
|
297
|
-
return this._timeBatches;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Whether the Packrun has been deleted
|
|
302
|
-
*
|
|
303
|
-
* @public
|
|
304
|
-
* @type {boolean}
|
|
305
|
-
*/
|
|
306
|
-
get deleted()
|
|
307
|
-
{
|
|
308
|
-
return this._deleted;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* When the Packrun was last updated
|
|
313
|
-
*
|
|
314
|
-
* @public
|
|
315
|
-
* @type {Date}
|
|
316
|
-
*/
|
|
317
|
-
get updateTimestamp()
|
|
318
|
-
{
|
|
319
|
-
return this._updateTimestamp;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* The Site ID associated with this Packrun
|
|
324
|
-
*
|
|
325
|
-
* @public
|
|
326
|
-
* @type {number}
|
|
327
|
-
*/
|
|
328
|
-
get siteId()
|
|
329
|
-
{
|
|
330
|
-
return this._siteId;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Convert this **PackrunModel** to a JSON Object
|
|
335
|
-
*
|
|
336
|
-
* @public
|
|
337
|
-
* @return {Object<string, any>}
|
|
338
|
-
*/
|
|
339
|
-
toJSON()
|
|
340
|
-
{
|
|
341
|
-
return {
|
|
342
|
-
id: this._id,
|
|
343
|
-
packingLineId: this._packingLineId,
|
|
344
|
-
name: this._name,
|
|
345
|
-
createdTimestamp: this._createdTimestamp,
|
|
346
|
-
growerName: this._growerName,
|
|
347
|
-
growerCode: this._growerCode,
|
|
348
|
-
maturityArea: this._maturityArea,
|
|
349
|
-
startTimestamp: this._startTimestamp,
|
|
350
|
-
finishTimestamp: this._finishTimestamp,
|
|
351
|
-
varietyId: this._varietyId,
|
|
352
|
-
growingMethodId: this._growingMethodId,
|
|
353
|
-
allocatedBins: this._allocatedBins,
|
|
354
|
-
timeBatches: this._timeBatches,
|
|
355
|
-
deleted: this._deleted,
|
|
356
|
-
updateTimestamp: this._updateTimestamp
|
|
357
|
-
};
|
|
154
|
+
this.siteId = siteId;
|
|
358
155
|
}
|
|
359
156
|
|
|
360
157
|
/**
|
|
@@ -388,7 +185,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
388
185
|
|
|
389
186
|
if('id' in jsonObject)
|
|
390
187
|
{
|
|
391
|
-
model.
|
|
188
|
+
model.id = (function(){
|
|
392
189
|
if(typeof jsonObject['id'] !== 'string')
|
|
393
190
|
{
|
|
394
191
|
return String(jsonObject['id']);
|
|
@@ -400,7 +197,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
400
197
|
|
|
401
198
|
if('packingLineId' in jsonObject)
|
|
402
199
|
{
|
|
403
|
-
model.
|
|
200
|
+
model.packingLineId = (function(){
|
|
404
201
|
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
405
202
|
{
|
|
406
203
|
return String(jsonObject['packingLineId']);
|
|
@@ -412,7 +209,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
412
209
|
|
|
413
210
|
if('name' in jsonObject)
|
|
414
211
|
{
|
|
415
|
-
model.
|
|
212
|
+
model.name = (function(){
|
|
416
213
|
if(typeof jsonObject['name'] !== 'string')
|
|
417
214
|
{
|
|
418
215
|
return String(jsonObject['name']);
|
|
@@ -424,7 +221,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
424
221
|
|
|
425
222
|
if('createdTimestamp' in jsonObject)
|
|
426
223
|
{
|
|
427
|
-
model.
|
|
224
|
+
model.createdTimestamp = (function(){
|
|
428
225
|
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
429
226
|
{
|
|
430
227
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
@@ -436,7 +233,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
436
233
|
|
|
437
234
|
if('growerName' in jsonObject)
|
|
438
235
|
{
|
|
439
|
-
model.
|
|
236
|
+
model.growerName = (function(){
|
|
440
237
|
if(typeof jsonObject['growerName'] !== 'string')
|
|
441
238
|
{
|
|
442
239
|
return String(jsonObject['growerName']);
|
|
@@ -448,7 +245,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
448
245
|
|
|
449
246
|
if('growerCode' in jsonObject)
|
|
450
247
|
{
|
|
451
|
-
model.
|
|
248
|
+
model.growerCode = (function(){
|
|
452
249
|
if(typeof jsonObject['growerCode'] !== 'string')
|
|
453
250
|
{
|
|
454
251
|
return String(jsonObject['growerCode']);
|
|
@@ -460,7 +257,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
460
257
|
|
|
461
258
|
if('maturityArea' in jsonObject)
|
|
462
259
|
{
|
|
463
|
-
model.
|
|
260
|
+
model.maturityArea = (function(){
|
|
464
261
|
if(typeof jsonObject['maturityArea'] !== 'string')
|
|
465
262
|
{
|
|
466
263
|
return String(jsonObject['maturityArea']);
|
|
@@ -472,7 +269,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
472
269
|
|
|
473
270
|
if('startTimestamp' in jsonObject)
|
|
474
271
|
{
|
|
475
|
-
model.
|
|
272
|
+
model.startTimestamp = (function(){
|
|
476
273
|
if(jsonObject['startTimestamp'] === null)
|
|
477
274
|
{
|
|
478
275
|
return null;
|
|
@@ -489,7 +286,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
489
286
|
|
|
490
287
|
if('finishTimestamp' in jsonObject)
|
|
491
288
|
{
|
|
492
|
-
model.
|
|
289
|
+
model.finishTimestamp = (function(){
|
|
493
290
|
if(jsonObject['finishTimestamp'] === null)
|
|
494
291
|
{
|
|
495
292
|
return null;
|
|
@@ -506,7 +303,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
506
303
|
|
|
507
304
|
if('varietyId' in jsonObject)
|
|
508
305
|
{
|
|
509
|
-
model.
|
|
306
|
+
model.varietyId = (function(){
|
|
510
307
|
if(typeof jsonObject['varietyId'] !== 'string')
|
|
511
308
|
{
|
|
512
309
|
return String(jsonObject['varietyId']);
|
|
@@ -518,7 +315,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
518
315
|
|
|
519
316
|
if('growingMethodId' in jsonObject)
|
|
520
317
|
{
|
|
521
|
-
model.
|
|
318
|
+
model.growingMethodId = (function(){
|
|
522
319
|
if(jsonObject['growingMethodId'] === null)
|
|
523
320
|
{
|
|
524
321
|
return null;
|
|
@@ -535,7 +332,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
535
332
|
|
|
536
333
|
if('allocatedBins' in jsonObject)
|
|
537
334
|
{
|
|
538
|
-
model.
|
|
335
|
+
model.allocatedBins = (function(){
|
|
539
336
|
if(typeof jsonObject['allocatedBins'] !== 'number')
|
|
540
337
|
{
|
|
541
338
|
return Number.isInteger(Number(jsonObject['allocatedBins'])) ? Number(jsonObject['allocatedBins']) : Math.floor(Number(jsonObject['allocatedBins']));
|
|
@@ -547,7 +344,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
547
344
|
|
|
548
345
|
if('timeBatches' in jsonObject)
|
|
549
346
|
{
|
|
550
|
-
model.
|
|
347
|
+
model.timeBatches = (function(){
|
|
551
348
|
if(Array.isArray(jsonObject['timeBatches']) !== true)
|
|
552
349
|
{
|
|
553
350
|
return [];
|
|
@@ -568,7 +365,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
568
365
|
|
|
569
366
|
if('deleted' in jsonObject)
|
|
570
367
|
{
|
|
571
|
-
model.
|
|
368
|
+
model.deleted = (function(){
|
|
572
369
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
573
370
|
{
|
|
574
371
|
return Boolean(jsonObject['deleted']);
|
|
@@ -580,7 +377,7 @@ class PackrunModel extends BaseSiteModel
|
|
|
580
377
|
|
|
581
378
|
if('updateTimestamp' in jsonObject)
|
|
582
379
|
{
|
|
583
|
-
model.
|
|
380
|
+
model.updateTimestamp = (function(){
|
|
584
381
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
585
382
|
{
|
|
586
383
|
return new Date(String(jsonObject['updateTimestamp']));
|