@ricado/api-client 1.2.6 → 2.0.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/Packhouse/Site/BinTipWeightController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
- 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/GrowingMethodController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackrunController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
- 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 +4 -4
- package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
- 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 +6 -4
- package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
- package/lib/Models/AccountPolicyModel.js +26 -130
- package/lib/Models/ApiAccountModel.js +26 -130
- package/lib/Models/CompanyModel.js +20 -98
- package/lib/Models/FirebaseTokenModel.js +29 -146
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +40 -192
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +37 -176
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +55 -272
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +43 -208
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +37 -176
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +31 -144
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +49 -240
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +55 -272
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +37 -176
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +31 -144
- package/lib/Models/Packhouse/Site/PackTypeModel.js +37 -176
- package/lib/Models/Packhouse/Site/PackingLineModel.js +58 -288
- package/lib/Models/Packhouse/Site/PackrunModel.js +58 -288
- package/lib/Models/Packhouse/Site/RejectBinModel.js +40 -192
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +49 -240
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +43 -208
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +49 -240
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +124 -640
- package/lib/Models/Packhouse/Site/ShiftModel.js +70 -352
- package/lib/Models/Packhouse/Site/VarietyModel.js +37 -176
- package/lib/Models/RTUModel.js +23 -114
- package/lib/Models/RTUPluginModel.js +20 -98
- package/lib/Models/Site/AlarmGroupModel.js +34 -160
- package/lib/Models/Site/AlarmModel.js +64 -320
- package/lib/Models/Site/DefinitionModel.js +31 -144
- package/lib/Models/Site/PermanentObjectDataModel.js +37 -176
- package/lib/Models/Site/PermanentObjectModel.js +34 -160
- package/lib/Models/Site/PointModel.js +46 -224
- package/lib/Models/Site/TemporaryObjectModel.js +31 -144
- package/lib/Models/Site/index.js +0 -3
- package/lib/Models/SiteModel.js +23 -114
- package/lib/Models/TokenModel.js +35 -178
- package/lib/Models/UserAccountActionTokenModel.js +38 -194
- package/lib/Models/UserAccountModel.js +35 -178
- package/lib/PackageVersion.js +1 -1
- package/lib/Points.js +9 -1
- package/lib/index.d.ts +842 -1591
- package/lib/index.js +67 -38
- package/package.json +2 -2
- 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 +4 -4
- 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/GrowingMethodController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackrunController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
- 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 +4 -4
- package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
- 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 +6 -4
- package/src/Controllers/Site/TemporaryObjectController.js +4 -4
- 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 +33 -174
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
- package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
- package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
- package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
- package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
- package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
- package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
- package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
- package/src/Models/RTUModel.js +18 -102
- package/src/Models/RTUPluginModel.js +15 -87
- package/src/Models/Site/AlarmGroupModel.js +27 -144
- package/src/Models/Site/AlarmModel.js +57 -294
- package/src/Models/Site/DefinitionModel.js +24 -129
- package/src/Models/Site/PermanentObjectDataModel.js +30 -159
- package/src/Models/Site/PermanentObjectModel.js +27 -144
- package/src/Models/Site/PointModel.js +39 -204
- package/src/Models/Site/TemporaryObjectModel.js +24 -129
- 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/src/Points.js +11 -1
- package/src/index.js +35 -3
- package/lib/Models/Site/BaseSiteModel.js +0 -58
- package/src/Models/Site/BaseSiteModel.js +0 -30
|
@@ -4,24 +4,23 @@
|
|
|
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
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
-
* @param {number} siteId The Site ID associated with this Shift
|
|
23
22
|
*/
|
|
24
|
-
constructor(
|
|
23
|
+
constructor()
|
|
25
24
|
{
|
|
26
25
|
super();
|
|
27
26
|
|
|
@@ -29,412 +28,153 @@ class ShiftModel extends BaseSiteModel
|
|
|
29
28
|
* The Shift ID
|
|
30
29
|
*
|
|
31
30
|
* @type {string}
|
|
32
|
-
* @
|
|
31
|
+
* @public
|
|
33
32
|
*/
|
|
34
|
-
this.
|
|
33
|
+
this.id = undefined;
|
|
35
34
|
|
|
36
35
|
/**
|
|
37
36
|
* The Packing Line ID this Shift is associated with
|
|
38
37
|
*
|
|
39
38
|
* @type {string}
|
|
40
|
-
* @
|
|
39
|
+
* @public
|
|
41
40
|
*/
|
|
42
|
-
this.
|
|
41
|
+
this.packingLineId = undefined;
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* When this Shift was Created
|
|
46
45
|
*
|
|
47
46
|
* @type {Date}
|
|
48
|
-
* @
|
|
47
|
+
* @public
|
|
49
48
|
*/
|
|
50
|
-
this.
|
|
49
|
+
this.createdTimestamp = undefined;
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
52
|
* The Type of Shift
|
|
54
53
|
*
|
|
55
54
|
* @type {string}
|
|
56
|
-
* @
|
|
55
|
+
* @public
|
|
57
56
|
*/
|
|
58
|
-
this.
|
|
57
|
+
this.type = undefined;
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
60
|
* The Name of the Line Manager for this Shift
|
|
62
61
|
*
|
|
63
62
|
* @type {?string}
|
|
64
|
-
* @
|
|
63
|
+
* @public
|
|
65
64
|
*/
|
|
66
|
-
this.
|
|
65
|
+
this.lineManagerName = undefined;
|
|
67
66
|
|
|
68
67
|
/**
|
|
69
68
|
* The Target Number of Bins to Tip for this Shift
|
|
70
69
|
*
|
|
71
70
|
* @type {?number}
|
|
72
|
-
* @
|
|
71
|
+
* @public
|
|
73
72
|
*/
|
|
74
|
-
this.
|
|
73
|
+
this.binsTippedTarget = undefined;
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
76
|
* *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
|
|
78
77
|
*
|
|
79
78
|
* @type {?number}
|
|
80
|
-
* @
|
|
79
|
+
* @public
|
|
81
80
|
*/
|
|
82
|
-
this.
|
|
81
|
+
this.initialClass1Manning = undefined;
|
|
83
82
|
|
|
84
83
|
/**
|
|
85
84
|
* *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
|
|
86
85
|
*
|
|
87
86
|
* @type {?number}
|
|
88
|
-
* @
|
|
87
|
+
* @public
|
|
89
88
|
*/
|
|
90
|
-
this.
|
|
89
|
+
this.initialClass2Manning = undefined;
|
|
91
90
|
|
|
92
91
|
/**
|
|
93
92
|
* When this Shift was Ready for Packing
|
|
94
93
|
*
|
|
95
94
|
* @type {?Date}
|
|
96
|
-
* @
|
|
95
|
+
* @public
|
|
97
96
|
*/
|
|
98
|
-
this.
|
|
97
|
+
this.readyTimestamp = undefined;
|
|
99
98
|
|
|
100
99
|
/**
|
|
101
100
|
* When this Shift was Started
|
|
102
101
|
*
|
|
103
102
|
* @type {?Date}
|
|
104
|
-
* @
|
|
103
|
+
* @public
|
|
105
104
|
*/
|
|
106
|
-
this.
|
|
105
|
+
this.startTimestamp = undefined;
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
108
|
* When this Shift was Finished
|
|
110
109
|
*
|
|
111
110
|
* @type {?Date}
|
|
112
|
-
* @
|
|
111
|
+
* @public
|
|
113
112
|
*/
|
|
114
|
-
this.
|
|
113
|
+
this.finishTimestamp = undefined;
|
|
115
114
|
|
|
116
115
|
/**
|
|
117
116
|
* When this Shift was Published
|
|
118
117
|
*
|
|
119
118
|
* @type {?Date}
|
|
120
|
-
* @
|
|
119
|
+
* @public
|
|
121
120
|
*/
|
|
122
|
-
this.
|
|
121
|
+
this.publishTimestamp = undefined;
|
|
123
122
|
|
|
124
123
|
/**
|
|
125
124
|
* An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
|
|
126
125
|
*
|
|
127
126
|
* @type {?number}
|
|
128
|
-
* @
|
|
127
|
+
* @public
|
|
129
128
|
*/
|
|
130
|
-
this.
|
|
129
|
+
this.satisfactionRating = undefined;
|
|
131
130
|
|
|
132
131
|
/**
|
|
133
132
|
* *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
134
133
|
*
|
|
135
134
|
* @type {Array<{area: string, noteContent: string}>}
|
|
136
|
-
* @
|
|
135
|
+
* @public
|
|
137
136
|
*/
|
|
138
|
-
this.
|
|
137
|
+
this.handoverNotes = undefined;
|
|
139
138
|
|
|
140
139
|
/**
|
|
141
140
|
* An Optional Array of Notes for this Shift
|
|
142
141
|
*
|
|
143
142
|
* @type {Array<{area: string, timestamp: Date, content: string}>}
|
|
144
|
-
* @
|
|
143
|
+
* @public
|
|
145
144
|
*/
|
|
146
|
-
this.
|
|
145
|
+
this.areaNotes = undefined;
|
|
147
146
|
|
|
148
147
|
/**
|
|
149
148
|
* The Schedule for this Shift
|
|
150
149
|
*
|
|
151
150
|
* @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
|
|
152
|
-
* @
|
|
151
|
+
* @public
|
|
153
152
|
*/
|
|
154
|
-
this.
|
|
153
|
+
this.schedule = undefined;
|
|
155
154
|
|
|
156
155
|
/**
|
|
157
156
|
* The Status of this Shift
|
|
158
157
|
*
|
|
159
158
|
* @type {string}
|
|
160
|
-
* @
|
|
159
|
+
* @public
|
|
161
160
|
*/
|
|
162
|
-
this.
|
|
161
|
+
this.status = undefined;
|
|
163
162
|
|
|
164
163
|
/**
|
|
165
164
|
* Whether the Shift has been deleted
|
|
166
165
|
*
|
|
167
166
|
* @type {boolean}
|
|
168
|
-
* @
|
|
167
|
+
* @public
|
|
169
168
|
*/
|
|
170
|
-
this.
|
|
169
|
+
this.deleted = undefined;
|
|
171
170
|
|
|
172
171
|
/**
|
|
173
172
|
* When the Shift was last updated
|
|
174
173
|
*
|
|
175
174
|
* @type {Date}
|
|
176
|
-
* @
|
|
175
|
+
* @public
|
|
177
176
|
*/
|
|
178
|
-
this.
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* The Site ID associated with this Shift
|
|
182
|
-
*
|
|
183
|
-
* @type {number}
|
|
184
|
-
* @private
|
|
185
|
-
*/
|
|
186
|
-
this._siteId = siteId;
|
|
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
|
-
};
|
|
177
|
+
this.updateTimestamp = undefined;
|
|
438
178
|
}
|
|
439
179
|
|
|
440
180
|
/**
|
|
@@ -443,12 +183,11 @@ class ShiftModel extends BaseSiteModel
|
|
|
443
183
|
* @static
|
|
444
184
|
* @public
|
|
445
185
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
446
|
-
* @param {number} siteId The Site ID associated with this Shift
|
|
447
186
|
* @return {ShiftModel}
|
|
448
187
|
*/
|
|
449
|
-
static fromJSON(json
|
|
188
|
+
static fromJSON(json)
|
|
450
189
|
{
|
|
451
|
-
let model = new ShiftModel(
|
|
190
|
+
let model = new ShiftModel();
|
|
452
191
|
|
|
453
192
|
/**
|
|
454
193
|
* The JSON Object
|
|
@@ -468,7 +207,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
468
207
|
|
|
469
208
|
if('id' in jsonObject)
|
|
470
209
|
{
|
|
471
|
-
model.
|
|
210
|
+
model.id = (function(){
|
|
472
211
|
if(typeof jsonObject['id'] !== 'string')
|
|
473
212
|
{
|
|
474
213
|
return String(jsonObject['id']);
|
|
@@ -480,7 +219,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
480
219
|
|
|
481
220
|
if('packingLineId' in jsonObject)
|
|
482
221
|
{
|
|
483
|
-
model.
|
|
222
|
+
model.packingLineId = (function(){
|
|
484
223
|
if(typeof jsonObject['packingLineId'] !== 'string')
|
|
485
224
|
{
|
|
486
225
|
return String(jsonObject['packingLineId']);
|
|
@@ -492,7 +231,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
492
231
|
|
|
493
232
|
if('createdTimestamp' in jsonObject)
|
|
494
233
|
{
|
|
495
|
-
model.
|
|
234
|
+
model.createdTimestamp = (function(){
|
|
496
235
|
if(typeof jsonObject['createdTimestamp'] !== 'string')
|
|
497
236
|
{
|
|
498
237
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
@@ -504,7 +243,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
504
243
|
|
|
505
244
|
if('type' in jsonObject)
|
|
506
245
|
{
|
|
507
|
-
model.
|
|
246
|
+
model.type = (function(){
|
|
508
247
|
if(typeof jsonObject['type'] !== 'string')
|
|
509
248
|
{
|
|
510
249
|
return String(jsonObject['type']);
|
|
@@ -516,7 +255,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
516
255
|
|
|
517
256
|
if('lineManagerName' in jsonObject)
|
|
518
257
|
{
|
|
519
|
-
model.
|
|
258
|
+
model.lineManagerName = (function(){
|
|
520
259
|
if(jsonObject['lineManagerName'] === null)
|
|
521
260
|
{
|
|
522
261
|
return null;
|
|
@@ -533,7 +272,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
533
272
|
|
|
534
273
|
if('binsTippedTarget' in jsonObject)
|
|
535
274
|
{
|
|
536
|
-
model.
|
|
275
|
+
model.binsTippedTarget = (function(){
|
|
537
276
|
if(jsonObject['binsTippedTarget'] === null)
|
|
538
277
|
{
|
|
539
278
|
return null;
|
|
@@ -550,7 +289,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
550
289
|
|
|
551
290
|
if('initialClass1Manning' in jsonObject)
|
|
552
291
|
{
|
|
553
|
-
model.
|
|
292
|
+
model.initialClass1Manning = (function(){
|
|
554
293
|
if(jsonObject['initialClass1Manning'] === null)
|
|
555
294
|
{
|
|
556
295
|
return null;
|
|
@@ -567,7 +306,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
567
306
|
|
|
568
307
|
if('initialClass2Manning' in jsonObject)
|
|
569
308
|
{
|
|
570
|
-
model.
|
|
309
|
+
model.initialClass2Manning = (function(){
|
|
571
310
|
if(jsonObject['initialClass2Manning'] === null)
|
|
572
311
|
{
|
|
573
312
|
return null;
|
|
@@ -584,7 +323,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
584
323
|
|
|
585
324
|
if('readyTimestamp' in jsonObject)
|
|
586
325
|
{
|
|
587
|
-
model.
|
|
326
|
+
model.readyTimestamp = (function(){
|
|
588
327
|
if(jsonObject['readyTimestamp'] === null)
|
|
589
328
|
{
|
|
590
329
|
return null;
|
|
@@ -601,7 +340,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
601
340
|
|
|
602
341
|
if('startTimestamp' in jsonObject)
|
|
603
342
|
{
|
|
604
|
-
model.
|
|
343
|
+
model.startTimestamp = (function(){
|
|
605
344
|
if(jsonObject['startTimestamp'] === null)
|
|
606
345
|
{
|
|
607
346
|
return null;
|
|
@@ -618,7 +357,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
618
357
|
|
|
619
358
|
if('finishTimestamp' in jsonObject)
|
|
620
359
|
{
|
|
621
|
-
model.
|
|
360
|
+
model.finishTimestamp = (function(){
|
|
622
361
|
if(jsonObject['finishTimestamp'] === null)
|
|
623
362
|
{
|
|
624
363
|
return null;
|
|
@@ -635,7 +374,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
635
374
|
|
|
636
375
|
if('publishTimestamp' in jsonObject)
|
|
637
376
|
{
|
|
638
|
-
model.
|
|
377
|
+
model.publishTimestamp = (function(){
|
|
639
378
|
if(jsonObject['publishTimestamp'] === null)
|
|
640
379
|
{
|
|
641
380
|
return null;
|
|
@@ -652,7 +391,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
652
391
|
|
|
653
392
|
if('satisfactionRating' in jsonObject)
|
|
654
393
|
{
|
|
655
|
-
model.
|
|
394
|
+
model.satisfactionRating = (function(){
|
|
656
395
|
if(jsonObject['satisfactionRating'] === null)
|
|
657
396
|
{
|
|
658
397
|
return null;
|
|
@@ -669,7 +408,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
669
408
|
|
|
670
409
|
if('handoverNotes' in jsonObject)
|
|
671
410
|
{
|
|
672
|
-
model.
|
|
411
|
+
model.handoverNotes = (function(){
|
|
673
412
|
if(Array.isArray(jsonObject['handoverNotes']) !== true)
|
|
674
413
|
{
|
|
675
414
|
return [];
|
|
@@ -719,7 +458,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
719
458
|
|
|
720
459
|
if('areaNotes' in jsonObject)
|
|
721
460
|
{
|
|
722
|
-
model.
|
|
461
|
+
model.areaNotes = (function(){
|
|
723
462
|
if(Array.isArray(jsonObject['areaNotes']) !== true)
|
|
724
463
|
{
|
|
725
464
|
return [];
|
|
@@ -785,7 +524,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
785
524
|
|
|
786
525
|
if('schedule' in jsonObject)
|
|
787
526
|
{
|
|
788
|
-
model.
|
|
527
|
+
model.schedule = (function(){
|
|
789
528
|
let scheduleObject = {};
|
|
790
529
|
|
|
791
530
|
if(typeof jsonObject['schedule'] === 'object' && 'startTime' in jsonObject['schedule'])
|
|
@@ -880,7 +619,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
880
619
|
|
|
881
620
|
if('status' in jsonObject)
|
|
882
621
|
{
|
|
883
|
-
model.
|
|
622
|
+
model.status = (function(){
|
|
884
623
|
if(typeof jsonObject['status'] !== 'string')
|
|
885
624
|
{
|
|
886
625
|
return String(jsonObject['status']);
|
|
@@ -892,7 +631,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
892
631
|
|
|
893
632
|
if('deleted' in jsonObject)
|
|
894
633
|
{
|
|
895
|
-
model.
|
|
634
|
+
model.deleted = (function(){
|
|
896
635
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
897
636
|
{
|
|
898
637
|
return Boolean(jsonObject['deleted']);
|
|
@@ -904,7 +643,7 @@ class ShiftModel extends BaseSiteModel
|
|
|
904
643
|
|
|
905
644
|
if('updateTimestamp' in jsonObject)
|
|
906
645
|
{
|
|
907
|
-
model.
|
|
646
|
+
model.updateTimestamp = (function(){
|
|
908
647
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
909
648
|
{
|
|
910
649
|
return new Date(String(jsonObject['updateTimestamp']));
|