@ricado/api-client 1.4.0 → 2.0.2
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 +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +5 -5
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +6 -6
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +5 -5
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +6 -6
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +5 -5
- package/lib/Controllers/Packhouse/Site/PackrunController.js +292 -6
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +6 -6
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +5 -5
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +6 -6
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +6 -6
- package/lib/Controllers/Packhouse/Site/VarietyController.js +5 -5
- 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 +6 -6
- package/lib/Controllers/Site/AlarmGroupController.js +5 -5
- package/lib/Controllers/Site/DefinitionController.js +5 -5
- package/lib/Controllers/Site/PermanentObjectController.js +5 -5
- package/lib/Controllers/Site/PermanentObjectDataController.js +6 -6
- package/lib/Controllers/Site/PointController.js +8 -6
- package/lib/Controllers/Site/TemporaryObjectController.js +5 -5
- 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 -195
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +40 -179
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +58 -275
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +46 -211
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +40 -179
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +34 -147
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +52 -243
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +58 -275
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +40 -179
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +34 -147
- package/lib/Models/Packhouse/Site/PackTypeModel.js +40 -179
- package/lib/Models/Packhouse/Site/PackingLineModel.js +61 -291
- package/lib/Models/Packhouse/Site/PackrunModel.js +61 -291
- package/lib/Models/Packhouse/Site/RejectBinModel.js +43 -195
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +52 -243
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +46 -211
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +52 -243
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +127 -643
- package/lib/Models/Packhouse/Site/ShiftModel.js +73 -355
- package/lib/Models/Packhouse/Site/VarietyModel.js +40 -179
- package/lib/Models/RTUModel.js +26 -117
- package/lib/Models/RTUPluginModel.js +23 -101
- package/lib/Models/Site/AlarmGroupModel.js +37 -163
- package/lib/Models/Site/AlarmModel.js +67 -323
- package/lib/Models/Site/DefinitionModel.js +34 -147
- package/lib/Models/Site/PermanentObjectDataModel.js +40 -179
- package/lib/Models/Site/PermanentObjectModel.js +37 -163
- package/lib/Models/Site/PointModel.js +49 -227
- package/lib/Models/Site/TemporaryObjectModel.js +34 -147
- 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 +931 -1589
- package/package.json +3 -3
- 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 +365 -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/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
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), 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
|
|
|
@@ -47,9 +47,8 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
47
47
|
* ShiftModel Constructor
|
|
48
48
|
*
|
|
49
49
|
* @protected
|
|
50
|
-
* @param {number} siteId The Site ID associated with this Shift
|
|
51
50
|
*/
|
|
52
|
-
function ShiftModel(
|
|
51
|
+
function ShiftModel() {
|
|
53
52
|
var _this;
|
|
54
53
|
|
|
55
54
|
_classCallCheck(this, ShiftModel);
|
|
@@ -59,451 +58,170 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
59
58
|
* The Shift ID
|
|
60
59
|
*
|
|
61
60
|
* @type {string}
|
|
62
|
-
* @
|
|
61
|
+
* @public
|
|
63
62
|
*/
|
|
64
63
|
|
|
65
|
-
_this.
|
|
64
|
+
_this.id = undefined;
|
|
66
65
|
/**
|
|
67
66
|
* The Packing Line ID this Shift is associated with
|
|
68
67
|
*
|
|
69
68
|
* @type {string}
|
|
70
|
-
* @
|
|
69
|
+
* @public
|
|
71
70
|
*/
|
|
72
71
|
|
|
73
|
-
_this.
|
|
72
|
+
_this.packingLineId = undefined;
|
|
74
73
|
/**
|
|
75
74
|
* When this Shift was Created
|
|
76
75
|
*
|
|
77
76
|
* @type {Date}
|
|
78
|
-
* @
|
|
77
|
+
* @public
|
|
79
78
|
*/
|
|
80
79
|
|
|
81
|
-
_this.
|
|
80
|
+
_this.createdTimestamp = undefined;
|
|
82
81
|
/**
|
|
83
82
|
* The Type of Shift
|
|
84
83
|
*
|
|
85
84
|
* @type {string}
|
|
86
|
-
* @
|
|
85
|
+
* @public
|
|
87
86
|
*/
|
|
88
87
|
|
|
89
|
-
_this.
|
|
88
|
+
_this.type = undefined;
|
|
90
89
|
/**
|
|
91
90
|
* The Name of the Line Manager for this Shift
|
|
92
91
|
*
|
|
93
92
|
* @type {?string}
|
|
94
|
-
* @
|
|
93
|
+
* @public
|
|
95
94
|
*/
|
|
96
95
|
|
|
97
|
-
_this.
|
|
96
|
+
_this.lineManagerName = undefined;
|
|
98
97
|
/**
|
|
99
98
|
* The Target Number of Bins to Tip for this Shift
|
|
100
99
|
*
|
|
101
100
|
* @type {?number}
|
|
102
|
-
* @
|
|
101
|
+
* @public
|
|
103
102
|
*/
|
|
104
103
|
|
|
105
|
-
_this.
|
|
104
|
+
_this.binsTippedTarget = undefined;
|
|
106
105
|
/**
|
|
107
106
|
* *DEPRECATED* The Initial Number of People working in all Areas except Class 2 for this Hour
|
|
108
107
|
*
|
|
109
108
|
* @type {?number}
|
|
110
|
-
* @
|
|
109
|
+
* @public
|
|
111
110
|
*/
|
|
112
111
|
|
|
113
|
-
_this.
|
|
112
|
+
_this.initialClass1Manning = undefined;
|
|
114
113
|
/**
|
|
115
114
|
* *DEPRECATED* The Initial Number of People working in the Class 2 Area for this Hour
|
|
116
115
|
*
|
|
117
116
|
* @type {?number}
|
|
118
|
-
* @
|
|
117
|
+
* @public
|
|
119
118
|
*/
|
|
120
119
|
|
|
121
|
-
_this.
|
|
120
|
+
_this.initialClass2Manning = undefined;
|
|
122
121
|
/**
|
|
123
122
|
* When this Shift was Ready for Packing
|
|
124
123
|
*
|
|
125
124
|
* @type {?Date}
|
|
126
|
-
* @
|
|
125
|
+
* @public
|
|
127
126
|
*/
|
|
128
127
|
|
|
129
|
-
_this.
|
|
128
|
+
_this.readyTimestamp = undefined;
|
|
130
129
|
/**
|
|
131
130
|
* When this Shift was Started
|
|
132
131
|
*
|
|
133
132
|
* @type {?Date}
|
|
134
|
-
* @
|
|
133
|
+
* @public
|
|
135
134
|
*/
|
|
136
135
|
|
|
137
|
-
_this.
|
|
136
|
+
_this.startTimestamp = undefined;
|
|
138
137
|
/**
|
|
139
138
|
* When this Shift was Finished
|
|
140
139
|
*
|
|
141
140
|
* @type {?Date}
|
|
142
|
-
* @
|
|
141
|
+
* @public
|
|
143
142
|
*/
|
|
144
143
|
|
|
145
|
-
_this.
|
|
144
|
+
_this.finishTimestamp = undefined;
|
|
146
145
|
/**
|
|
147
146
|
* When this Shift was Published
|
|
148
147
|
*
|
|
149
148
|
* @type {?Date}
|
|
150
|
-
* @
|
|
149
|
+
* @public
|
|
151
150
|
*/
|
|
152
151
|
|
|
153
|
-
_this.
|
|
152
|
+
_this.publishTimestamp = undefined;
|
|
154
153
|
/**
|
|
155
154
|
* An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
|
|
156
155
|
*
|
|
157
156
|
* @type {?number}
|
|
158
|
-
* @
|
|
157
|
+
* @public
|
|
159
158
|
*/
|
|
160
159
|
|
|
161
|
-
_this.
|
|
160
|
+
_this.satisfactionRating = undefined;
|
|
162
161
|
/**
|
|
163
162
|
* *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
164
163
|
*
|
|
165
164
|
* @type {Array<{area: string, noteContent: string}>}
|
|
166
|
-
* @
|
|
165
|
+
* @public
|
|
167
166
|
*/
|
|
168
167
|
|
|
169
|
-
_this.
|
|
168
|
+
_this.handoverNotes = undefined;
|
|
170
169
|
/**
|
|
171
170
|
* An Optional Array of Notes for this Shift
|
|
172
171
|
*
|
|
173
172
|
* @type {Array<{area: string, timestamp: Date, content: string}>}
|
|
174
|
-
* @
|
|
173
|
+
* @public
|
|
175
174
|
*/
|
|
176
175
|
|
|
177
|
-
_this.
|
|
176
|
+
_this.areaNotes = undefined;
|
|
178
177
|
/**
|
|
179
178
|
* The Schedule for this Shift
|
|
180
179
|
*
|
|
181
180
|
* @type {{startTime: string, endTime: string, breaks: Array<{startTime: string, endTime: string}>}}
|
|
182
|
-
* @
|
|
181
|
+
* @public
|
|
183
182
|
*/
|
|
184
183
|
|
|
185
|
-
_this.
|
|
184
|
+
_this.schedule = undefined;
|
|
186
185
|
/**
|
|
187
186
|
* The Status of this Shift
|
|
188
187
|
*
|
|
189
188
|
* @type {string}
|
|
190
|
-
* @
|
|
189
|
+
* @public
|
|
191
190
|
*/
|
|
192
191
|
|
|
193
|
-
_this.
|
|
192
|
+
_this.status = undefined;
|
|
194
193
|
/**
|
|
195
194
|
* Whether the Shift has been deleted
|
|
196
195
|
*
|
|
197
196
|
* @type {boolean}
|
|
198
|
-
* @
|
|
197
|
+
* @public
|
|
199
198
|
*/
|
|
200
199
|
|
|
201
|
-
_this.
|
|
200
|
+
_this.deleted = undefined;
|
|
202
201
|
/**
|
|
203
202
|
* When the Shift was last updated
|
|
204
203
|
*
|
|
205
204
|
* @type {Date}
|
|
206
|
-
* @
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
|
-
_this._updateTimestamp = undefined;
|
|
210
|
-
/**
|
|
211
|
-
* The Site ID associated with this Shift
|
|
212
|
-
*
|
|
213
|
-
* @type {number}
|
|
214
|
-
* @private
|
|
205
|
+
* @public
|
|
215
206
|
*/
|
|
216
207
|
|
|
217
|
-
_this.
|
|
208
|
+
_this.updateTimestamp = undefined;
|
|
218
209
|
return _this;
|
|
219
210
|
}
|
|
220
211
|
/**
|
|
221
|
-
*
|
|
212
|
+
* Create a new **ShiftModel** from a JSON Object or JSON String
|
|
222
213
|
*
|
|
214
|
+
* @static
|
|
223
215
|
* @public
|
|
224
|
-
* @
|
|
216
|
+
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
217
|
+
* @return {ShiftModel}
|
|
225
218
|
*/
|
|
226
219
|
|
|
227
220
|
|
|
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
|
-
}], [{
|
|
221
|
+
_createClass(ShiftModel, null, [{
|
|
504
222
|
key: "fromJSON",
|
|
505
|
-
value: function fromJSON(json
|
|
506
|
-
var model = new ShiftModel(
|
|
223
|
+
value: function fromJSON(json) {
|
|
224
|
+
var model = new ShiftModel();
|
|
507
225
|
/**
|
|
508
226
|
* The JSON Object
|
|
509
227
|
*
|
|
@@ -519,7 +237,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
519
237
|
}
|
|
520
238
|
|
|
521
239
|
if ('id' in jsonObject) {
|
|
522
|
-
model.
|
|
240
|
+
model.id = function () {
|
|
523
241
|
if (typeof jsonObject['id'] !== 'string') {
|
|
524
242
|
return String(jsonObject['id']);
|
|
525
243
|
}
|
|
@@ -529,7 +247,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
529
247
|
}
|
|
530
248
|
|
|
531
249
|
if ('packingLineId' in jsonObject) {
|
|
532
|
-
model.
|
|
250
|
+
model.packingLineId = function () {
|
|
533
251
|
if (typeof jsonObject['packingLineId'] !== 'string') {
|
|
534
252
|
return String(jsonObject['packingLineId']);
|
|
535
253
|
}
|
|
@@ -539,7 +257,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
539
257
|
}
|
|
540
258
|
|
|
541
259
|
if ('createdTimestamp' in jsonObject) {
|
|
542
|
-
model.
|
|
260
|
+
model.createdTimestamp = function () {
|
|
543
261
|
if (typeof jsonObject['createdTimestamp'] !== 'string') {
|
|
544
262
|
return new Date(String(jsonObject['createdTimestamp']));
|
|
545
263
|
}
|
|
@@ -549,7 +267,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
549
267
|
}
|
|
550
268
|
|
|
551
269
|
if ('type' in jsonObject) {
|
|
552
|
-
model.
|
|
270
|
+
model.type = function () {
|
|
553
271
|
if (typeof jsonObject['type'] !== 'string') {
|
|
554
272
|
return String(jsonObject['type']);
|
|
555
273
|
}
|
|
@@ -559,7 +277,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
559
277
|
}
|
|
560
278
|
|
|
561
279
|
if ('lineManagerName' in jsonObject) {
|
|
562
|
-
model.
|
|
280
|
+
model.lineManagerName = function () {
|
|
563
281
|
if (jsonObject['lineManagerName'] === null) {
|
|
564
282
|
return null;
|
|
565
283
|
}
|
|
@@ -573,7 +291,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
573
291
|
}
|
|
574
292
|
|
|
575
293
|
if ('binsTippedTarget' in jsonObject) {
|
|
576
|
-
model.
|
|
294
|
+
model.binsTippedTarget = function () {
|
|
577
295
|
if (jsonObject['binsTippedTarget'] === null) {
|
|
578
296
|
return null;
|
|
579
297
|
}
|
|
@@ -587,7 +305,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
587
305
|
}
|
|
588
306
|
|
|
589
307
|
if ('initialClass1Manning' in jsonObject) {
|
|
590
|
-
model.
|
|
308
|
+
model.initialClass1Manning = function () {
|
|
591
309
|
if (jsonObject['initialClass1Manning'] === null) {
|
|
592
310
|
return null;
|
|
593
311
|
}
|
|
@@ -601,7 +319,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
601
319
|
}
|
|
602
320
|
|
|
603
321
|
if ('initialClass2Manning' in jsonObject) {
|
|
604
|
-
model.
|
|
322
|
+
model.initialClass2Manning = function () {
|
|
605
323
|
if (jsonObject['initialClass2Manning'] === null) {
|
|
606
324
|
return null;
|
|
607
325
|
}
|
|
@@ -615,7 +333,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
615
333
|
}
|
|
616
334
|
|
|
617
335
|
if ('readyTimestamp' in jsonObject) {
|
|
618
|
-
model.
|
|
336
|
+
model.readyTimestamp = function () {
|
|
619
337
|
if (jsonObject['readyTimestamp'] === null) {
|
|
620
338
|
return null;
|
|
621
339
|
}
|
|
@@ -629,7 +347,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
629
347
|
}
|
|
630
348
|
|
|
631
349
|
if ('startTimestamp' in jsonObject) {
|
|
632
|
-
model.
|
|
350
|
+
model.startTimestamp = function () {
|
|
633
351
|
if (jsonObject['startTimestamp'] === null) {
|
|
634
352
|
return null;
|
|
635
353
|
}
|
|
@@ -643,7 +361,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
643
361
|
}
|
|
644
362
|
|
|
645
363
|
if ('finishTimestamp' in jsonObject) {
|
|
646
|
-
model.
|
|
364
|
+
model.finishTimestamp = function () {
|
|
647
365
|
if (jsonObject['finishTimestamp'] === null) {
|
|
648
366
|
return null;
|
|
649
367
|
}
|
|
@@ -657,7 +375,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
657
375
|
}
|
|
658
376
|
|
|
659
377
|
if ('publishTimestamp' in jsonObject) {
|
|
660
|
-
model.
|
|
378
|
+
model.publishTimestamp = function () {
|
|
661
379
|
if (jsonObject['publishTimestamp'] === null) {
|
|
662
380
|
return null;
|
|
663
381
|
}
|
|
@@ -671,7 +389,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
671
389
|
}
|
|
672
390
|
|
|
673
391
|
if ('satisfactionRating' in jsonObject) {
|
|
674
|
-
model.
|
|
392
|
+
model.satisfactionRating = function () {
|
|
675
393
|
if (jsonObject['satisfactionRating'] === null) {
|
|
676
394
|
return null;
|
|
677
395
|
}
|
|
@@ -685,7 +403,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
685
403
|
}
|
|
686
404
|
|
|
687
405
|
if ('handoverNotes' in jsonObject) {
|
|
688
|
-
model.
|
|
406
|
+
model.handoverNotes = function () {
|
|
689
407
|
if (Array.isArray(jsonObject['handoverNotes']) !== true) {
|
|
690
408
|
return [];
|
|
691
409
|
}
|
|
@@ -725,7 +443,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
725
443
|
}
|
|
726
444
|
|
|
727
445
|
if ('areaNotes' in jsonObject) {
|
|
728
|
-
model.
|
|
446
|
+
model.areaNotes = function () {
|
|
729
447
|
if (Array.isArray(jsonObject['areaNotes']) !== true) {
|
|
730
448
|
return [];
|
|
731
449
|
}
|
|
@@ -777,7 +495,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
777
495
|
}
|
|
778
496
|
|
|
779
497
|
if ('schedule' in jsonObject) {
|
|
780
|
-
model.
|
|
498
|
+
model.schedule = function () {
|
|
781
499
|
var scheduleObject = {};
|
|
782
500
|
|
|
783
501
|
if (_typeof(jsonObject['schedule']) === 'object' && 'startTime' in jsonObject['schedule']) {
|
|
@@ -851,7 +569,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
851
569
|
}
|
|
852
570
|
|
|
853
571
|
if ('status' in jsonObject) {
|
|
854
|
-
model.
|
|
572
|
+
model.status = function () {
|
|
855
573
|
if (typeof jsonObject['status'] !== 'string') {
|
|
856
574
|
return String(jsonObject['status']);
|
|
857
575
|
}
|
|
@@ -861,7 +579,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
861
579
|
}
|
|
862
580
|
|
|
863
581
|
if ('deleted' in jsonObject) {
|
|
864
|
-
model.
|
|
582
|
+
model.deleted = function () {
|
|
865
583
|
if (typeof jsonObject['deleted'] !== 'boolean') {
|
|
866
584
|
return Boolean(jsonObject['deleted']);
|
|
867
585
|
}
|
|
@@ -871,7 +589,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
871
589
|
}
|
|
872
590
|
|
|
873
591
|
if ('updateTimestamp' in jsonObject) {
|
|
874
|
-
model.
|
|
592
|
+
model.updateTimestamp = function () {
|
|
875
593
|
if (typeof jsonObject['updateTimestamp'] !== 'string') {
|
|
876
594
|
return new Date(String(jsonObject['updateTimestamp']));
|
|
877
595
|
}
|
|
@@ -885,7 +603,7 @@ var ShiftModel = /*#__PURE__*/function (_BaseSiteModel) {
|
|
|
885
603
|
}]);
|
|
886
604
|
|
|
887
605
|
return ShiftModel;
|
|
888
|
-
}(
|
|
606
|
+
}(_BaseModel2.default);
|
|
889
607
|
|
|
890
608
|
var _default = ShiftModel;
|
|
891
609
|
exports.default = _default;
|