@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
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _BaseModel2 = _interopRequireDefault(require("../../../Models/BaseModel"));
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
12
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
13
|
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
15
|
|
|
16
16
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
17
17
|
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
18
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
19
|
|
|
20
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
21
|
|
|
22
22
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
23
|
|
|
@@ -36,10 +36,10 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
36
36
|
*
|
|
37
37
|
* @class
|
|
38
38
|
* @hideconstructor
|
|
39
|
-
* @extends
|
|
39
|
+
* @extends BaseModel
|
|
40
40
|
*/
|
|
41
|
-
var ShiftModel = /*#__PURE__*/function (
|
|
42
|
-
_inherits(ShiftModel,
|
|
41
|
+
var ShiftModel = /*#__PURE__*/function (_BaseModel) {
|
|
42
|
+
_inherits(ShiftModel, _BaseModel);
|
|
43
43
|
|
|
44
44
|
var _super = _createSuper(ShiftModel);
|
|
45
45
|
|
|
@@ -59,448 +59,176 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
59
59
|
* The Shift ID
|
|
60
60
|
*
|
|
61
61
|
* @type {string}
|
|
62
|
-
* @
|
|
62
|
+
* @public
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
|
-
_this.
|
|
65
|
+
_this.id = undefined;
|
|
66
66
|
/**
|
|
67
67
|
* The Packing Line ID this Shift is associated with
|
|
68
68
|
*
|
|
69
69
|
* @type {string}
|
|
70
|
-
* @
|
|
70
|
+
* @public
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
|
-
_this.
|
|
73
|
+
_this.packingLineId = undefined;
|
|
74
74
|
/**
|
|
75
75
|
* When this Shift was Created
|
|
76
76
|
*
|
|
77
77
|
* @type {Date}
|
|
78
|
-
* @
|
|
78
|
+
* @public
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
|
-
_this.
|
|
81
|
+
_this.createdTimestamp = undefined;
|
|
82
82
|
/**
|
|
83
83
|
* The Type of Shift
|
|
84
84
|
*
|
|
85
85
|
* @type {string}
|
|
86
|
-
* @
|
|
86
|
+
* @public
|
|
87
87
|
*/
|
|
88
88
|
|
|
89
|
-
_this.
|
|
89
|
+
_this.type = undefined;
|
|
90
90
|
/**
|
|
91
91
|
* The Name of the Line Manager for this Shift
|
|
92
92
|
*
|
|
93
93
|
* @type {?string}
|
|
94
|
-
* @
|
|
94
|
+
* @public
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
|
-
_this.
|
|
97
|
+
_this.lineManagerName = undefined;
|
|
98
98
|
/**
|
|
99
99
|
* The Target Number of Bins to Tip for this Shift
|
|
100
100
|
*
|
|
101
101
|
* @type {?number}
|
|
102
|
-
* @
|
|
102
|
+
* @public
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
|
-
_this.
|
|
105
|
+
_this.binsTippedTarget = undefined;
|
|
106
106
|
/**
|
|
107
107
|
* *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
|
|
108
108
|
*
|
|
109
109
|
* @type {?number}
|
|
110
|
-
* @
|
|
110
|
+
* @public
|
|
111
111
|
*/
|
|
112
112
|
|
|
113
|
-
_this.
|
|
113
|
+
_this.initialClass1Manning = undefined;
|
|
114
114
|
/**
|
|
115
115
|
* *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
|
|
116
116
|
*
|
|
117
117
|
* @type {?number}
|
|
118
|
-
* @
|
|
118
|
+
* @public
|
|
119
119
|
*/
|
|
120
120
|
|
|
121
|
-
_this.
|
|
121
|
+
_this.initialClass2Manning = undefined;
|
|
122
122
|
/**
|
|
123
123
|
* When this Shift was Ready for Packing
|
|
124
124
|
*
|
|
125
125
|
* @type {?Date}
|
|
126
|
-
* @
|
|
126
|
+
* @public
|
|
127
127
|
*/
|
|
128
128
|
|
|
129
|
-
_this.
|
|
129
|
+
_this.readyTimestamp = undefined;
|
|
130
130
|
/**
|
|
131
131
|
* When this Shift was Started
|
|
132
132
|
*
|
|
133
133
|
* @type {?Date}
|
|
134
|
-
* @
|
|
134
|
+
* @public
|
|
135
135
|
*/
|
|
136
136
|
|
|
137
|
-
_this.
|
|
137
|
+
_this.startTimestamp = undefined;
|
|
138
138
|
/**
|
|
139
139
|
* When this Shift was Finished
|
|
140
140
|
*
|
|
141
141
|
* @type {?Date}
|
|
142
|
-
* @
|
|
142
|
+
* @public
|
|
143
143
|
*/
|
|
144
144
|
|
|
145
|
-
_this.
|
|
145
|
+
_this.finishTimestamp = undefined;
|
|
146
146
|
/**
|
|
147
147
|
* When this Shift was Published
|
|
148
148
|
*
|
|
149
149
|
* @type {?Date}
|
|
150
|
-
* @
|
|
150
|
+
* @public
|
|
151
151
|
*/
|
|
152
152
|
|
|
153
|
-
_this.
|
|
153
|
+
_this.publishTimestamp = undefined;
|
|
154
154
|
/**
|
|
155
155
|
* An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
|
|
156
156
|
*
|
|
157
157
|
* @type {?number}
|
|
158
|
-
* @
|
|
158
|
+
* @public
|
|
159
159
|
*/
|
|
160
160
|
|
|
161
|
-
_this.
|
|
161
|
+
_this.satisfactionRating = undefined;
|
|
162
162
|
/**
|
|
163
163
|
* *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
164
164
|
*
|
|
165
165
|
* @type {Array<{area: string, noteContent: string}>}
|
|
166
|
-
* @
|
|
166
|
+
* @public
|
|
167
167
|
*/
|
|
168
168
|
|
|
169
|
-
_this.
|
|
169
|
+
_this.handoverNotes = undefined;
|
|
170
170
|
/**
|
|
171
171
|
* An Optional Array of Notes for this Shift
|
|
172
172
|
*
|
|
173
173
|
* @type {Array<{area: string, timestamp: Date, content: string}>}
|
|
174
|
-
* @
|
|
174
|
+
* @public
|
|
175
175
|
*/
|
|
176
176
|
|
|
177
|
-
_this.
|
|
177
|
+
_this.areaNotes = undefined;
|
|
178
178
|
/**
|
|
179
179
|
* The Schedule for this Shift
|
|
180
180
|
*
|
|
181
181
|
* @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
|
|
182
|
-
* @
|
|
182
|
+
* @public
|
|
183
183
|
*/
|
|
184
184
|
|
|
185
|
-
_this.
|
|
185
|
+
_this.schedule = undefined;
|
|
186
186
|
/**
|
|
187
187
|
* The Status of this Shift
|
|
188
188
|
*
|
|
189
189
|
* @type {string}
|
|
190
|
-
* @
|
|
190
|
+
* @public
|
|
191
191
|
*/
|
|
192
192
|
|
|
193
|
-
_this.
|
|
193
|
+
_this.status = undefined;
|
|
194
194
|
/**
|
|
195
195
|
* Whether the Shift has been deleted
|
|
196
196
|
*
|
|
197
197
|
* @type {boolean}
|
|
198
|
-
* @
|
|
198
|
+
* @public
|
|
199
199
|
*/
|
|
200
200
|
|
|
201
|
-
_this.
|
|
201
|
+
_this.deleted = undefined;
|
|
202
202
|
/**
|
|
203
203
|
* When the Shift was last updated
|
|
204
204
|
*
|
|
205
205
|
* @type {Date}
|
|
206
|
-
* @
|
|
206
|
+
* @public
|
|
207
207
|
*/
|
|
208
208
|
|
|
209
|
-
_this.
|
|
209
|
+
_this.updateTimestamp = undefined;
|
|
210
210
|
/**
|
|
211
211
|
* The Site ID associated with this Shift
|
|
212
212
|
*
|
|
213
213
|
* @type {number}
|
|
214
|
-
* @
|
|
214
|
+
* @public
|
|
215
215
|
*/
|
|
216
216
|
|
|
217
|
-
_this.
|
|
217
|
+
_this.siteId = siteId;
|
|
218
218
|
return _this;
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
221
|
-
*
|
|
221
|
+
* Create a new **ShiftModel** from a JSON Object or JSON String
|
|
222
222
|
*
|
|
223
|
+
* @static
|
|
223
224
|
* @public
|
|
224
|
-
* @
|
|
225
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
226
|
+
* @param {number} siteId The Site ID associated with this Shift
|
|
227
|
+
* @return {ShiftModel}
|
|
225
228
|
*/
|
|
226
229
|
|
|
227
230
|
|
|
228
|
-
_createClass(ShiftModel, [{
|
|
229
|
-
key: "id",
|
|
230
|
-
get: function get() {
|
|
231
|
-
return this._id;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* The Packing Line ID this Shift is associated with
|
|
235
|
-
*
|
|
236
|
-
* @public
|
|
237
|
-
* @type {string}
|
|
238
|
-
*/
|
|
239
|
-
|
|
240
|
-
}, {
|
|
241
|
-
key: "packingLineId",
|
|
242
|
-
get: function get() {
|
|
243
|
-
return this._packingLineId;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* When this Shift was Created
|
|
247
|
-
*
|
|
248
|
-
* @public
|
|
249
|
-
* @type {Date}
|
|
250
|
-
*/
|
|
251
|
-
|
|
252
|
-
}, {
|
|
253
|
-
key: "createdTimestamp",
|
|
254
|
-
get: function get() {
|
|
255
|
-
return this._createdTimestamp;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* The Type of Shift
|
|
259
|
-
*
|
|
260
|
-
* @public
|
|
261
|
-
* @type {string}
|
|
262
|
-
*/
|
|
263
|
-
|
|
264
|
-
}, {
|
|
265
|
-
key: "type",
|
|
266
|
-
get: function get() {
|
|
267
|
-
return this._type;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* The Name of the Line Manager for this Shift
|
|
271
|
-
*
|
|
272
|
-
* @public
|
|
273
|
-
* @type {?string}
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
|
-
}, {
|
|
277
|
-
key: "lineManagerName",
|
|
278
|
-
get: function get() {
|
|
279
|
-
return this._lineManagerName;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* The Target Number of Bins to Tip for this Shift
|
|
283
|
-
*
|
|
284
|
-
* @public
|
|
285
|
-
* @type {?number}
|
|
286
|
-
*/
|
|
287
|
-
|
|
288
|
-
}, {
|
|
289
|
-
key: "binsTippedTarget",
|
|
290
|
-
get: function get() {
|
|
291
|
-
return this._binsTippedTarget;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
|
|
295
|
-
*
|
|
296
|
-
* @public
|
|
297
|
-
* @type {?number}
|
|
298
|
-
*/
|
|
299
|
-
|
|
300
|
-
}, {
|
|
301
|
-
key: "initialClass1Manning",
|
|
302
|
-
get: function get() {
|
|
303
|
-
return this._initialClass1Manning;
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
|
|
307
|
-
*
|
|
308
|
-
* @public
|
|
309
|
-
* @type {?number}
|
|
310
|
-
*/
|
|
311
|
-
|
|
312
|
-
}, {
|
|
313
|
-
key: "initialClass2Manning",
|
|
314
|
-
get: function get() {
|
|
315
|
-
return this._initialClass2Manning;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* When this Shift was Ready for Packing
|
|
319
|
-
*
|
|
320
|
-
* @public
|
|
321
|
-
* @type {?Date}
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
}, {
|
|
325
|
-
key: "readyTimestamp",
|
|
326
|
-
get: function get() {
|
|
327
|
-
return this._readyTimestamp;
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* When this Shift was Started
|
|
331
|
-
*
|
|
332
|
-
* @public
|
|
333
|
-
* @type {?Date}
|
|
334
|
-
*/
|
|
335
|
-
|
|
336
|
-
}, {
|
|
337
|
-
key: "startTimestamp",
|
|
338
|
-
get: function get() {
|
|
339
|
-
return this._startTimestamp;
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* When this Shift was Finished
|
|
343
|
-
*
|
|
344
|
-
* @public
|
|
345
|
-
* @type {?Date}
|
|
346
|
-
*/
|
|
347
|
-
|
|
348
|
-
}, {
|
|
349
|
-
key: "finishTimestamp",
|
|
350
|
-
get: function get() {
|
|
351
|
-
return this._finishTimestamp;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* When this Shift was Published
|
|
355
|
-
*
|
|
356
|
-
* @public
|
|
357
|
-
* @type {?Date}
|
|
358
|
-
*/
|
|
359
|
-
|
|
360
|
-
}, {
|
|
361
|
-
key: "publishTimestamp",
|
|
362
|
-
get: function get() {
|
|
363
|
-
return this._publishTimestamp;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
|
|
367
|
-
*
|
|
368
|
-
* @public
|
|
369
|
-
* @type {?number}
|
|
370
|
-
*/
|
|
371
|
-
|
|
372
|
-
}, {
|
|
373
|
-
key: "satisfactionRating",
|
|
374
|
-
get: function get() {
|
|
375
|
-
return this._satisfactionRating;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
379
|
-
*
|
|
380
|
-
* @public
|
|
381
|
-
* @type {Array<{area: string, noteContent: string}>}
|
|
382
|
-
*/
|
|
383
|
-
|
|
384
|
-
}, {
|
|
385
|
-
key: "handoverNotes",
|
|
386
|
-
get: function get() {
|
|
387
|
-
return this._handoverNotes;
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* An Optional Array of Notes for this Shift
|
|
391
|
-
*
|
|
392
|
-
* @public
|
|
393
|
-
* @type {Array<{area: string, timestamp: Date, content: string}>}
|
|
394
|
-
*/
|
|
395
|
-
|
|
396
|
-
}, {
|
|
397
|
-
key: "areaNotes",
|
|
398
|
-
get: function get() {
|
|
399
|
-
return this._areaNotes;
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* The Schedule for this Shift
|
|
403
|
-
*
|
|
404
|
-
* @public
|
|
405
|
-
* @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
|
|
406
|
-
*/
|
|
407
|
-
|
|
408
|
-
}, {
|
|
409
|
-
key: "schedule",
|
|
410
|
-
get: function get() {
|
|
411
|
-
return this._schedule;
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* The Status of this Shift
|
|
415
|
-
*
|
|
416
|
-
* @public
|
|
417
|
-
* @type {string}
|
|
418
|
-
*/
|
|
419
|
-
|
|
420
|
-
}, {
|
|
421
|
-
key: "status",
|
|
422
|
-
get: function get() {
|
|
423
|
-
return this._status;
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Whether the Shift has been deleted
|
|
427
|
-
*
|
|
428
|
-
* @public
|
|
429
|
-
* @type {boolean}
|
|
430
|
-
*/
|
|
431
|
-
|
|
432
|
-
}, {
|
|
433
|
-
key: "deleted",
|
|
434
|
-
get: function get() {
|
|
435
|
-
return this._deleted;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* When the Shift was last updated
|
|
439
|
-
*
|
|
440
|
-
* @public
|
|
441
|
-
* @type {Date}
|
|
442
|
-
*/
|
|
443
|
-
|
|
444
|
-
}, {
|
|
445
|
-
key: "updateTimestamp",
|
|
446
|
-
get: function get() {
|
|
447
|
-
return this._updateTimestamp;
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* The Site ID associated with this Shift
|
|
451
|
-
*
|
|
452
|
-
* @public
|
|
453
|
-
* @type {number}
|
|
454
|
-
*/
|
|
455
|
-
|
|
456
|
-
}, {
|
|
457
|
-
key: "siteId",
|
|
458
|
-
get: function get() {
|
|
459
|
-
return this._siteId;
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
* Convert this **ShiftModel** to a JSON Object
|
|
463
|
-
*
|
|
464
|
-
* @public
|
|
465
|
-
* @return {Object<string, any>}
|
|
466
|
-
*/
|
|
467
|
-
|
|
468
|
-
}, {
|
|
469
|
-
key: "toJSON",
|
|
470
|
-
value: function toJSON() {
|
|
471
|
-
return {
|
|
472
|
-
id: this._id,
|
|
473
|
-
packingLineId: this._packingLineId,
|
|
474
|
-
createdTimestamp: this._createdTimestamp,
|
|
475
|
-
type: this._type,
|
|
476
|
-
lineManagerName: this._lineManagerName,
|
|
477
|
-
binsTippedTarget: this._binsTippedTarget,
|
|
478
|
-
initialClass1Manning: this._initialClass1Manning,
|
|
479
|
-
initialClass2Manning: this._initialClass2Manning,
|
|
480
|
-
readyTimestamp: this._readyTimestamp,
|
|
481
|
-
startTimestamp: this._startTimestamp,
|
|
482
|
-
finishTimestamp: this._finishTimestamp,
|
|
483
|
-
publishTimestamp: this._publishTimestamp,
|
|
484
|
-
satisfactionRating: this._satisfactionRating,
|
|
485
|
-
handoverNotes: this._handoverNotes,
|
|
486
|
-
areaNotes: this._areaNotes,
|
|
487
|
-
schedule: this._schedule,
|
|
488
|
-
status: this._status,
|
|
489
|
-
deleted: this._deleted,
|
|
490
|
-
updateTimestamp: this._updateTimestamp
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Create a new **ShiftModel** from a JSON Object or JSON String
|
|
495
|
-
*
|
|
496
|
-
* @static
|
|
497
|
-
* @public
|
|
498
|
-
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
499
|
-
* @param {number} siteId The Site ID associated with this Shift
|
|
500
|
-
* @return {ShiftModel}
|
|
501
|
-
*/
|
|
502
|
-
|
|
503
|
-
}], [{
|
|
231
|
+
_createClass(ShiftModel, null, [{
|
|
504
232
|
key: "fromJSON",
|
|
505
233
|
value: function fromJSON(json, siteId) {
|
|
506
234
|
var model = new ShiftModel(siteId);
|
|
@@ -519,7 +247,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
519
247
|
}
|
|
520
248
|
|
|
521
249
|
if ('id' in jsonObject) {
|
|
522
|
-
model.
|
|
250
|
+
model.id = function () {
|
|
523
251
|
if (typeof jsonObject['id'] !== 'string') {
|
|
524
252
|
return String(jsonObject['id']);
|
|
525
253
|
}
|
|
@@ -529,7 +257,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
529
257
|
}
|
|
530
258
|
|
|
531
259
|
if ('packingLineId' in jsonObject) {
|
|
532
|
-
model.
|
|
260
|
+
model.packingLineId = function () {
|
|
533
261
|
if (typeof jsonObject['packingLineId'] !== 'string') {
|
|
534
262
|
return String(jsonObject['packingLineId']);
|
|
535
263
|
}
|
|
@@ -539,7 +267,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
539
267
|
}
|
|
540
268
|
|
|
541
269
|
if ('createdTimestamp' in jsonObject) {
|
|
542
|
-
model.
|
|
270
|
+
model.createdTimestamp = function () {
|
|
543
271
|
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
544
272
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
545
273
|
}
|
|
@@ -549,7 +277,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
549
277
|
}
|
|
550
278
|
|
|
551
279
|
if ('type' in jsonObject) {
|
|
552
|
-
model.
|
|
280
|
+
model.type = function () {
|
|
553
281
|
if (typeof jsonObject['type'] !== 'string') {
|
|
554
282
|
return String(jsonObject['type']);
|
|
555
283
|
}
|
|
@@ -559,7 +287,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
559
287
|
}
|
|
560
288
|
|
|
561
289
|
if ('lineManagerName' in jsonObject) {
|
|
562
|
-
model.
|
|
290
|
+
model.lineManagerName = function () {
|
|
563
291
|
if (jsonObject['lineManagerName'] === null) {
|
|
564
292
|
return null;
|
|
565
293
|
}
|
|
@@ -573,7 +301,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
573
301
|
}
|
|
574
302
|
|
|
575
303
|
if ('binsTippedTarget' in jsonObject) {
|
|
576
|
-
model.
|
|
304
|
+
model.binsTippedTarget = function () {
|
|
577
305
|
if (jsonObject['binsTippedTarget'] === null) {
|
|
578
306
|
return null;
|
|
579
307
|
}
|
|
@@ -587,7 +315,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
587
315
|
}
|
|
588
316
|
|
|
589
317
|
if ('initialClass1Manning' in jsonObject) {
|
|
590
|
-
model.
|
|
318
|
+
model.initialClass1Manning = function () {
|
|
591
319
|
if (jsonObject['initialClass1Manning'] === null) {
|
|
592
320
|
return null;
|
|
593
321
|
}
|
|
@@ -601,7 +329,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
601
329
|
}
|
|
602
330
|
|
|
603
331
|
if ('initialClass2Manning' in jsonObject) {
|
|
604
|
-
model.
|
|
332
|
+
model.initialClass2Manning = function () {
|
|
605
333
|
if (jsonObject['initialClass2Manning'] === null) {
|
|
606
334
|
return null;
|
|
607
335
|
}
|
|
@@ -615,7 +343,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
615
343
|
}
|
|
616
344
|
|
|
617
345
|
if ('readyTimestamp' in jsonObject) {
|
|
618
|
-
model.
|
|
346
|
+
model.readyTimestamp = function () {
|
|
619
347
|
if (jsonObject['readyTimestamp'] === null) {
|
|
620
348
|
return null;
|
|
621
349
|
}
|
|
@@ -629,7 +357,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
629
357
|
}
|
|
630
358
|
|
|
631
359
|
if ('startTimestamp' in jsonObject) {
|
|
632
|
-
model.
|
|
360
|
+
model.startTimestamp = function () {
|
|
633
361
|
if (jsonObject['startTimestamp'] === null) {
|
|
634
362
|
return null;
|
|
635
363
|
}
|
|
@@ -643,7 +371,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
643
371
|
}
|
|
644
372
|
|
|
645
373
|
if ('finishTimestamp' in jsonObject) {
|
|
646
|
-
model.
|
|
374
|
+
model.finishTimestamp = function () {
|
|
647
375
|
if (jsonObject['finishTimestamp'] === null) {
|
|
648
376
|
return null;
|
|
649
377
|
}
|
|
@@ -657,7 +385,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
657
385
|
}
|
|
658
386
|
|
|
659
387
|
if ('publishTimestamp' in jsonObject) {
|
|
660
|
-
model.
|
|
388
|
+
model.publishTimestamp = function () {
|
|
661
389
|
if (jsonObject['publishTimestamp'] === null) {
|
|
662
390
|
return null;
|
|
663
391
|
}
|
|
@@ -671,7 +399,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
671
399
|
}
|
|
672
400
|
|
|
673
401
|
if ('satisfactionRating' in jsonObject) {
|
|
674
|
-
model.
|
|
402
|
+
model.satisfactionRating = function () {
|
|
675
403
|
if (jsonObject['satisfactionRating'] === null) {
|
|
676
404
|
return null;
|
|
677
405
|
}
|
|
@@ -685,7 +413,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
685
413
|
}
|
|
686
414
|
|
|
687
415
|
if ('handoverNotes' in jsonObject) {
|
|
688
|
-
model.
|
|
416
|
+
model.handoverNotes = function () {
|
|
689
417
|
if (Array.isArray(jsonObject['handoverNotes']) !== true) {
|
|
690
418
|
return [];
|
|
691
419
|
}
|
|
@@ -725,7 +453,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
725
453
|
}
|
|
726
454
|
|
|
727
455
|
if ('areaNotes' in jsonObject) {
|
|
728
|
-
model.
|
|
456
|
+
model.areaNotes = function () {
|
|
729
457
|
if (Array.isArray(jsonObject['areaNotes']) !== true) {
|
|
730
458
|
return [];
|
|
731
459
|
}
|
|
@@ -777,7 +505,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
777
505
|
}
|
|
778
506
|
|
|
779
507
|
if ('schedule' in jsonObject) {
|
|
780
|
-
model.
|
|
508
|
+
model.schedule = function () {
|
|
781
509
|
var scheduleObject = {};
|
|
782
510
|
|
|
783
511
|
if (_typeof(jsonObject['schedule']) === 'object' && 'startTime' in jsonObject['schedule']) {
|
|
@@ -851,7 +579,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
851
579
|
}
|
|
852
580
|
|
|
853
581
|
if ('status' in jsonObject) {
|
|
854
|
-
model.
|
|
582
|
+
model.status = function () {
|
|
855
583
|
if (typeof jsonObject['status'] !== 'string') {
|
|
856
584
|
return String(jsonObject['status']);
|
|
857
585
|
}
|
|
@@ -861,7 +589,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
861
589
|
}
|
|
862
590
|
|
|
863
591
|
if ('deleted' in jsonObject) {
|
|
864
|
-
model.
|
|
592
|
+
model.deleted = function () {
|
|
865
593
|
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
866
594
|
return Boolean(jsonObject['deleted']);
|
|
867
595
|
}
|
|
@@ -871,7 +599,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
871
599
|
}
|
|
872
600
|
|
|
873
601
|
if ('updateTimestamp' in jsonObject) {
|
|
874
|
-
model.
|
|
602
|
+
model.updateTimestamp = function () {
|
|
875
603
|
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
876
604
|
return new Date(String(jsonObject['updateTimestamp']));
|
|
877
605
|
}
|
|
@@ -885,7 +613,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
885
613
|
}]);
|
|
886
614
|
|
|
887
615
|
return ShiftModel;
|
|
888
|
-
}(
|
|
616
|
+
}(_BaseModel2.default);
|
|
889
617
|
|
|
890
618
|
var _default = ShiftModel;
|
|
891
619
|
exports.default = _default;
|