@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 Shift
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
14
|
-
* @extends
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class ShiftModel extends
|
|
16
|
+
class ShiftModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* ShiftModel Constructor
|
|
@@ -29,412 +29,161 @@ class ShiftModel extends BaseSiteModel
|
|
|
29
29
|
* The Shift 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 Shift 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
|
* When this Shift was Created
|
|
46
46
|
*
|
|
47
47
|
* @type {Date}
|
|
48
|
-
* @
|
|
48
|
+
* @public
|
|
49
49
|
*/
|
|
50
|
-
this.
|
|
50
|
+
this.createdTimestamp = undefined;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* The Type of Shift
|
|
54
54
|
*
|
|
55
55
|
* @type {string}
|
|
56
|
-
* @
|
|
56
|
+
* @public
|
|
57
57
|
*/
|
|
58
|
-
this.
|
|
58
|
+
this.type = undefined;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* The Name of the Line Manager for this Shift
|
|
62
62
|
*
|
|
63
63
|
* @type {?string}
|
|
64
|
-
* @
|
|
64
|
+
* @public
|
|
65
65
|
*/
|
|
66
|
-
this.
|
|
66
|
+
this.lineManagerName = undefined;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* The Target Number of Bins to Tip for this Shift
|
|
70
70
|
*
|
|
71
71
|
* @type {?number}
|
|
72
|
-
* @
|
|
72
|
+
* @public
|
|
73
73
|
*/
|
|
74
|
-
this.
|
|
74
|
+
this.binsTippedTarget = undefined;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
|
|
78
78
|
*
|
|
79
79
|
* @type {?number}
|
|
80
|
-
* @
|
|
80
|
+
* @public
|
|
81
81
|
*/
|
|
82
|
-
this.
|
|
82
|
+
this.initialClass1Manning = undefined;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
|
|
86
86
|
*
|
|
87
87
|
* @type {?number}
|
|
88
|
-
* @
|
|
88
|
+
* @public
|
|
89
89
|
*/
|
|
90
|
-
this.
|
|
90
|
+
this.initialClass2Manning = undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* When this Shift was Ready for Packing
|
|
94
94
|
*
|
|
95
95
|
* @type {?Date}
|
|
96
|
-
* @
|
|
96
|
+
* @public
|
|
97
97
|
*/
|
|
98
|
-
this.
|
|
98
|
+
this.readyTimestamp = undefined;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* When this Shift was Started
|
|
102
102
|
*
|
|
103
103
|
* @type {?Date}
|
|
104
|
-
* @
|
|
104
|
+
* @public
|
|
105
105
|
*/
|
|
106
|
-
this.
|
|
106
|
+
this.startTimestamp = undefined;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* When this Shift was Finished
|
|
110
110
|
*
|
|
111
111
|
* @type {?Date}
|
|
112
|
-
* @
|
|
112
|
+
* @public
|
|
113
113
|
*/
|
|
114
|
-
this.
|
|
114
|
+
this.finishTimestamp = undefined;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* When this Shift was Published
|
|
118
118
|
*
|
|
119
119
|
* @type {?Date}
|
|
120
|
-
* @
|
|
120
|
+
* @public
|
|
121
121
|
*/
|
|
122
|
-
this.
|
|
122
|
+
this.publishTimestamp = undefined;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
|
|
126
126
|
*
|
|
127
127
|
* @type {?number}
|
|
128
|
-
* @
|
|
128
|
+
* @public
|
|
129
129
|
*/
|
|
130
|
-
this.
|
|
130
|
+
this.satisfactionRating = undefined;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
134
134
|
*
|
|
135
135
|
* @type {Array<{area: string, noteContent: string}>}
|
|
136
|
-
* @
|
|
136
|
+
* @public
|
|
137
137
|
*/
|
|
138
|
-
this.
|
|
138
|
+
this.handoverNotes = undefined;
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* An Optional Array of Notes for this Shift
|
|
142
142
|
*
|
|
143
143
|
* @type {Array<{area: string, timestamp: Date, content: string}>}
|
|
144
|
-
* @
|
|
144
|
+
* @public
|
|
145
145
|
*/
|
|
146
|
-
this.
|
|
146
|
+
this.areaNotes = undefined;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* The Schedule for this Shift
|
|
150
150
|
*
|
|
151
151
|
* @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
|
|
152
|
-
* @
|
|
152
|
+
* @public
|
|
153
153
|
*/
|
|
154
|
-
this.
|
|
154
|
+
this.schedule = undefined;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* The Status of this Shift
|
|
158
158
|
*
|
|
159
159
|
* @type {string}
|
|
160
|
-
* @
|
|
160
|
+
* @public
|
|
161
161
|
*/
|
|
162
|
-
this.
|
|
162
|
+
this.status = undefined;
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* Whether the Shift has been deleted
|
|
166
166
|
*
|
|
167
167
|
* @type {boolean}
|
|
168
|
-
* @
|
|
168
|
+
* @public
|
|
169
169
|
*/
|
|
170
|
-
this.
|
|
170
|
+
this.deleted = undefined;
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
173
|
* When the Shift was last updated
|
|
174
174
|
*
|
|
175
175
|
* @type {Date}
|
|
176
|
-
* @
|
|
176
|
+
* @public
|
|
177
177
|
*/
|
|
178
|
-
this.
|
|
178
|
+
this.updateTimestamp = undefined;
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
181
|
* The Site ID associated with this Shift
|
|
182
182
|
*
|
|
183
183
|
* @type {number}
|
|
184
|
-
* @
|
|
184
|
+
* @public
|
|
185
185
|
*/
|
|
186
|
-
this.
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The Shift ID
|
|
191
|
-
*
|
|
192
|
-
* @public
|
|
193
|
-
* @type {string}
|
|
194
|
-
*/
|
|
195
|
-
get id()
|
|
196
|
-
{
|
|
197
|
-
return this._id;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* The Packing Line ID this Shift is associated with
|
|
202
|
-
*
|
|
203
|
-
* @public
|
|
204
|
-
* @type {string}
|
|
205
|
-
*/
|
|
206
|
-
get packingLineId()
|
|
207
|
-
{
|
|
208
|
-
return this._packingLineId;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* When this Shift was Created
|
|
213
|
-
*
|
|
214
|
-
* @public
|
|
215
|
-
* @type {Date}
|
|
216
|
-
*/
|
|
217
|
-
get createdTimestamp()
|
|
218
|
-
{
|
|
219
|
-
return this._createdTimestamp;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* The Type of Shift
|
|
224
|
-
*
|
|
225
|
-
* @public
|
|
226
|
-
* @type {string}
|
|
227
|
-
*/
|
|
228
|
-
get type()
|
|
229
|
-
{
|
|
230
|
-
return this._type;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* The Name of the Line Manager for this Shift
|
|
235
|
-
*
|
|
236
|
-
* @public
|
|
237
|
-
* @type {?string}
|
|
238
|
-
*/
|
|
239
|
-
get lineManagerName()
|
|
240
|
-
{
|
|
241
|
-
return this._lineManagerName;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* The Target Number of Bins to Tip for this Shift
|
|
246
|
-
*
|
|
247
|
-
* @public
|
|
248
|
-
* @type {?number}
|
|
249
|
-
*/
|
|
250
|
-
get binsTippedTarget()
|
|
251
|
-
{
|
|
252
|
-
return this._binsTippedTarget;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
|
|
257
|
-
*
|
|
258
|
-
* @public
|
|
259
|
-
* @type {?number}
|
|
260
|
-
*/
|
|
261
|
-
get initialClass1Manning()
|
|
262
|
-
{
|
|
263
|
-
return this._initialClass1Manning;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
|
|
268
|
-
*
|
|
269
|
-
* @public
|
|
270
|
-
* @type {?number}
|
|
271
|
-
*/
|
|
272
|
-
get initialClass2Manning()
|
|
273
|
-
{
|
|
274
|
-
return this._initialClass2Manning;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* When this Shift was Ready for Packing
|
|
279
|
-
*
|
|
280
|
-
* @public
|
|
281
|
-
* @type {?Date}
|
|
282
|
-
*/
|
|
283
|
-
get readyTimestamp()
|
|
284
|
-
{
|
|
285
|
-
return this._readyTimestamp;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* When this Shift was Started
|
|
290
|
-
*
|
|
291
|
-
* @public
|
|
292
|
-
* @type {?Date}
|
|
293
|
-
*/
|
|
294
|
-
get startTimestamp()
|
|
295
|
-
{
|
|
296
|
-
return this._startTimestamp;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* When this Shift was Finished
|
|
301
|
-
*
|
|
302
|
-
* @public
|
|
303
|
-
* @type {?Date}
|
|
304
|
-
*/
|
|
305
|
-
get finishTimestamp()
|
|
306
|
-
{
|
|
307
|
-
return this._finishTimestamp;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* When this Shift was Published
|
|
312
|
-
*
|
|
313
|
-
* @public
|
|
314
|
-
* @type {?Date}
|
|
315
|
-
*/
|
|
316
|
-
get publishTimestamp()
|
|
317
|
-
{
|
|
318
|
-
return this._publishTimestamp;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
|
|
323
|
-
*
|
|
324
|
-
* @public
|
|
325
|
-
* @type {?number}
|
|
326
|
-
*/
|
|
327
|
-
get satisfactionRating()
|
|
328
|
-
{
|
|
329
|
-
return this._satisfactionRating;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
334
|
-
*
|
|
335
|
-
* @public
|
|
336
|
-
* @type {Array<{area: string, noteContent: string}>}
|
|
337
|
-
*/
|
|
338
|
-
get handoverNotes()
|
|
339
|
-
{
|
|
340
|
-
return this._handoverNotes;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* An Optional Array of Notes for this Shift
|
|
345
|
-
*
|
|
346
|
-
* @public
|
|
347
|
-
* @type {Array<{area: string, timestamp: Date, content: string}>}
|
|
348
|
-
*/
|
|
349
|
-
get areaNotes()
|
|
350
|
-
{
|
|
351
|
-
return this._areaNotes;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* The Schedule for this Shift
|
|
356
|
-
*
|
|
357
|
-
* @public
|
|
358
|
-
* @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
|
|
359
|
-
*/
|
|
360
|
-
get schedule()
|
|
361
|
-
{
|
|
362
|
-
return this._schedule;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* The Status of this Shift
|
|
367
|
-
*
|
|
368
|
-
* @public
|
|
369
|
-
* @type {string}
|
|
370
|
-
*/
|
|
371
|
-
get status()
|
|
372
|
-
{
|
|
373
|
-
return this._status;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Whether the Shift has been deleted
|
|
378
|
-
*
|
|
379
|
-
* @public
|
|
380
|
-
* @type {boolean}
|
|
381
|
-
*/
|
|
382
|
-
get deleted()
|
|
383
|
-
{
|
|
384
|
-
return this._deleted;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* When the Shift was last updated
|
|
389
|
-
*
|
|
390
|
-
* @public
|
|
391
|
-
* @type {Date}
|
|
392
|
-
*/
|
|
393
|
-
get updateTimestamp()
|
|
394
|
-
{
|
|
395
|
-
return this._updateTimestamp;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* The Site ID associated with this Shift
|
|
400
|
-
*
|
|
401
|
-
* @public
|
|
402
|
-
* @type {number}
|
|
403
|
-
*/
|
|
404
|
-
get siteId()
|
|
405
|
-
{
|
|
406
|
-
return this._siteId;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Convert this **ShiftModel** to a JSON Object
|
|
411
|
-
*
|
|
412
|
-
* @public
|
|
413
|
-
* @return {Object<string, any>}
|
|
414
|
-
*/
|
|
415
|
-
toJSON()
|
|
416
|
-
{
|
|
417
|
-
return {
|
|
418
|
-
id: this._id,
|
|
419
|
-
packingLineId: this._packingLineId,
|
|
420
|
-
createdTimestamp: this._createdTimestamp,
|
|
421
|
-
type: this._type,
|
|
422
|
-
lineManagerName: this._lineManagerName,
|
|
423
|
-
binsTippedTarget: this._binsTippedTarget,
|
|
424
|
-
initialClass1Manning: this._initialClass1Manning,
|
|
425
|
-
initialClass2Manning: this._initialClass2Manning,
|
|
426
|
-
readyTimestamp: this._readyTimestamp,
|
|
427
|
-
startTimestamp: this._startTimestamp,
|
|
428
|
-
finishTimestamp: this._finishTimestamp,
|
|
429
|
-
publishTimestamp: this._publishTimestamp,
|
|
430
|
-
satisfactionRating: this._satisfactionRating,
|
|
431
|
-
handoverNotes: this._handoverNotes,
|
|
432
|
-
areaNotes: this._areaNotes,
|
|
433
|
-
schedule: this._schedule,
|
|
434
|
-
status: this._status,
|
|
435
|
-
deleted: this._deleted,
|
|
436
|
-
updateTimestamp: this._updateTimestamp
|
|
437
|
-
};
|
|
186
|
+
this.siteId = siteId;
|
|
438
187
|
}
|
|
439
188
|
|
|
440
189
|
/**
|
|
@@ -468,7 +217,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
468
217
|
|
|
469
218
|
if('id' in jsonObject)
|
|
470
219
|
{
|
|
471
|
-
model.
|
|
220
|
+
model.id = (function(){
|
|
472
221
|
if(typeof jsonObject['id'] !== 'string')
|
|
473
222
|
{
|
|
474
223
|
return String(jsonObject['id']);
|
|
@@ -480,7 +229,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
480
229
|
|
|
481
230
|
if('packingLineId' in jsonObject)
|
|
482
231
|
{
|
|
483
|
-
model.
|
|
232
|
+
model.packingLineId = (function(){
|
|
484
233
|
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
485
234
|
{
|
|
486
235
|
return String(jsonObject['packingLineId']);
|
|
@@ -492,7 +241,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
492
241
|
|
|
493
242
|
if('createdTimestamp' in jsonObject)
|
|
494
243
|
{
|
|
495
|
-
model.
|
|
244
|
+
model.createdTimestamp = (function(){
|
|
496
245
|
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
497
246
|
{
|
|
498
247
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
@@ -504,7 +253,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
504
253
|
|
|
505
254
|
if('type' in jsonObject)
|
|
506
255
|
{
|
|
507
|
-
model.
|
|
256
|
+
model.type = (function(){
|
|
508
257
|
if(typeof jsonObject['type'] !== 'string')
|
|
509
258
|
{
|
|
510
259
|
return String(jsonObject['type']);
|
|
@@ -516,7 +265,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
516
265
|
|
|
517
266
|
if('lineManagerName' in jsonObject)
|
|
518
267
|
{
|
|
519
|
-
model.
|
|
268
|
+
model.lineManagerName = (function(){
|
|
520
269
|
if(jsonObject['lineManagerName'] === null)
|
|
521
270
|
{
|
|
522
271
|
return null;
|
|
@@ -533,7 +282,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
533
282
|
|
|
534
283
|
if('binsTippedTarget' in jsonObject)
|
|
535
284
|
{
|
|
536
|
-
model.
|
|
285
|
+
model.binsTippedTarget = (function(){
|
|
537
286
|
if(jsonObject['binsTippedTarget'] === null)
|
|
538
287
|
{
|
|
539
288
|
return null;
|
|
@@ -550,7 +299,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
550
299
|
|
|
551
300
|
if('initialClass1Manning' in jsonObject)
|
|
552
301
|
{
|
|
553
|
-
model.
|
|
302
|
+
model.initialClass1Manning = (function(){
|
|
554
303
|
if(jsonObject['initialClass1Manning'] === null)
|
|
555
304
|
{
|
|
556
305
|
return null;
|
|
@@ -567,7 +316,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
567
316
|
|
|
568
317
|
if('initialClass2Manning' in jsonObject)
|
|
569
318
|
{
|
|
570
|
-
model.
|
|
319
|
+
model.initialClass2Manning = (function(){
|
|
571
320
|
if(jsonObject['initialClass2Manning'] === null)
|
|
572
321
|
{
|
|
573
322
|
return null;
|
|
@@ -584,7 +333,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
584
333
|
|
|
585
334
|
if('readyTimestamp' in jsonObject)
|
|
586
335
|
{
|
|
587
|
-
model.
|
|
336
|
+
model.readyTimestamp = (function(){
|
|
588
337
|
if(jsonObject['readyTimestamp'] === null)
|
|
589
338
|
{
|
|
590
339
|
return null;
|
|
@@ -601,7 +350,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
601
350
|
|
|
602
351
|
if('startTimestamp' in jsonObject)
|
|
603
352
|
{
|
|
604
|
-
model.
|
|
353
|
+
model.startTimestamp = (function(){
|
|
605
354
|
if(jsonObject['startTimestamp'] === null)
|
|
606
355
|
{
|
|
607
356
|
return null;
|
|
@@ -618,7 +367,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
618
367
|
|
|
619
368
|
if('finishTimestamp' in jsonObject)
|
|
620
369
|
{
|
|
621
|
-
model.
|
|
370
|
+
model.finishTimestamp = (function(){
|
|
622
371
|
if(jsonObject['finishTimestamp'] === null)
|
|
623
372
|
{
|
|
624
373
|
return null;
|
|
@@ -635,7 +384,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
635
384
|
|
|
636
385
|
if('publishTimestamp' in jsonObject)
|
|
637
386
|
{
|
|
638
|
-
model.
|
|
387
|
+
model.publishTimestamp = (function(){
|
|
639
388
|
if(jsonObject['publishTimestamp'] === null)
|
|
640
389
|
{
|
|
641
390
|
return null;
|
|
@@ -652,7 +401,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
652
401
|
|
|
653
402
|
if('satisfactionRating' in jsonObject)
|
|
654
403
|
{
|
|
655
|
-
model.
|
|
404
|
+
model.satisfactionRating = (function(){
|
|
656
405
|
if(jsonObject['satisfactionRating'] === null)
|
|
657
406
|
{
|
|
658
407
|
return null;
|
|
@@ -669,7 +418,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
669
418
|
|
|
670
419
|
if('handoverNotes' in jsonObject)
|
|
671
420
|
{
|
|
672
|
-
model.
|
|
421
|
+
model.handoverNotes = (function(){
|
|
673
422
|
if(Array.isArray(jsonObject['handoverNotes']) !== true)
|
|
674
423
|
{
|
|
675
424
|
return [];
|
|
@@ -719,7 +468,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
719
468
|
|
|
720
469
|
if('areaNotes' in jsonObject)
|
|
721
470
|
{
|
|
722
|
-
model.
|
|
471
|
+
model.areaNotes = (function(){
|
|
723
472
|
if(Array.isArray(jsonObject['areaNotes']) !== true)
|
|
724
473
|
{
|
|
725
474
|
return [];
|
|
@@ -785,7 +534,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
785
534
|
|
|
786
535
|
if('schedule' in jsonObject)
|
|
787
536
|
{
|
|
788
|
-
model.
|
|
537
|
+
model.schedule = (function(){
|
|
789
538
|
let scheduleObject = {};
|
|
790
539
|
|
|
791
540
|
if(typeof jsonObject['schedule'] === 'object' && 'startTime' in jsonObject['schedule'])
|
|
@@ -880,7 +629,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
880
629
|
|
|
881
630
|
if('status' in jsonObject)
|
|
882
631
|
{
|
|
883
|
-
model.
|
|
632
|
+
model.status = (function(){
|
|
884
633
|
if(typeof jsonObject['status'] !== 'string')
|
|
885
634
|
{
|
|
886
635
|
return String(jsonObject['status']);
|
|
@@ -892,7 +641,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
892
641
|
|
|
893
642
|
if('deleted' in jsonObject)
|
|
894
643
|
{
|
|
895
|
-
model.
|
|
644
|
+
model.deleted = (function(){
|
|
896
645
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
897
646
|
{
|
|
898
647
|
return Boolean(jsonObject['deleted']);
|
|
@@ -904,7 +653,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
904
653
|
|
|
905
654
|
if('updateTimestamp' in jsonObject)
|
|
906
655
|
{
|
|
907
|
-
model.
|
|
656
|
+
model.updateTimestamp = (function(){
|
|
908
657
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
909
658
|
{
|
|
910
659
|
return new Date(String(jsonObject['updateTimestamp']));
|