@ricado/api-client 2.5.12 → 2.5.14
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/ShiftController.js +1784 -190
- package/lib/Models/Packhouse/Site/ShiftModel.js +99 -1
- package/lib/PackageVersion.js +1 -1
- package/lib/WebSocketHelper.js +2 -3
- package/lib/index.d.ts +2072 -1607
- package/package.json +2 -2
- package/src/Controllers/Packhouse/Site/ShiftController.js +2027 -0
- package/src/Models/Packhouse/Site/ShiftModel.js +124 -0
- package/src/PackageVersion.js +1 -1
- package/src/WebSocketHelper.js +0 -2
- package/types/tslint.json +3 -1
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
import RequestHelper from '../../../RequestHelper';
|
|
8
8
|
import ShiftModel from '../../../Models/Packhouse/Site/ShiftModel';
|
|
9
|
+
import ShiftHourlyEntryModel from '../../../Models/Packhouse/Site/ShiftHourlyEntryModel';
|
|
10
|
+
import DowntimeEventModel from '../../../Models/Packhouse/Site/DowntimeEventModel';
|
|
11
|
+
import ShiftFocusMeetingModel from '../../../Models/Packhouse/Site/ShiftFocusMeetingModel';
|
|
12
|
+
import ShiftGrowerChangeMeetingModel from '../../../Models/Packhouse/Site/ShiftGrowerChangeMeetingModel';
|
|
13
|
+
import PackrunModel from '../../../Models/Packhouse/Site/PackrunModel';
|
|
14
|
+
import ShiftQualitySummaryModel from '../../../Models/Packhouse/Site/ShiftQualitySummaryModel';
|
|
9
15
|
|
|
10
16
|
/**
|
|
11
17
|
* Controller Class for Shifts
|
|
@@ -891,6 +897,1896 @@ class ShiftController
|
|
|
891
897
|
});
|
|
892
898
|
}
|
|
893
899
|
|
|
900
|
+
/**
|
|
901
|
+
* Retrieve a Shift Summary Report [GET /packhouse/sites/{siteId}/shifts/{id}/summaryReport]
|
|
902
|
+
*
|
|
903
|
+
* Retrieves a Summary Report for a Shift
|
|
904
|
+
*
|
|
905
|
+
* @static
|
|
906
|
+
* @public
|
|
907
|
+
* @param {number} siteId The Site ID
|
|
908
|
+
* @param {string} id The Shift ID
|
|
909
|
+
* @return {Promise<ShiftController.ShiftSummaryReport>}
|
|
910
|
+
*/
|
|
911
|
+
static getSummaryReport(siteId, id)
|
|
912
|
+
{
|
|
913
|
+
return new Promise((resolve, reject) => {
|
|
914
|
+
RequestHelper.getRequest(`/packhouse/sites/${siteId}/shifts/${id}/summaryReport`)
|
|
915
|
+
.then((result) => {
|
|
916
|
+
let resolveValue = (function(){
|
|
917
|
+
let resultObject = {};
|
|
918
|
+
|
|
919
|
+
if(typeof result === 'object' && 'shiftId' in result)
|
|
920
|
+
{
|
|
921
|
+
resultObject.shiftId = (function(){
|
|
922
|
+
if(typeof result.shiftId !== 'string')
|
|
923
|
+
{
|
|
924
|
+
return String(result.shiftId);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
return result.shiftId;
|
|
928
|
+
}());
|
|
929
|
+
}
|
|
930
|
+
else
|
|
931
|
+
{
|
|
932
|
+
resultObject.shiftId = "";
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
if(typeof result === 'object' && 'shiftType' in result)
|
|
936
|
+
{
|
|
937
|
+
resultObject.shiftType = (function(){
|
|
938
|
+
if(typeof result.shiftType !== 'string')
|
|
939
|
+
{
|
|
940
|
+
return String(result.shiftType);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
return result.shiftType;
|
|
944
|
+
}());
|
|
945
|
+
}
|
|
946
|
+
else
|
|
947
|
+
{
|
|
948
|
+
resultObject.shiftType = "";
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
if(typeof result === 'object' && 'isoWeek' in result)
|
|
952
|
+
{
|
|
953
|
+
resultObject.isoWeek = (function(){
|
|
954
|
+
if(typeof result.isoWeek !== 'number')
|
|
955
|
+
{
|
|
956
|
+
return Number(result.isoWeek);
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
return result.isoWeek;
|
|
960
|
+
}());
|
|
961
|
+
}
|
|
962
|
+
else
|
|
963
|
+
{
|
|
964
|
+
resultObject.isoWeek = 0;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
if(typeof result === 'object' && 'startTimestamp' in result)
|
|
968
|
+
{
|
|
969
|
+
resultObject.startTimestamp = (function(){
|
|
970
|
+
if(typeof result.startTimestamp !== 'string')
|
|
971
|
+
{
|
|
972
|
+
return new Date(String(result.startTimestamp));
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
return new Date(result.startTimestamp);
|
|
976
|
+
}());
|
|
977
|
+
}
|
|
978
|
+
else
|
|
979
|
+
{
|
|
980
|
+
resultObject.startTimestamp = new Date();
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
if(typeof result === 'object' && 'finishTimestamp' in result)
|
|
984
|
+
{
|
|
985
|
+
resultObject.finishTimestamp = (function(){
|
|
986
|
+
if(result.finishTimestamp === null)
|
|
987
|
+
{
|
|
988
|
+
return null;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
if(typeof result.finishTimestamp !== 'string')
|
|
992
|
+
{
|
|
993
|
+
return new Date(String(result.finishTimestamp));
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
return new Date(result.finishTimestamp);
|
|
997
|
+
}());
|
|
998
|
+
}
|
|
999
|
+
else
|
|
1000
|
+
{
|
|
1001
|
+
resultObject.finishTimestamp = null;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
if(typeof result === 'object' && 'lineManagerName' in result)
|
|
1005
|
+
{
|
|
1006
|
+
resultObject.lineManagerName = (function(){
|
|
1007
|
+
if(result.lineManagerName === null)
|
|
1008
|
+
{
|
|
1009
|
+
return null;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
if(typeof result.lineManagerName !== 'string')
|
|
1013
|
+
{
|
|
1014
|
+
return String(result.lineManagerName);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
return result.lineManagerName;
|
|
1018
|
+
}());
|
|
1019
|
+
}
|
|
1020
|
+
else
|
|
1021
|
+
{
|
|
1022
|
+
resultObject.lineManagerName = null;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
if(typeof result === 'object' && 'qualityManagerName' in result)
|
|
1026
|
+
{
|
|
1027
|
+
resultObject.qualityManagerName = (function(){
|
|
1028
|
+
if(result.qualityManagerName === null)
|
|
1029
|
+
{
|
|
1030
|
+
return null;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
if(typeof result.qualityManagerName !== 'string')
|
|
1034
|
+
{
|
|
1035
|
+
return String(result.qualityManagerName);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
return result.qualityManagerName;
|
|
1039
|
+
}());
|
|
1040
|
+
}
|
|
1041
|
+
else
|
|
1042
|
+
{
|
|
1043
|
+
resultObject.qualityManagerName = null;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
if(typeof result === 'object' && 'hourlyEntries' in result)
|
|
1047
|
+
{
|
|
1048
|
+
resultObject.hourlyEntries = (function(){
|
|
1049
|
+
if(Array.isArray(result.hourlyEntries) !== true)
|
|
1050
|
+
{
|
|
1051
|
+
return [];
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
return result.hourlyEntries.map((hourlyEntriesItem) => {
|
|
1055
|
+
return (function(){
|
|
1056
|
+
return ShiftHourlyEntryModel.fromJSON(hourlyEntriesItem, siteId);
|
|
1057
|
+
}());
|
|
1058
|
+
});
|
|
1059
|
+
}());
|
|
1060
|
+
}
|
|
1061
|
+
else
|
|
1062
|
+
{
|
|
1063
|
+
resultObject.hourlyEntries = [];
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
if(typeof result === 'object' && 'hourlyEntryInteractionActual' in result)
|
|
1067
|
+
{
|
|
1068
|
+
resultObject.hourlyEntryInteractionActual = (function(){
|
|
1069
|
+
if(typeof result.hourlyEntryInteractionActual !== 'number')
|
|
1070
|
+
{
|
|
1071
|
+
return Number.isInteger(Number(result.hourlyEntryInteractionActual)) ? Number(result.hourlyEntryInteractionActual) : Math.floor(Number(result.hourlyEntryInteractionActual));
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
return Number.isInteger(result.hourlyEntryInteractionActual) ? result.hourlyEntryInteractionActual : Math.floor(result.hourlyEntryInteractionActual);
|
|
1075
|
+
}());
|
|
1076
|
+
}
|
|
1077
|
+
else
|
|
1078
|
+
{
|
|
1079
|
+
resultObject.hourlyEntryInteractionActual = 0;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
if(typeof result === 'object' && 'hourlyEntryInteractionExpected' in result)
|
|
1083
|
+
{
|
|
1084
|
+
resultObject.hourlyEntryInteractionExpected = (function(){
|
|
1085
|
+
if(result.hourlyEntryInteractionExpected === null)
|
|
1086
|
+
{
|
|
1087
|
+
return null;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
if(typeof result.hourlyEntryInteractionExpected !== 'number')
|
|
1091
|
+
{
|
|
1092
|
+
return Number.isInteger(Number(result.hourlyEntryInteractionExpected)) ? Number(result.hourlyEntryInteractionExpected) : Math.floor(Number(result.hourlyEntryInteractionExpected));
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
return Number.isInteger(result.hourlyEntryInteractionExpected) ? result.hourlyEntryInteractionExpected : Math.floor(result.hourlyEntryInteractionExpected);
|
|
1096
|
+
}());
|
|
1097
|
+
}
|
|
1098
|
+
else
|
|
1099
|
+
{
|
|
1100
|
+
resultObject.hourlyEntryInteractionExpected = null;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
if(typeof result === 'object' && 'hourlyEntryInteractionScore' in result)
|
|
1104
|
+
{
|
|
1105
|
+
resultObject.hourlyEntryInteractionScore = (function(){
|
|
1106
|
+
if(result.hourlyEntryInteractionScore === null)
|
|
1107
|
+
{
|
|
1108
|
+
return null;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
if(typeof result.hourlyEntryInteractionScore !== 'number')
|
|
1112
|
+
{
|
|
1113
|
+
return Number(result.hourlyEntryInteractionScore);
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
return result.hourlyEntryInteractionScore;
|
|
1117
|
+
}());
|
|
1118
|
+
}
|
|
1119
|
+
else
|
|
1120
|
+
{
|
|
1121
|
+
resultObject.hourlyEntryInteractionScore = null;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
if(typeof result === 'object' && 'downtimeEvents' in result)
|
|
1125
|
+
{
|
|
1126
|
+
resultObject.downtimeEvents = (function(){
|
|
1127
|
+
if(Array.isArray(result.downtimeEvents) !== true)
|
|
1128
|
+
{
|
|
1129
|
+
return [];
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
return result.downtimeEvents.map((downtimeEventsItem) => {
|
|
1133
|
+
return (function(){
|
|
1134
|
+
return DowntimeEventModel.fromJSON(downtimeEventsItem, siteId);
|
|
1135
|
+
}());
|
|
1136
|
+
});
|
|
1137
|
+
}());
|
|
1138
|
+
}
|
|
1139
|
+
else
|
|
1140
|
+
{
|
|
1141
|
+
resultObject.downtimeEvents = [];
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
if(typeof result === 'object' && 'focusMeetings' in result)
|
|
1145
|
+
{
|
|
1146
|
+
resultObject.focusMeetings = (function(){
|
|
1147
|
+
if(Array.isArray(result.focusMeetings) !== true)
|
|
1148
|
+
{
|
|
1149
|
+
return [];
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
return result.focusMeetings.map((focusMeetingsItem) => {
|
|
1153
|
+
return (function(){
|
|
1154
|
+
return ShiftFocusMeetingModel.fromJSON(focusMeetingsItem, siteId);
|
|
1155
|
+
}());
|
|
1156
|
+
});
|
|
1157
|
+
}());
|
|
1158
|
+
}
|
|
1159
|
+
else
|
|
1160
|
+
{
|
|
1161
|
+
resultObject.focusMeetings = [];
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
if(typeof result === 'object' && 'focusMeetingsHeld' in result)
|
|
1165
|
+
{
|
|
1166
|
+
resultObject.focusMeetingsHeld = (function(){
|
|
1167
|
+
if(typeof result.focusMeetingsHeld !== 'number')
|
|
1168
|
+
{
|
|
1169
|
+
return Number.isInteger(Number(result.focusMeetingsHeld)) ? Number(result.focusMeetingsHeld) : Math.floor(Number(result.focusMeetingsHeld));
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
return Number.isInteger(result.focusMeetingsHeld) ? result.focusMeetingsHeld : Math.floor(result.focusMeetingsHeld);
|
|
1173
|
+
}());
|
|
1174
|
+
}
|
|
1175
|
+
else
|
|
1176
|
+
{
|
|
1177
|
+
resultObject.focusMeetingsHeld = 0;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
if(typeof result === 'object' && 'focusMeetingsExpected' in result)
|
|
1181
|
+
{
|
|
1182
|
+
resultObject.focusMeetingsExpected = (function(){
|
|
1183
|
+
if(result.focusMeetingsExpected === null)
|
|
1184
|
+
{
|
|
1185
|
+
return null;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
if(typeof result.focusMeetingsExpected !== 'number')
|
|
1189
|
+
{
|
|
1190
|
+
return Number.isInteger(Number(result.focusMeetingsExpected)) ? Number(result.focusMeetingsExpected) : Math.floor(Number(result.focusMeetingsExpected));
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
return Number.isInteger(result.focusMeetingsExpected) ? result.focusMeetingsExpected : Math.floor(result.focusMeetingsExpected);
|
|
1194
|
+
}());
|
|
1195
|
+
}
|
|
1196
|
+
else
|
|
1197
|
+
{
|
|
1198
|
+
resultObject.focusMeetingsExpected = null;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
if(typeof result === 'object' && 'focusMeetingsScore' in result)
|
|
1202
|
+
{
|
|
1203
|
+
resultObject.focusMeetingsScore = (function(){
|
|
1204
|
+
if(result.focusMeetingsScore === null)
|
|
1205
|
+
{
|
|
1206
|
+
return null;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
if(typeof result.focusMeetingsScore !== 'number')
|
|
1210
|
+
{
|
|
1211
|
+
return Number(result.focusMeetingsScore);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
return result.focusMeetingsScore;
|
|
1215
|
+
}());
|
|
1216
|
+
}
|
|
1217
|
+
else
|
|
1218
|
+
{
|
|
1219
|
+
resultObject.focusMeetingsScore = null;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
if(typeof result === 'object' && 'growerChangeMeetings' in result)
|
|
1223
|
+
{
|
|
1224
|
+
resultObject.growerChangeMeetings = (function(){
|
|
1225
|
+
if(Array.isArray(result.growerChangeMeetings) !== true)
|
|
1226
|
+
{
|
|
1227
|
+
return [];
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
return result.growerChangeMeetings.map((growerChangeMeetingsItem) => {
|
|
1231
|
+
return (function(){
|
|
1232
|
+
return ShiftGrowerChangeMeetingModel.fromJSON(growerChangeMeetingsItem, siteId);
|
|
1233
|
+
}());
|
|
1234
|
+
});
|
|
1235
|
+
}());
|
|
1236
|
+
}
|
|
1237
|
+
else
|
|
1238
|
+
{
|
|
1239
|
+
resultObject.growerChangeMeetings = [];
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
if(typeof result === 'object' && 'growerChangeMeetingsHeld' in result)
|
|
1243
|
+
{
|
|
1244
|
+
resultObject.growerChangeMeetingsHeld = (function(){
|
|
1245
|
+
if(typeof result.growerChangeMeetingsHeld !== 'number')
|
|
1246
|
+
{
|
|
1247
|
+
return Number.isInteger(Number(result.growerChangeMeetingsHeld)) ? Number(result.growerChangeMeetingsHeld) : Math.floor(Number(result.growerChangeMeetingsHeld));
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
return Number.isInteger(result.growerChangeMeetingsHeld) ? result.growerChangeMeetingsHeld : Math.floor(result.growerChangeMeetingsHeld);
|
|
1251
|
+
}());
|
|
1252
|
+
}
|
|
1253
|
+
else
|
|
1254
|
+
{
|
|
1255
|
+
resultObject.growerChangeMeetingsHeld = 0;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
if(typeof result === 'object' && 'growerChangeMeetingsExpected' in result)
|
|
1259
|
+
{
|
|
1260
|
+
resultObject.growerChangeMeetingsExpected = (function(){
|
|
1261
|
+
if(result.growerChangeMeetingsExpected === null)
|
|
1262
|
+
{
|
|
1263
|
+
return null;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
if(typeof result.growerChangeMeetingsExpected !== 'number')
|
|
1267
|
+
{
|
|
1268
|
+
return Number.isInteger(Number(result.growerChangeMeetingsExpected)) ? Number(result.growerChangeMeetingsExpected) : Math.floor(Number(result.growerChangeMeetingsExpected));
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
return Number.isInteger(result.growerChangeMeetingsExpected) ? result.growerChangeMeetingsExpected : Math.floor(result.growerChangeMeetingsExpected);
|
|
1272
|
+
}());
|
|
1273
|
+
}
|
|
1274
|
+
else
|
|
1275
|
+
{
|
|
1276
|
+
resultObject.growerChangeMeetingsExpected = null;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
if(typeof result === 'object' && 'growerChangeMeetingsScore' in result)
|
|
1280
|
+
{
|
|
1281
|
+
resultObject.growerChangeMeetingsScore = (function(){
|
|
1282
|
+
if(result.growerChangeMeetingsScore === null)
|
|
1283
|
+
{
|
|
1284
|
+
return null;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
if(typeof result.growerChangeMeetingsScore !== 'number')
|
|
1288
|
+
{
|
|
1289
|
+
return Number(result.growerChangeMeetingsScore);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
return result.growerChangeMeetingsScore;
|
|
1293
|
+
}());
|
|
1294
|
+
}
|
|
1295
|
+
else
|
|
1296
|
+
{
|
|
1297
|
+
resultObject.growerChangeMeetingsScore = null;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
if(typeof result === 'object' && 'associatedPackruns' in result)
|
|
1301
|
+
{
|
|
1302
|
+
resultObject.associatedPackruns = (function(){
|
|
1303
|
+
if(Array.isArray(result.associatedPackruns) !== true)
|
|
1304
|
+
{
|
|
1305
|
+
return [];
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
return result.associatedPackruns.map((associatedPackrunsItem) => {
|
|
1309
|
+
return (function(){
|
|
1310
|
+
return PackrunModel.fromJSON(associatedPackrunsItem, siteId);
|
|
1311
|
+
}());
|
|
1312
|
+
});
|
|
1313
|
+
}());
|
|
1314
|
+
}
|
|
1315
|
+
else
|
|
1316
|
+
{
|
|
1317
|
+
resultObject.associatedPackruns = [];
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
if(typeof result === 'object' && 'associatedVarietyIds' in result)
|
|
1321
|
+
{
|
|
1322
|
+
resultObject.associatedVarietyIds = (function(){
|
|
1323
|
+
if(Array.isArray(result.associatedVarietyIds) !== true)
|
|
1324
|
+
{
|
|
1325
|
+
return [];
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
return result.associatedVarietyIds.map((associatedVarietyIdsItem) => {
|
|
1329
|
+
return (function(){
|
|
1330
|
+
if(typeof associatedVarietyIdsItem !== 'string')
|
|
1331
|
+
{
|
|
1332
|
+
return String(associatedVarietyIdsItem);
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
return associatedVarietyIdsItem;
|
|
1336
|
+
}());
|
|
1337
|
+
});
|
|
1338
|
+
}());
|
|
1339
|
+
}
|
|
1340
|
+
else
|
|
1341
|
+
{
|
|
1342
|
+
resultObject.associatedVarietyIds = [];
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
if(typeof result === 'object' && 'associatedVarietyCodes' in result)
|
|
1346
|
+
{
|
|
1347
|
+
resultObject.associatedVarietyCodes = (function(){
|
|
1348
|
+
if(Array.isArray(result.associatedVarietyCodes) !== true)
|
|
1349
|
+
{
|
|
1350
|
+
return [];
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
return result.associatedVarietyCodes.map((associatedVarietyCodesItem) => {
|
|
1354
|
+
return (function(){
|
|
1355
|
+
if(typeof associatedVarietyCodesItem !== 'string')
|
|
1356
|
+
{
|
|
1357
|
+
return String(associatedVarietyCodesItem);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
return associatedVarietyCodesItem;
|
|
1361
|
+
}());
|
|
1362
|
+
});
|
|
1363
|
+
}());
|
|
1364
|
+
}
|
|
1365
|
+
else
|
|
1366
|
+
{
|
|
1367
|
+
resultObject.associatedVarietyCodes = [];
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
if(typeof result === 'object' && 'associatedGrowingMethodIds' in result)
|
|
1371
|
+
{
|
|
1372
|
+
resultObject.associatedGrowingMethodIds = (function(){
|
|
1373
|
+
if(Array.isArray(result.associatedGrowingMethodIds) !== true)
|
|
1374
|
+
{
|
|
1375
|
+
return [];
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
return result.associatedGrowingMethodIds.map((associatedGrowingMethodIdsItem) => {
|
|
1379
|
+
return (function(){
|
|
1380
|
+
if(typeof associatedGrowingMethodIdsItem !== 'string')
|
|
1381
|
+
{
|
|
1382
|
+
return String(associatedGrowingMethodIdsItem);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
return associatedGrowingMethodIdsItem;
|
|
1386
|
+
}());
|
|
1387
|
+
});
|
|
1388
|
+
}());
|
|
1389
|
+
}
|
|
1390
|
+
else
|
|
1391
|
+
{
|
|
1392
|
+
resultObject.associatedGrowingMethodIds = [];
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
if(typeof result === 'object' && 'associatedGrowingMethodCodes' in result)
|
|
1396
|
+
{
|
|
1397
|
+
resultObject.associatedGrowingMethodCodes = (function(){
|
|
1398
|
+
if(Array.isArray(result.associatedGrowingMethodCodes) !== true)
|
|
1399
|
+
{
|
|
1400
|
+
return [];
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
return result.associatedGrowingMethodCodes.map((associatedGrowingMethodCodesItem) => {
|
|
1404
|
+
return (function(){
|
|
1405
|
+
if(typeof associatedGrowingMethodCodesItem !== 'string')
|
|
1406
|
+
{
|
|
1407
|
+
return String(associatedGrowingMethodCodesItem);
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
return associatedGrowingMethodCodesItem;
|
|
1411
|
+
}());
|
|
1412
|
+
});
|
|
1413
|
+
}());
|
|
1414
|
+
}
|
|
1415
|
+
else
|
|
1416
|
+
{
|
|
1417
|
+
resultObject.associatedGrowingMethodCodes = [];
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
if(typeof result === 'object' && 'qualitySummary' in result)
|
|
1421
|
+
{
|
|
1422
|
+
resultObject.qualitySummary = (function(){
|
|
1423
|
+
if(result.qualitySummary === null)
|
|
1424
|
+
{
|
|
1425
|
+
return null;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
return ShiftQualitySummaryModel.fromJSON(result.qualitySummary, siteId);
|
|
1429
|
+
}());
|
|
1430
|
+
}
|
|
1431
|
+
else
|
|
1432
|
+
{
|
|
1433
|
+
resultObject.qualitySummary = null;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
if(typeof result === 'object' && 'binsTippedTarget' in result)
|
|
1437
|
+
{
|
|
1438
|
+
resultObject.binsTippedTarget = (function(){
|
|
1439
|
+
if(typeof result.binsTippedTarget !== 'number')
|
|
1440
|
+
{
|
|
1441
|
+
return Number.isInteger(Number(result.binsTippedTarget)) ? Number(result.binsTippedTarget) : Math.floor(Number(result.binsTippedTarget));
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
return Number.isInteger(result.binsTippedTarget) ? result.binsTippedTarget : Math.floor(result.binsTippedTarget);
|
|
1445
|
+
}());
|
|
1446
|
+
}
|
|
1447
|
+
else
|
|
1448
|
+
{
|
|
1449
|
+
resultObject.binsTippedTarget = 0;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
if(typeof result === 'object' && 'totalBinsTipped' in result)
|
|
1453
|
+
{
|
|
1454
|
+
resultObject.totalBinsTipped = (function(){
|
|
1455
|
+
if(typeof result.totalBinsTipped !== 'number')
|
|
1456
|
+
{
|
|
1457
|
+
return Number.isInteger(Number(result.totalBinsTipped)) ? Number(result.totalBinsTipped) : Math.floor(Number(result.totalBinsTipped));
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
return Number.isInteger(result.totalBinsTipped) ? result.totalBinsTipped : Math.floor(result.totalBinsTipped);
|
|
1461
|
+
}());
|
|
1462
|
+
}
|
|
1463
|
+
else
|
|
1464
|
+
{
|
|
1465
|
+
resultObject.totalBinsTipped = 0;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
if(typeof result === 'object' && 'binsTippedPerHour' in result)
|
|
1469
|
+
{
|
|
1470
|
+
resultObject.binsTippedPerHour = (function(){
|
|
1471
|
+
if(typeof result.binsTippedPerHour !== 'number')
|
|
1472
|
+
{
|
|
1473
|
+
return Number.isInteger(Number(result.binsTippedPerHour)) ? Number(result.binsTippedPerHour) : Math.floor(Number(result.binsTippedPerHour));
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
return Number.isInteger(result.binsTippedPerHour) ? result.binsTippedPerHour : Math.floor(result.binsTippedPerHour);
|
|
1477
|
+
}());
|
|
1478
|
+
}
|
|
1479
|
+
else
|
|
1480
|
+
{
|
|
1481
|
+
resultObject.binsTippedPerHour = 0;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
if(typeof result === 'object' && 'binsTippedPerHourExcludingDowntime' in result)
|
|
1485
|
+
{
|
|
1486
|
+
resultObject.binsTippedPerHourExcludingDowntime = (function(){
|
|
1487
|
+
if(typeof result.binsTippedPerHourExcludingDowntime !== 'number')
|
|
1488
|
+
{
|
|
1489
|
+
return Number.isInteger(Number(result.binsTippedPerHourExcludingDowntime)) ? Number(result.binsTippedPerHourExcludingDowntime) : Math.floor(Number(result.binsTippedPerHourExcludingDowntime));
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
return Number.isInteger(result.binsTippedPerHourExcludingDowntime) ? result.binsTippedPerHourExcludingDowntime : Math.floor(result.binsTippedPerHourExcludingDowntime);
|
|
1493
|
+
}());
|
|
1494
|
+
}
|
|
1495
|
+
else
|
|
1496
|
+
{
|
|
1497
|
+
resultObject.binsTippedPerHourExcludingDowntime = 0;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
if(typeof result === 'object' && 'totalProductionTime' in result)
|
|
1501
|
+
{
|
|
1502
|
+
resultObject.totalProductionTime = (function(){
|
|
1503
|
+
if(typeof result.totalProductionTime !== 'number')
|
|
1504
|
+
{
|
|
1505
|
+
return Number.isInteger(Number(result.totalProductionTime)) ? Number(result.totalProductionTime) : Math.floor(Number(result.totalProductionTime));
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
return Number.isInteger(result.totalProductionTime) ? result.totalProductionTime : Math.floor(result.totalProductionTime);
|
|
1509
|
+
}());
|
|
1510
|
+
}
|
|
1511
|
+
else
|
|
1512
|
+
{
|
|
1513
|
+
resultObject.totalProductionTime = 0;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
if(typeof result === 'object' && 'totalScheduledBreakTime' in result)
|
|
1517
|
+
{
|
|
1518
|
+
resultObject.totalScheduledBreakTime = (function(){
|
|
1519
|
+
if(typeof result.totalScheduledBreakTime !== 'number')
|
|
1520
|
+
{
|
|
1521
|
+
return Number.isInteger(Number(result.totalScheduledBreakTime)) ? Number(result.totalScheduledBreakTime) : Math.floor(Number(result.totalScheduledBreakTime));
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
return Number.isInteger(result.totalScheduledBreakTime) ? result.totalScheduledBreakTime : Math.floor(result.totalScheduledBreakTime);
|
|
1525
|
+
}());
|
|
1526
|
+
}
|
|
1527
|
+
else
|
|
1528
|
+
{
|
|
1529
|
+
resultObject.totalScheduledBreakTime = 0;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
if(typeof result === 'object' && 'totalDowntime' in result)
|
|
1533
|
+
{
|
|
1534
|
+
resultObject.totalDowntime = (function(){
|
|
1535
|
+
if(typeof result.totalDowntime !== 'number')
|
|
1536
|
+
{
|
|
1537
|
+
return Number.isInteger(Number(result.totalDowntime)) ? Number(result.totalDowntime) : Math.floor(Number(result.totalDowntime));
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
return Number.isInteger(result.totalDowntime) ? result.totalDowntime : Math.floor(result.totalDowntime);
|
|
1541
|
+
}());
|
|
1542
|
+
}
|
|
1543
|
+
else
|
|
1544
|
+
{
|
|
1545
|
+
resultObject.totalDowntime = 0;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
if(typeof result === 'object' && 'totalDowntimePercentage' in result)
|
|
1549
|
+
{
|
|
1550
|
+
resultObject.totalDowntimePercentage = (function(){
|
|
1551
|
+
if(typeof result.totalDowntimePercentage !== 'number')
|
|
1552
|
+
{
|
|
1553
|
+
return Number(result.totalDowntimePercentage);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
return result.totalDowntimePercentage;
|
|
1557
|
+
}());
|
|
1558
|
+
}
|
|
1559
|
+
else
|
|
1560
|
+
{
|
|
1561
|
+
resultObject.totalDowntimePercentage = 0;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
if(typeof result === 'object' && 'downtimeEventsCount' in result)
|
|
1565
|
+
{
|
|
1566
|
+
resultObject.downtimeEventsCount = (function(){
|
|
1567
|
+
if(typeof result.downtimeEventsCount !== 'number')
|
|
1568
|
+
{
|
|
1569
|
+
return Number.isInteger(Number(result.downtimeEventsCount)) ? Number(result.downtimeEventsCount) : Math.floor(Number(result.downtimeEventsCount));
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
return Number.isInteger(result.downtimeEventsCount) ? result.downtimeEventsCount : Math.floor(result.downtimeEventsCount);
|
|
1573
|
+
}());
|
|
1574
|
+
}
|
|
1575
|
+
else
|
|
1576
|
+
{
|
|
1577
|
+
resultObject.downtimeEventsCount = 0;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
if(typeof result === 'object' && 'downtimeEventsAverageDuration' in result)
|
|
1581
|
+
{
|
|
1582
|
+
resultObject.downtimeEventsAverageDuration = (function(){
|
|
1583
|
+
if(result.downtimeEventsAverageDuration === null)
|
|
1584
|
+
{
|
|
1585
|
+
return null;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
if(typeof result.downtimeEventsAverageDuration !== 'number')
|
|
1589
|
+
{
|
|
1590
|
+
return Number.isInteger(Number(result.downtimeEventsAverageDuration)) ? Number(result.downtimeEventsAverageDuration) : Math.floor(Number(result.downtimeEventsAverageDuration));
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
return Number.isInteger(result.downtimeEventsAverageDuration) ? result.downtimeEventsAverageDuration : Math.floor(result.downtimeEventsAverageDuration);
|
|
1594
|
+
}());
|
|
1595
|
+
}
|
|
1596
|
+
else
|
|
1597
|
+
{
|
|
1598
|
+
resultObject.downtimeEventsAverageDuration = null;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
if(typeof result === 'object' && 'class1ManningTarget' in result)
|
|
1602
|
+
{
|
|
1603
|
+
resultObject.class1ManningTarget = (function(){
|
|
1604
|
+
if(result.class1ManningTarget === null)
|
|
1605
|
+
{
|
|
1606
|
+
return null;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
if(typeof result.class1ManningTarget !== 'number')
|
|
1610
|
+
{
|
|
1611
|
+
return Number.isInteger(Number(result.class1ManningTarget)) ? Number(result.class1ManningTarget) : Math.floor(Number(result.class1ManningTarget));
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
return Number.isInteger(result.class1ManningTarget) ? result.class1ManningTarget : Math.floor(result.class1ManningTarget);
|
|
1615
|
+
}());
|
|
1616
|
+
}
|
|
1617
|
+
else
|
|
1618
|
+
{
|
|
1619
|
+
resultObject.class1ManningTarget = null;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
if(typeof result === 'object' && 'averageClass1Manning' in result)
|
|
1623
|
+
{
|
|
1624
|
+
resultObject.averageClass1Manning = (function(){
|
|
1625
|
+
if(result.averageClass1Manning === null)
|
|
1626
|
+
{
|
|
1627
|
+
return null;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
if(typeof result.averageClass1Manning !== 'number')
|
|
1631
|
+
{
|
|
1632
|
+
return Number.isInteger(Number(result.averageClass1Manning)) ? Number(result.averageClass1Manning) : Math.floor(Number(result.averageClass1Manning));
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
return Number.isInteger(result.averageClass1Manning) ? result.averageClass1Manning : Math.floor(result.averageClass1Manning);
|
|
1636
|
+
}());
|
|
1637
|
+
}
|
|
1638
|
+
else
|
|
1639
|
+
{
|
|
1640
|
+
resultObject.averageClass1Manning = null;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
if(typeof result === 'object' && 'class1ManningPercentage' in result)
|
|
1644
|
+
{
|
|
1645
|
+
resultObject.class1ManningPercentage = (function(){
|
|
1646
|
+
if(result.class1ManningPercentage === null)
|
|
1647
|
+
{
|
|
1648
|
+
return null;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
if(typeof result.class1ManningPercentage !== 'number')
|
|
1652
|
+
{
|
|
1653
|
+
return Number(result.class1ManningPercentage);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
return result.class1ManningPercentage;
|
|
1657
|
+
}());
|
|
1658
|
+
}
|
|
1659
|
+
else
|
|
1660
|
+
{
|
|
1661
|
+
resultObject.class1ManningPercentage = null;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
if(typeof result === 'object' && 'class2ManningTarget' in result)
|
|
1665
|
+
{
|
|
1666
|
+
resultObject.class2ManningTarget = (function(){
|
|
1667
|
+
if(result.class2ManningTarget === null)
|
|
1668
|
+
{
|
|
1669
|
+
return null;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
if(typeof result.class2ManningTarget !== 'number')
|
|
1673
|
+
{
|
|
1674
|
+
return Number.isInteger(Number(result.class2ManningTarget)) ? Number(result.class2ManningTarget) : Math.floor(Number(result.class2ManningTarget));
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
return Number.isInteger(result.class2ManningTarget) ? result.class2ManningTarget : Math.floor(result.class2ManningTarget);
|
|
1678
|
+
}());
|
|
1679
|
+
}
|
|
1680
|
+
else
|
|
1681
|
+
{
|
|
1682
|
+
resultObject.class2ManningTarget = null;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
if(typeof result === 'object' && 'averageClass2Manning' in result)
|
|
1686
|
+
{
|
|
1687
|
+
resultObject.averageClass2Manning = (function(){
|
|
1688
|
+
if(result.averageClass2Manning === null)
|
|
1689
|
+
{
|
|
1690
|
+
return null;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
if(typeof result.averageClass2Manning !== 'number')
|
|
1694
|
+
{
|
|
1695
|
+
return Number.isInteger(Number(result.averageClass2Manning)) ? Number(result.averageClass2Manning) : Math.floor(Number(result.averageClass2Manning));
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
return Number.isInteger(result.averageClass2Manning) ? result.averageClass2Manning : Math.floor(result.averageClass2Manning);
|
|
1699
|
+
}());
|
|
1700
|
+
}
|
|
1701
|
+
else
|
|
1702
|
+
{
|
|
1703
|
+
resultObject.averageClass2Manning = null;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
if(typeof result === 'object' && 'class2ManningPercentage' in result)
|
|
1707
|
+
{
|
|
1708
|
+
resultObject.class2ManningPercentage = (function(){
|
|
1709
|
+
if(result.class2ManningPercentage === null)
|
|
1710
|
+
{
|
|
1711
|
+
return null;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
if(typeof result.class2ManningPercentage !== 'number')
|
|
1715
|
+
{
|
|
1716
|
+
return Number(result.class2ManningPercentage);
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
return result.class2ManningPercentage;
|
|
1720
|
+
}());
|
|
1721
|
+
}
|
|
1722
|
+
else
|
|
1723
|
+
{
|
|
1724
|
+
resultObject.class2ManningPercentage = null;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
if(typeof result === 'object' && 'totalManningTarget' in result)
|
|
1728
|
+
{
|
|
1729
|
+
resultObject.totalManningTarget = (function(){
|
|
1730
|
+
if(result.totalManningTarget === null)
|
|
1731
|
+
{
|
|
1732
|
+
return null;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
if(typeof result.totalManningTarget !== 'number')
|
|
1736
|
+
{
|
|
1737
|
+
return Number.isInteger(Number(result.totalManningTarget)) ? Number(result.totalManningTarget) : Math.floor(Number(result.totalManningTarget));
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
return Number.isInteger(result.totalManningTarget) ? result.totalManningTarget : Math.floor(result.totalManningTarget);
|
|
1741
|
+
}());
|
|
1742
|
+
}
|
|
1743
|
+
else
|
|
1744
|
+
{
|
|
1745
|
+
resultObject.totalManningTarget = null;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
if(typeof result === 'object' && 'averageTotalManning' in result)
|
|
1749
|
+
{
|
|
1750
|
+
resultObject.averageTotalManning = (function(){
|
|
1751
|
+
if(result.averageTotalManning === null)
|
|
1752
|
+
{
|
|
1753
|
+
return null;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
if(typeof result.averageTotalManning !== 'number')
|
|
1757
|
+
{
|
|
1758
|
+
return Number.isInteger(Number(result.averageTotalManning)) ? Number(result.averageTotalManning) : Math.floor(Number(result.averageTotalManning));
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
return Number.isInteger(result.averageTotalManning) ? result.averageTotalManning : Math.floor(result.averageTotalManning);
|
|
1762
|
+
}());
|
|
1763
|
+
}
|
|
1764
|
+
else
|
|
1765
|
+
{
|
|
1766
|
+
resultObject.averageTotalManning = null;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
if(typeof result === 'object' && 'totalManningPercentage' in result)
|
|
1770
|
+
{
|
|
1771
|
+
resultObject.totalManningPercentage = (function(){
|
|
1772
|
+
if(result.totalManningPercentage === null)
|
|
1773
|
+
{
|
|
1774
|
+
return null;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
if(typeof result.totalManningPercentage !== 'number')
|
|
1778
|
+
{
|
|
1779
|
+
return Number(result.totalManningPercentage);
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
return result.totalManningPercentage;
|
|
1783
|
+
}());
|
|
1784
|
+
}
|
|
1785
|
+
else
|
|
1786
|
+
{
|
|
1787
|
+
resultObject.totalManningPercentage = null;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
if(typeof result === 'object' && 'costPerManningUnitHour' in result)
|
|
1791
|
+
{
|
|
1792
|
+
resultObject.costPerManningUnitHour = (function(){
|
|
1793
|
+
if(result.costPerManningUnitHour === null)
|
|
1794
|
+
{
|
|
1795
|
+
return null;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
if(typeof result.costPerManningUnitHour !== 'number')
|
|
1799
|
+
{
|
|
1800
|
+
return Number(result.costPerManningUnitHour);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
return result.costPerManningUnitHour;
|
|
1804
|
+
}());
|
|
1805
|
+
}
|
|
1806
|
+
else
|
|
1807
|
+
{
|
|
1808
|
+
resultObject.costPerManningUnitHour = null;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
if(typeof result === 'object' && 'totalHoursWorked' in result)
|
|
1812
|
+
{
|
|
1813
|
+
resultObject.totalHoursWorked = (function(){
|
|
1814
|
+
if(typeof result.totalHoursWorked !== 'number')
|
|
1815
|
+
{
|
|
1816
|
+
return Number(result.totalHoursWorked);
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
return result.totalHoursWorked;
|
|
1820
|
+
}());
|
|
1821
|
+
}
|
|
1822
|
+
else
|
|
1823
|
+
{
|
|
1824
|
+
resultObject.totalHoursWorked = 0;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
if(typeof result === 'object' && 'totalHoursWorkedExcludingDowntime' in result)
|
|
1828
|
+
{
|
|
1829
|
+
resultObject.totalHoursWorkedExcludingDowntime = (function(){
|
|
1830
|
+
if(typeof result.totalHoursWorkedExcludingDowntime !== 'number')
|
|
1831
|
+
{
|
|
1832
|
+
return Number(result.totalHoursWorkedExcludingDowntime);
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
return result.totalHoursWorkedExcludingDowntime;
|
|
1836
|
+
}());
|
|
1837
|
+
}
|
|
1838
|
+
else
|
|
1839
|
+
{
|
|
1840
|
+
resultObject.totalHoursWorkedExcludingDowntime = 0;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
if(typeof result === 'object' && 'totalHoursPaid' in result)
|
|
1844
|
+
{
|
|
1845
|
+
resultObject.totalHoursPaid = (function(){
|
|
1846
|
+
if(typeof result.totalHoursPaid !== 'number')
|
|
1847
|
+
{
|
|
1848
|
+
return Number(result.totalHoursPaid);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
return result.totalHoursPaid;
|
|
1852
|
+
}());
|
|
1853
|
+
}
|
|
1854
|
+
else
|
|
1855
|
+
{
|
|
1856
|
+
resultObject.totalHoursPaid = 0;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
if(typeof result === 'object' && 'class1TotalManningCost' in result)
|
|
1860
|
+
{
|
|
1861
|
+
resultObject.class1TotalManningCost = (function(){
|
|
1862
|
+
if(result.class1TotalManningCost === null)
|
|
1863
|
+
{
|
|
1864
|
+
return null;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
if(typeof result.class1TotalManningCost !== 'number')
|
|
1868
|
+
{
|
|
1869
|
+
return Number(result.class1TotalManningCost);
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
return result.class1TotalManningCost;
|
|
1873
|
+
}());
|
|
1874
|
+
}
|
|
1875
|
+
else
|
|
1876
|
+
{
|
|
1877
|
+
resultObject.class1TotalManningCost = null;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
if(typeof result === 'object' && 'class2TotalManningCost' in result)
|
|
1881
|
+
{
|
|
1882
|
+
resultObject.class2TotalManningCost = (function(){
|
|
1883
|
+
if(result.class2TotalManningCost === null)
|
|
1884
|
+
{
|
|
1885
|
+
return null;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
if(typeof result.class2TotalManningCost !== 'number')
|
|
1889
|
+
{
|
|
1890
|
+
return Number(result.class2TotalManningCost);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
return result.class2TotalManningCost;
|
|
1894
|
+
}());
|
|
1895
|
+
}
|
|
1896
|
+
else
|
|
1897
|
+
{
|
|
1898
|
+
resultObject.class2TotalManningCost = null;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
if(typeof result === 'object' && 'class1DowntimeManningCost' in result)
|
|
1902
|
+
{
|
|
1903
|
+
resultObject.class1DowntimeManningCost = (function(){
|
|
1904
|
+
if(result.class1DowntimeManningCost === null)
|
|
1905
|
+
{
|
|
1906
|
+
return null;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
if(typeof result.class1DowntimeManningCost !== 'number')
|
|
1910
|
+
{
|
|
1911
|
+
return Number(result.class1DowntimeManningCost);
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
return result.class1DowntimeManningCost;
|
|
1915
|
+
}());
|
|
1916
|
+
}
|
|
1917
|
+
else
|
|
1918
|
+
{
|
|
1919
|
+
resultObject.class1DowntimeManningCost = null;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
if(typeof result === 'object' && 'class2DowntimeManningCost' in result)
|
|
1923
|
+
{
|
|
1924
|
+
resultObject.class2DowntimeManningCost = (function(){
|
|
1925
|
+
if(result.class2DowntimeManningCost === null)
|
|
1926
|
+
{
|
|
1927
|
+
return null;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
if(typeof result.class2DowntimeManningCost !== 'number')
|
|
1931
|
+
{
|
|
1932
|
+
return Number(result.class2DowntimeManningCost);
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
return result.class2DowntimeManningCost;
|
|
1936
|
+
}());
|
|
1937
|
+
}
|
|
1938
|
+
else
|
|
1939
|
+
{
|
|
1940
|
+
resultObject.class2DowntimeManningCost = null;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
if(typeof result === 'object' && 'class1CostPerTrayTarget' in result)
|
|
1944
|
+
{
|
|
1945
|
+
resultObject.class1CostPerTrayTarget = (function(){
|
|
1946
|
+
if(result.class1CostPerTrayTarget === null)
|
|
1947
|
+
{
|
|
1948
|
+
return null;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
if(typeof result.class1CostPerTrayTarget !== 'number')
|
|
1952
|
+
{
|
|
1953
|
+
return Number(result.class1CostPerTrayTarget);
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
return result.class1CostPerTrayTarget;
|
|
1957
|
+
}());
|
|
1958
|
+
}
|
|
1959
|
+
else
|
|
1960
|
+
{
|
|
1961
|
+
resultObject.class1CostPerTrayTarget = null;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
if(typeof result === 'object' && 'class1CostPerTrayActual' in result)
|
|
1965
|
+
{
|
|
1966
|
+
resultObject.class1CostPerTrayActual = (function(){
|
|
1967
|
+
if(result.class1CostPerTrayActual === null)
|
|
1968
|
+
{
|
|
1969
|
+
return null;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
if(typeof result.class1CostPerTrayActual !== 'number')
|
|
1973
|
+
{
|
|
1974
|
+
return Number(result.class1CostPerTrayActual);
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
return result.class1CostPerTrayActual;
|
|
1978
|
+
}());
|
|
1979
|
+
}
|
|
1980
|
+
else
|
|
1981
|
+
{
|
|
1982
|
+
resultObject.class1CostPerTrayActual = null;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
if(typeof result === 'object' && 'class2CostPerTrayActual' in result)
|
|
1986
|
+
{
|
|
1987
|
+
resultObject.class2CostPerTrayActual = (function(){
|
|
1988
|
+
if(result.class2CostPerTrayActual === null)
|
|
1989
|
+
{
|
|
1990
|
+
return null;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
if(typeof result.class2CostPerTrayActual !== 'number')
|
|
1994
|
+
{
|
|
1995
|
+
return Number(result.class2CostPerTrayActual);
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
return result.class2CostPerTrayActual;
|
|
1999
|
+
}());
|
|
2000
|
+
}
|
|
2001
|
+
else
|
|
2002
|
+
{
|
|
2003
|
+
resultObject.class2CostPerTrayActual = null;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
if(typeof result === 'object' && 'totalClass1Trays' in result)
|
|
2007
|
+
{
|
|
2008
|
+
resultObject.totalClass1Trays = (function(){
|
|
2009
|
+
if(typeof result.totalClass1Trays !== 'number')
|
|
2010
|
+
{
|
|
2011
|
+
return Number.isInteger(Number(result.totalClass1Trays)) ? Number(result.totalClass1Trays) : Math.floor(Number(result.totalClass1Trays));
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
return Number.isInteger(result.totalClass1Trays) ? result.totalClass1Trays : Math.floor(result.totalClass1Trays);
|
|
2015
|
+
}());
|
|
2016
|
+
}
|
|
2017
|
+
else
|
|
2018
|
+
{
|
|
2019
|
+
resultObject.totalClass1Trays = 0;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
if(typeof result === 'object' && 'totalClass2Trays' in result)
|
|
2023
|
+
{
|
|
2024
|
+
resultObject.totalClass2Trays = (function(){
|
|
2025
|
+
if(typeof result.totalClass2Trays !== 'number')
|
|
2026
|
+
{
|
|
2027
|
+
return Number.isInteger(Number(result.totalClass2Trays)) ? Number(result.totalClass2Trays) : Math.floor(Number(result.totalClass2Trays));
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
return Number.isInteger(result.totalClass2Trays) ? result.totalClass2Trays : Math.floor(result.totalClass2Trays);
|
|
2031
|
+
}());
|
|
2032
|
+
}
|
|
2033
|
+
else
|
|
2034
|
+
{
|
|
2035
|
+
resultObject.totalClass2Trays = 0;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
if(typeof result === 'object' && 'class1TraysPerHour' in result)
|
|
2039
|
+
{
|
|
2040
|
+
resultObject.class1TraysPerHour = (function(){
|
|
2041
|
+
if(result.class1TraysPerHour === null)
|
|
2042
|
+
{
|
|
2043
|
+
return null;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
if(typeof result.class1TraysPerHour !== 'number')
|
|
2047
|
+
{
|
|
2048
|
+
return Number.isInteger(Number(result.class1TraysPerHour)) ? Number(result.class1TraysPerHour) : Math.floor(Number(result.class1TraysPerHour));
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
return Number.isInteger(result.class1TraysPerHour) ? result.class1TraysPerHour : Math.floor(result.class1TraysPerHour);
|
|
2052
|
+
}());
|
|
2053
|
+
}
|
|
2054
|
+
else
|
|
2055
|
+
{
|
|
2056
|
+
resultObject.class1TraysPerHour = null;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
if(typeof result === 'object' && 'class1TraysPerHourExcludingDowntime' in result)
|
|
2060
|
+
{
|
|
2061
|
+
resultObject.class1TraysPerHourExcludingDowntime = (function(){
|
|
2062
|
+
if(result.class1TraysPerHourExcludingDowntime === null)
|
|
2063
|
+
{
|
|
2064
|
+
return null;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
if(typeof result.class1TraysPerHourExcludingDowntime !== 'number')
|
|
2068
|
+
{
|
|
2069
|
+
return Number.isInteger(Number(result.class1TraysPerHourExcludingDowntime)) ? Number(result.class1TraysPerHourExcludingDowntime) : Math.floor(Number(result.class1TraysPerHourExcludingDowntime));
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
return Number.isInteger(result.class1TraysPerHourExcludingDowntime) ? result.class1TraysPerHourExcludingDowntime : Math.floor(result.class1TraysPerHourExcludingDowntime);
|
|
2073
|
+
}());
|
|
2074
|
+
}
|
|
2075
|
+
else
|
|
2076
|
+
{
|
|
2077
|
+
resultObject.class1TraysPerHourExcludingDowntime = null;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
if(typeof result === 'object' && 'class1TraysPerHourExcludingDowntimeTarget' in result)
|
|
2081
|
+
{
|
|
2082
|
+
resultObject.class1TraysPerHourExcludingDowntimeTarget = (function(){
|
|
2083
|
+
if(result.class1TraysPerHourExcludingDowntimeTarget === null)
|
|
2084
|
+
{
|
|
2085
|
+
return null;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
if(typeof result.class1TraysPerHourExcludingDowntimeTarget !== 'number')
|
|
2089
|
+
{
|
|
2090
|
+
return Number.isInteger(Number(result.class1TraysPerHourExcludingDowntimeTarget)) ? Number(result.class1TraysPerHourExcludingDowntimeTarget) : Math.floor(Number(result.class1TraysPerHourExcludingDowntimeTarget));
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
return Number.isInteger(result.class1TraysPerHourExcludingDowntimeTarget) ? result.class1TraysPerHourExcludingDowntimeTarget : Math.floor(result.class1TraysPerHourExcludingDowntimeTarget);
|
|
2094
|
+
}());
|
|
2095
|
+
}
|
|
2096
|
+
else
|
|
2097
|
+
{
|
|
2098
|
+
resultObject.class1TraysPerHourExcludingDowntimeTarget = null;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
if(typeof result === 'object' && 'class1TraysPerManHour' in result)
|
|
2102
|
+
{
|
|
2103
|
+
resultObject.class1TraysPerManHour = (function(){
|
|
2104
|
+
if(result.class1TraysPerManHour === null)
|
|
2105
|
+
{
|
|
2106
|
+
return null;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
if(typeof result.class1TraysPerManHour !== 'number')
|
|
2110
|
+
{
|
|
2111
|
+
return Number(result.class1TraysPerManHour);
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
return result.class1TraysPerManHour;
|
|
2115
|
+
}());
|
|
2116
|
+
}
|
|
2117
|
+
else
|
|
2118
|
+
{
|
|
2119
|
+
resultObject.class1TraysPerManHour = null;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
if(typeof result === 'object' && 'class1TraysPerManHourExcludingDowntime' in result)
|
|
2123
|
+
{
|
|
2124
|
+
resultObject.class1TraysPerManHourExcludingDowntime = (function(){
|
|
2125
|
+
if(result.class1TraysPerManHourExcludingDowntime === null)
|
|
2126
|
+
{
|
|
2127
|
+
return null;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
if(typeof result.class1TraysPerManHourExcludingDowntime !== 'number')
|
|
2131
|
+
{
|
|
2132
|
+
return Number(result.class1TraysPerManHourExcludingDowntime);
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
return result.class1TraysPerManHourExcludingDowntime;
|
|
2136
|
+
}());
|
|
2137
|
+
}
|
|
2138
|
+
else
|
|
2139
|
+
{
|
|
2140
|
+
resultObject.class1TraysPerManHourExcludingDowntime = null;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
if(typeof result === 'object' && 'class2TraysPerHour' in result)
|
|
2144
|
+
{
|
|
2145
|
+
resultObject.class2TraysPerHour = (function(){
|
|
2146
|
+
if(result.class2TraysPerHour === null)
|
|
2147
|
+
{
|
|
2148
|
+
return null;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
if(typeof result.class2TraysPerHour !== 'number')
|
|
2152
|
+
{
|
|
2153
|
+
return Number.isInteger(Number(result.class2TraysPerHour)) ? Number(result.class2TraysPerHour) : Math.floor(Number(result.class2TraysPerHour));
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
return Number.isInteger(result.class2TraysPerHour) ? result.class2TraysPerHour : Math.floor(result.class2TraysPerHour);
|
|
2157
|
+
}());
|
|
2158
|
+
}
|
|
2159
|
+
else
|
|
2160
|
+
{
|
|
2161
|
+
resultObject.class2TraysPerHour = null;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
if(typeof result === 'object' && 'class2TraysPerHourExcludingDowntime' in result)
|
|
2165
|
+
{
|
|
2166
|
+
resultObject.class2TraysPerHourExcludingDowntime = (function(){
|
|
2167
|
+
if(result.class2TraysPerHourExcludingDowntime === null)
|
|
2168
|
+
{
|
|
2169
|
+
return null;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
if(typeof result.class2TraysPerHourExcludingDowntime !== 'number')
|
|
2173
|
+
{
|
|
2174
|
+
return Number.isInteger(Number(result.class2TraysPerHourExcludingDowntime)) ? Number(result.class2TraysPerHourExcludingDowntime) : Math.floor(Number(result.class2TraysPerHourExcludingDowntime));
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
return Number.isInteger(result.class2TraysPerHourExcludingDowntime) ? result.class2TraysPerHourExcludingDowntime : Math.floor(result.class2TraysPerHourExcludingDowntime);
|
|
2178
|
+
}());
|
|
2179
|
+
}
|
|
2180
|
+
else
|
|
2181
|
+
{
|
|
2182
|
+
resultObject.class2TraysPerHourExcludingDowntime = null;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
if(typeof result === 'object' && 'class2TraysPerManHour' in result)
|
|
2186
|
+
{
|
|
2187
|
+
resultObject.class2TraysPerManHour = (function(){
|
|
2188
|
+
if(result.class2TraysPerManHour === null)
|
|
2189
|
+
{
|
|
2190
|
+
return null;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
if(typeof result.class2TraysPerManHour !== 'number')
|
|
2194
|
+
{
|
|
2195
|
+
return Number(result.class2TraysPerManHour);
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
return result.class2TraysPerManHour;
|
|
2199
|
+
}());
|
|
2200
|
+
}
|
|
2201
|
+
else
|
|
2202
|
+
{
|
|
2203
|
+
resultObject.class2TraysPerManHour = null;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
if(typeof result === 'object' && 'class2TraysPerManHourExcludingDowntime' in result)
|
|
2207
|
+
{
|
|
2208
|
+
resultObject.class2TraysPerManHourExcludingDowntime = (function(){
|
|
2209
|
+
if(result.class2TraysPerManHourExcludingDowntime === null)
|
|
2210
|
+
{
|
|
2211
|
+
return null;
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
if(typeof result.class2TraysPerManHourExcludingDowntime !== 'number')
|
|
2215
|
+
{
|
|
2216
|
+
return Number(result.class2TraysPerManHourExcludingDowntime);
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
return result.class2TraysPerManHourExcludingDowntime;
|
|
2220
|
+
}());
|
|
2221
|
+
}
|
|
2222
|
+
else
|
|
2223
|
+
{
|
|
2224
|
+
resultObject.class2TraysPerManHourExcludingDowntime = null;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
if(typeof result === 'object' && 'class1LayeredPercentageTarget' in result)
|
|
2228
|
+
{
|
|
2229
|
+
resultObject.class1LayeredPercentageTarget = (function(){
|
|
2230
|
+
if(result.class1LayeredPercentageTarget === null)
|
|
2231
|
+
{
|
|
2232
|
+
return null;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
if(typeof result.class1LayeredPercentageTarget !== 'number')
|
|
2236
|
+
{
|
|
2237
|
+
return Number(result.class1LayeredPercentageTarget);
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
return result.class1LayeredPercentageTarget;
|
|
2241
|
+
}());
|
|
2242
|
+
}
|
|
2243
|
+
else
|
|
2244
|
+
{
|
|
2245
|
+
resultObject.class1LayeredPercentageTarget = null;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
if(typeof result === 'object' && 'class1LayeredPercentage' in result)
|
|
2249
|
+
{
|
|
2250
|
+
resultObject.class1LayeredPercentage = (function(){
|
|
2251
|
+
if(result.class1LayeredPercentage === null)
|
|
2252
|
+
{
|
|
2253
|
+
return null;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
if(typeof result.class1LayeredPercentage !== 'number')
|
|
2257
|
+
{
|
|
2258
|
+
return Number(result.class1LayeredPercentage);
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
return result.class1LayeredPercentage;
|
|
2262
|
+
}());
|
|
2263
|
+
}
|
|
2264
|
+
else
|
|
2265
|
+
{
|
|
2266
|
+
resultObject.class1LayeredPercentage = null;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
if(typeof result === 'object' && 'class1BulkPercentage' in result)
|
|
2270
|
+
{
|
|
2271
|
+
resultObject.class1BulkPercentage = (function(){
|
|
2272
|
+
if(result.class1BulkPercentage === null)
|
|
2273
|
+
{
|
|
2274
|
+
return null;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
if(typeof result.class1BulkPercentage !== 'number')
|
|
2278
|
+
{
|
|
2279
|
+
return Number(result.class1BulkPercentage);
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
return result.class1BulkPercentage;
|
|
2283
|
+
}());
|
|
2284
|
+
}
|
|
2285
|
+
else
|
|
2286
|
+
{
|
|
2287
|
+
resultObject.class1BulkPercentage = null;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
if(typeof result === 'object' && 'averageClass1Percentage' in result)
|
|
2291
|
+
{
|
|
2292
|
+
resultObject.averageClass1Percentage = (function(){
|
|
2293
|
+
if(result.averageClass1Percentage === null)
|
|
2294
|
+
{
|
|
2295
|
+
return null;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
if(typeof result.averageClass1Percentage !== 'number')
|
|
2299
|
+
{
|
|
2300
|
+
return Number(result.averageClass1Percentage);
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
return result.averageClass1Percentage;
|
|
2304
|
+
}());
|
|
2305
|
+
}
|
|
2306
|
+
else
|
|
2307
|
+
{
|
|
2308
|
+
resultObject.averageClass1Percentage = null;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
if(typeof result === 'object' && 'qualityR600IdealSamplesTarget' in result)
|
|
2312
|
+
{
|
|
2313
|
+
resultObject.qualityR600IdealSamplesTarget = (function(){
|
|
2314
|
+
if(result.qualityR600IdealSamplesTarget === null)
|
|
2315
|
+
{
|
|
2316
|
+
return null;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
if(typeof result.qualityR600IdealSamplesTarget !== 'number')
|
|
2320
|
+
{
|
|
2321
|
+
return Number(result.qualityR600IdealSamplesTarget);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
return result.qualityR600IdealSamplesTarget;
|
|
2325
|
+
}());
|
|
2326
|
+
}
|
|
2327
|
+
else
|
|
2328
|
+
{
|
|
2329
|
+
resultObject.qualityR600IdealSamplesTarget = null;
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
if(typeof result === 'object' && 'qualityR600IdealSamplesActual' in result)
|
|
2333
|
+
{
|
|
2334
|
+
resultObject.qualityR600IdealSamplesActual = (function(){
|
|
2335
|
+
if(result.qualityR600IdealSamplesActual === null)
|
|
2336
|
+
{
|
|
2337
|
+
return null;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
if(typeof result.qualityR600IdealSamplesActual !== 'number')
|
|
2341
|
+
{
|
|
2342
|
+
return Number(result.qualityR600IdealSamplesActual);
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
return result.qualityR600IdealSamplesActual;
|
|
2346
|
+
}());
|
|
2347
|
+
}
|
|
2348
|
+
else
|
|
2349
|
+
{
|
|
2350
|
+
resultObject.qualityR600IdealSamplesActual = null;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
if(typeof result === 'object' && 'customQualityData' in result)
|
|
2354
|
+
{
|
|
2355
|
+
resultObject.customQualityData = (function(){
|
|
2356
|
+
if(Array.isArray(result.customQualityData) !== true)
|
|
2357
|
+
{
|
|
2358
|
+
return [];
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
return result.customQualityData.map((customQualityDataItem) => {
|
|
2362
|
+
return (function(){
|
|
2363
|
+
let customQualityDataItemObject = {};
|
|
2364
|
+
|
|
2365
|
+
if(typeof customQualityDataItem === 'object' && 'id' in customQualityDataItem)
|
|
2366
|
+
{
|
|
2367
|
+
customQualityDataItemObject.id = (function(){
|
|
2368
|
+
if(typeof customQualityDataItem.id !== 'string')
|
|
2369
|
+
{
|
|
2370
|
+
return String(customQualityDataItem.id);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
return customQualityDataItem.id;
|
|
2374
|
+
}());
|
|
2375
|
+
}
|
|
2376
|
+
else
|
|
2377
|
+
{
|
|
2378
|
+
customQualityDataItemObject.id = "";
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
if(typeof customQualityDataItem === 'object' && 'name' in customQualityDataItem)
|
|
2382
|
+
{
|
|
2383
|
+
customQualityDataItemObject.name = (function(){
|
|
2384
|
+
if(typeof customQualityDataItem.name !== 'string')
|
|
2385
|
+
{
|
|
2386
|
+
return String(customQualityDataItem.name);
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
return customQualityDataItem.name;
|
|
2390
|
+
}());
|
|
2391
|
+
}
|
|
2392
|
+
else
|
|
2393
|
+
{
|
|
2394
|
+
customQualityDataItemObject.name = "";
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
if(typeof customQualityDataItem === 'object' && 'type' in customQualityDataItem)
|
|
2398
|
+
{
|
|
2399
|
+
customQualityDataItemObject.type = (function(){
|
|
2400
|
+
if(typeof customQualityDataItem.type !== 'string')
|
|
2401
|
+
{
|
|
2402
|
+
return String(customQualityDataItem.type);
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
return customQualityDataItem.type;
|
|
2406
|
+
}());
|
|
2407
|
+
}
|
|
2408
|
+
else
|
|
2409
|
+
{
|
|
2410
|
+
customQualityDataItemObject.type = "";
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
if(typeof customQualityDataItem === 'object' && 'value' in customQualityDataItem)
|
|
2414
|
+
{
|
|
2415
|
+
customQualityDataItemObject.value = (function(){
|
|
2416
|
+
if(customQualityDataItem.value === null)
|
|
2417
|
+
{
|
|
2418
|
+
return null;
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
if(typeof customQualityDataItem.value !== 'number')
|
|
2422
|
+
{
|
|
2423
|
+
return Number(customQualityDataItem.value);
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
return customQualityDataItem.value;
|
|
2427
|
+
}());
|
|
2428
|
+
}
|
|
2429
|
+
else
|
|
2430
|
+
{
|
|
2431
|
+
customQualityDataItemObject.value = null;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
if(typeof customQualityDataItem === 'object' && 'target' in customQualityDataItem)
|
|
2435
|
+
{
|
|
2436
|
+
customQualityDataItemObject.target = (function(){
|
|
2437
|
+
if(customQualityDataItem.target === null)
|
|
2438
|
+
{
|
|
2439
|
+
return null;
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
if(typeof customQualityDataItem.target !== 'number')
|
|
2443
|
+
{
|
|
2444
|
+
return Number(customQualityDataItem.target);
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
return customQualityDataItem.target;
|
|
2448
|
+
}());
|
|
2449
|
+
}
|
|
2450
|
+
else
|
|
2451
|
+
{
|
|
2452
|
+
customQualityDataItemObject.target = null;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
if(typeof customQualityDataItem === 'object' && 'scorePercentage' in customQualityDataItem)
|
|
2456
|
+
{
|
|
2457
|
+
customQualityDataItemObject.scorePercentage = (function(){
|
|
2458
|
+
if(customQualityDataItem.scorePercentage === null)
|
|
2459
|
+
{
|
|
2460
|
+
return null;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
if(typeof customQualityDataItem.scorePercentage !== 'number')
|
|
2464
|
+
{
|
|
2465
|
+
return Number(customQualityDataItem.scorePercentage);
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
return customQualityDataItem.scorePercentage;
|
|
2469
|
+
}());
|
|
2470
|
+
}
|
|
2471
|
+
else
|
|
2472
|
+
{
|
|
2473
|
+
customQualityDataItemObject.scorePercentage = null;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
if(typeof customQualityDataItem === 'object' && 'scoreWeighting' in customQualityDataItem)
|
|
2477
|
+
{
|
|
2478
|
+
customQualityDataItemObject.scoreWeighting = (function(){
|
|
2479
|
+
if(customQualityDataItem.scoreWeighting === null)
|
|
2480
|
+
{
|
|
2481
|
+
return null;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
if(typeof customQualityDataItem.scoreWeighting !== 'number')
|
|
2485
|
+
{
|
|
2486
|
+
return Number(customQualityDataItem.scoreWeighting);
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
return customQualityDataItem.scoreWeighting;
|
|
2490
|
+
}());
|
|
2491
|
+
}
|
|
2492
|
+
else
|
|
2493
|
+
{
|
|
2494
|
+
customQualityDataItemObject.scoreWeighting = null;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
if(typeof customQualityDataItem === 'object' && 'targetMet' in customQualityDataItem)
|
|
2498
|
+
{
|
|
2499
|
+
customQualityDataItemObject.targetMet = (function(){
|
|
2500
|
+
if(typeof customQualityDataItem.targetMet !== 'boolean')
|
|
2501
|
+
{
|
|
2502
|
+
return Boolean(customQualityDataItem.targetMet);
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
return customQualityDataItem.targetMet;
|
|
2506
|
+
}());
|
|
2507
|
+
}
|
|
2508
|
+
else
|
|
2509
|
+
{
|
|
2510
|
+
customQualityDataItemObject.targetMet = false;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
return customQualityDataItemObject;
|
|
2514
|
+
}());
|
|
2515
|
+
});
|
|
2516
|
+
}());
|
|
2517
|
+
}
|
|
2518
|
+
else
|
|
2519
|
+
{
|
|
2520
|
+
resultObject.customQualityData = [];
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
if(typeof result === 'object' && 'satisfactionRating' in result)
|
|
2524
|
+
{
|
|
2525
|
+
resultObject.satisfactionRating = (function(){
|
|
2526
|
+
if(result.satisfactionRating === null)
|
|
2527
|
+
{
|
|
2528
|
+
return null;
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
if(typeof result.satisfactionRating !== 'number')
|
|
2532
|
+
{
|
|
2533
|
+
return Number.isInteger(Number(result.satisfactionRating)) ? Number(result.satisfactionRating) : Math.floor(Number(result.satisfactionRating));
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
return Number.isInteger(result.satisfactionRating) ? result.satisfactionRating : Math.floor(result.satisfactionRating);
|
|
2537
|
+
}());
|
|
2538
|
+
}
|
|
2539
|
+
else
|
|
2540
|
+
{
|
|
2541
|
+
resultObject.satisfactionRating = null;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
if(typeof result === 'object' && 'keyCelebration' in result)
|
|
2545
|
+
{
|
|
2546
|
+
resultObject.keyCelebration = (function(){
|
|
2547
|
+
if(result.keyCelebration === null)
|
|
2548
|
+
{
|
|
2549
|
+
return null;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
if(typeof result.keyCelebration !== 'string')
|
|
2553
|
+
{
|
|
2554
|
+
return String(result.keyCelebration);
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
return result.keyCelebration;
|
|
2558
|
+
}());
|
|
2559
|
+
}
|
|
2560
|
+
else
|
|
2561
|
+
{
|
|
2562
|
+
resultObject.keyCelebration = null;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
if(typeof result === 'object' && 'keyChallenge' in result)
|
|
2566
|
+
{
|
|
2567
|
+
resultObject.keyChallenge = (function(){
|
|
2568
|
+
if(result.keyChallenge === null)
|
|
2569
|
+
{
|
|
2570
|
+
return null;
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
if(typeof result.keyChallenge !== 'string')
|
|
2574
|
+
{
|
|
2575
|
+
return String(result.keyChallenge);
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
return result.keyChallenge;
|
|
2579
|
+
}());
|
|
2580
|
+
}
|
|
2581
|
+
else
|
|
2582
|
+
{
|
|
2583
|
+
resultObject.keyChallenge = null;
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2586
|
+
if(typeof result === 'object' && 'class1TraysPerHourScorePercentage' in result)
|
|
2587
|
+
{
|
|
2588
|
+
resultObject.class1TraysPerHourScorePercentage = (function(){
|
|
2589
|
+
if(result.class1TraysPerHourScorePercentage === null)
|
|
2590
|
+
{
|
|
2591
|
+
return null;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
if(typeof result.class1TraysPerHourScorePercentage !== 'number')
|
|
2595
|
+
{
|
|
2596
|
+
return Number(result.class1TraysPerHourScorePercentage);
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
return result.class1TraysPerHourScorePercentage;
|
|
2600
|
+
}());
|
|
2601
|
+
}
|
|
2602
|
+
else
|
|
2603
|
+
{
|
|
2604
|
+
resultObject.class1TraysPerHourScorePercentage = null;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
if(typeof result === 'object' && 'class1TraysPerHourScoreWeighting' in result)
|
|
2608
|
+
{
|
|
2609
|
+
resultObject.class1TraysPerHourScoreWeighting = (function(){
|
|
2610
|
+
if(result.class1TraysPerHourScoreWeighting === null)
|
|
2611
|
+
{
|
|
2612
|
+
return null;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
if(typeof result.class1TraysPerHourScoreWeighting !== 'number')
|
|
2616
|
+
{
|
|
2617
|
+
return Number(result.class1TraysPerHourScoreWeighting);
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
return result.class1TraysPerHourScoreWeighting;
|
|
2621
|
+
}());
|
|
2622
|
+
}
|
|
2623
|
+
else
|
|
2624
|
+
{
|
|
2625
|
+
resultObject.class1TraysPerHourScoreWeighting = null;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
if(typeof result === 'object' && 'class1TraysPerHourTargetMet' in result)
|
|
2629
|
+
{
|
|
2630
|
+
resultObject.class1TraysPerHourTargetMet = (function(){
|
|
2631
|
+
if(typeof result.class1TraysPerHourTargetMet !== 'boolean')
|
|
2632
|
+
{
|
|
2633
|
+
return Boolean(result.class1TraysPerHourTargetMet);
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
return result.class1TraysPerHourTargetMet;
|
|
2637
|
+
}());
|
|
2638
|
+
}
|
|
2639
|
+
else
|
|
2640
|
+
{
|
|
2641
|
+
resultObject.class1TraysPerHourTargetMet = false;
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
if(typeof result === 'object' && 'class1CostPerTrayScorePercentage' in result)
|
|
2645
|
+
{
|
|
2646
|
+
resultObject.class1CostPerTrayScorePercentage = (function(){
|
|
2647
|
+
if(result.class1CostPerTrayScorePercentage === null)
|
|
2648
|
+
{
|
|
2649
|
+
return null;
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
if(typeof result.class1CostPerTrayScorePercentage !== 'number')
|
|
2653
|
+
{
|
|
2654
|
+
return Number(result.class1CostPerTrayScorePercentage);
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2657
|
+
return result.class1CostPerTrayScorePercentage;
|
|
2658
|
+
}());
|
|
2659
|
+
}
|
|
2660
|
+
else
|
|
2661
|
+
{
|
|
2662
|
+
resultObject.class1CostPerTrayScorePercentage = null;
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
if(typeof result === 'object' && 'class1CostPerTrayScoreWeighting' in result)
|
|
2666
|
+
{
|
|
2667
|
+
resultObject.class1CostPerTrayScoreWeighting = (function(){
|
|
2668
|
+
if(result.class1CostPerTrayScoreWeighting === null)
|
|
2669
|
+
{
|
|
2670
|
+
return null;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
if(typeof result.class1CostPerTrayScoreWeighting !== 'number')
|
|
2674
|
+
{
|
|
2675
|
+
return Number(result.class1CostPerTrayScoreWeighting);
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
return result.class1CostPerTrayScoreWeighting;
|
|
2679
|
+
}());
|
|
2680
|
+
}
|
|
2681
|
+
else
|
|
2682
|
+
{
|
|
2683
|
+
resultObject.class1CostPerTrayScoreWeighting = null;
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
if(typeof result === 'object' && 'class1CostPerTrayTargetMet' in result)
|
|
2687
|
+
{
|
|
2688
|
+
resultObject.class1CostPerTrayTargetMet = (function(){
|
|
2689
|
+
if(typeof result.class1CostPerTrayTargetMet !== 'boolean')
|
|
2690
|
+
{
|
|
2691
|
+
return Boolean(result.class1CostPerTrayTargetMet);
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
return result.class1CostPerTrayTargetMet;
|
|
2695
|
+
}());
|
|
2696
|
+
}
|
|
2697
|
+
else
|
|
2698
|
+
{
|
|
2699
|
+
resultObject.class1CostPerTrayTargetMet = false;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
if(typeof result === 'object' && 'qualityR600IdealSamplesScorePercentage' in result)
|
|
2703
|
+
{
|
|
2704
|
+
resultObject.qualityR600IdealSamplesScorePercentage = (function(){
|
|
2705
|
+
if(result.qualityR600IdealSamplesScorePercentage === null)
|
|
2706
|
+
{
|
|
2707
|
+
return null;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
if(typeof result.qualityR600IdealSamplesScorePercentage !== 'number')
|
|
2711
|
+
{
|
|
2712
|
+
return Number(result.qualityR600IdealSamplesScorePercentage);
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
return result.qualityR600IdealSamplesScorePercentage;
|
|
2716
|
+
}());
|
|
2717
|
+
}
|
|
2718
|
+
else
|
|
2719
|
+
{
|
|
2720
|
+
resultObject.qualityR600IdealSamplesScorePercentage = null;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
if(typeof result === 'object' && 'qualityR600IdealSamplesScoreWeighting' in result)
|
|
2724
|
+
{
|
|
2725
|
+
resultObject.qualityR600IdealSamplesScoreWeighting = (function(){
|
|
2726
|
+
if(result.qualityR600IdealSamplesScoreWeighting === null)
|
|
2727
|
+
{
|
|
2728
|
+
return null;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
if(typeof result.qualityR600IdealSamplesScoreWeighting !== 'number')
|
|
2732
|
+
{
|
|
2733
|
+
return Number(result.qualityR600IdealSamplesScoreWeighting);
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
return result.qualityR600IdealSamplesScoreWeighting;
|
|
2737
|
+
}());
|
|
2738
|
+
}
|
|
2739
|
+
else
|
|
2740
|
+
{
|
|
2741
|
+
resultObject.qualityR600IdealSamplesScoreWeighting = null;
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
if(typeof result === 'object' && 'qualityR600IdealSamplesTargetMet' in result)
|
|
2745
|
+
{
|
|
2746
|
+
resultObject.qualityR600IdealSamplesTargetMet = (function(){
|
|
2747
|
+
if(typeof result.qualityR600IdealSamplesTargetMet !== 'boolean')
|
|
2748
|
+
{
|
|
2749
|
+
return Boolean(result.qualityR600IdealSamplesTargetMet);
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
return result.qualityR600IdealSamplesTargetMet;
|
|
2753
|
+
}());
|
|
2754
|
+
}
|
|
2755
|
+
else
|
|
2756
|
+
{
|
|
2757
|
+
resultObject.qualityR600IdealSamplesTargetMet = false;
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
if(typeof result === 'object' && 'calculatedScore' in result)
|
|
2761
|
+
{
|
|
2762
|
+
resultObject.calculatedScore = (function(){
|
|
2763
|
+
if(result.calculatedScore === null)
|
|
2764
|
+
{
|
|
2765
|
+
return null;
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
if(typeof result.calculatedScore !== 'number')
|
|
2769
|
+
{
|
|
2770
|
+
return Number(result.calculatedScore);
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
return result.calculatedScore;
|
|
2774
|
+
}());
|
|
2775
|
+
}
|
|
2776
|
+
else
|
|
2777
|
+
{
|
|
2778
|
+
resultObject.calculatedScore = null;
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
return resultObject;
|
|
2782
|
+
}());
|
|
2783
|
+
|
|
2784
|
+
resolve(resolveValue);
|
|
2785
|
+
})
|
|
2786
|
+
.catch(error => reject(error));
|
|
2787
|
+
});
|
|
2788
|
+
}
|
|
2789
|
+
|
|
894
2790
|
/**
|
|
895
2791
|
* Retrieve a Shift Summary Report PDF [GET /packhouse/sites/{siteId}/shifts/{id}/summaryReportPdf]
|
|
896
2792
|
*
|
|
@@ -1343,6 +3239,7 @@ export default ShiftController;
|
|
|
1343
3239
|
* @property {Array<ShiftController.ShiftHandoverNote>} [handoverNotes] *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
1344
3240
|
* @property {Array<ShiftController.ShiftAreaNote>} [areaNotes] An Optional Array of Notes for this Shift
|
|
1345
3241
|
* @property {ShiftController.ShiftSchedule} schedule The Schedule for this Shift
|
|
3242
|
+
* @property {?ShiftController.ShiftScoreWeightings} [scoreWeightings] The Score Weightings used for this Shift. Represented as a Number between 0.0 and 1.0
|
|
1346
3243
|
* @memberof Controllers.Packhouse.Site
|
|
1347
3244
|
*/
|
|
1348
3245
|
|
|
@@ -1367,6 +3264,7 @@ export default ShiftController;
|
|
|
1367
3264
|
* @property {Array<ShiftController.ShiftHandoverNote>} [handoverNotes] *DEPRECATED* An Optional Array of Handover Notes for this Shift
|
|
1368
3265
|
* @property {Array<ShiftController.ShiftAreaNote>} [areaNotes] An Optional Array of Notes for this Shift
|
|
1369
3266
|
* @property {ShiftController.ShiftSchedule} [schedule] The Schedule for this Shift
|
|
3267
|
+
* @property {?ShiftController.ShiftScoreWeightings} [scoreWeightings] The Score Weightings used for this Shift. Represented as a Number between 0.0 and 1.0
|
|
1370
3268
|
* @memberof Controllers.Packhouse.Site
|
|
1371
3269
|
*/
|
|
1372
3270
|
|
|
@@ -1392,6 +3290,115 @@ export default ShiftController;
|
|
|
1392
3290
|
* @memberof Controllers.Packhouse.Site
|
|
1393
3291
|
*/
|
|
1394
3292
|
|
|
3293
|
+
/**
|
|
3294
|
+
* A **ShiftSummaryReportCustomQualityItem** Type
|
|
3295
|
+
*
|
|
3296
|
+
* @typedef {Object} ShiftController.ShiftSummaryReportCustomQualityItem
|
|
3297
|
+
* @property {string} id The ID of this Custom Quality Item
|
|
3298
|
+
* @property {string} name The Name of this Custom Quality Item
|
|
3299
|
+
* @property {string} type The Metric Type for this Custom Quality Item
|
|
3300
|
+
* @property {?number} value The Actual Value for this Custom Quality Data Item
|
|
3301
|
+
* @property {?number} target The Target for this Custom Quality Data Item
|
|
3302
|
+
* @property {?number} scorePercentage The Weighted Score Percentage for this Custom Quality Data Item
|
|
3303
|
+
* @property {?number} scoreWeighting The Score Weighting for this Custom Quality Data Item
|
|
3304
|
+
* @property {boolean} targetMet Whether the Target was Met for this Custom Quality Data Item
|
|
3305
|
+
* @memberof Controllers.Packhouse.Site
|
|
3306
|
+
*/
|
|
3307
|
+
|
|
3308
|
+
/**
|
|
3309
|
+
* A **ShiftSummaryReport** Type
|
|
3310
|
+
*
|
|
3311
|
+
* @typedef {Object} ShiftController.ShiftSummaryReport
|
|
3312
|
+
* @property {string} shiftId The ID of this Shift
|
|
3313
|
+
* @property {string} shiftType The Type of Shift
|
|
3314
|
+
* @property {number} isoWeek The ISO Week when this Shift was Created
|
|
3315
|
+
* @property {Date} startTimestamp Start Timestamp of the Shift
|
|
3316
|
+
* @property {?Date} finishTimestamp Finish Timestamp of the Shift
|
|
3317
|
+
* @property {?string} lineManagerName Name of the Line Manager for the Shift
|
|
3318
|
+
* @property {?string} qualityManagerName Name of the Quality Manager for the Shift
|
|
3319
|
+
* @property {ShiftHourlyEntryModel[]} hourlyEntries An Array of Hourly Entries for the Shift
|
|
3320
|
+
* @property {number} hourlyEntryInteractionActual Actual Number of Hourly Entry Interactions
|
|
3321
|
+
* @property {?number} hourlyEntryInteractionExpected Expected Number of Hourly Entry Interactions
|
|
3322
|
+
* @property {?number} hourlyEntryInteractionScore Hourly Entry Interaction Score based on Expected vs Actual Interactions
|
|
3323
|
+
* @property {DowntimeEventModel[]} downtimeEvents An Array of Downtime Events that occurred during the Shift
|
|
3324
|
+
* @property {ShiftFocusMeetingModel[]} focusMeetings An Array of Focus Meetings held during the Shift
|
|
3325
|
+
* @property {number} focusMeetingsHeld Number of Focus Meetings Held
|
|
3326
|
+
* @property {?number} focusMeetingsExpected Expected Number of Focus Meetings to Hold
|
|
3327
|
+
* @property {?number} focusMeetingsScore Focus Meeting Score based on Expected vs Held
|
|
3328
|
+
* @property {ShiftGrowerChangeMeetingModel[]} growerChangeMeetings An Array of Grower Change Meetings held during the Shift
|
|
3329
|
+
* @property {number} growerChangeMeetingsHeld Number of Grower Change Meetings Held
|
|
3330
|
+
* @property {?number} growerChangeMeetingsExpected Expected Number of Grower Change Meetings to Hold
|
|
3331
|
+
* @property {?number} growerChangeMeetingsScore Grower Change Meeting Score based on Expected vs Held
|
|
3332
|
+
* @property {PackrunModel[]} associatedPackruns An Array of Packruns that were Active during the Shift
|
|
3333
|
+
* @property {string[]} associatedVarietyIds An Array of Variety IDs associated with this Shift
|
|
3334
|
+
* @property {string[]} associatedVarietyCodes An Array of Variety Codes associated with this Shift
|
|
3335
|
+
* @property {string[]} associatedGrowingMethodIds An Array of Growing Method IDs associated with this Shift
|
|
3336
|
+
* @property {string[]} associatedGrowingMethodCodes An Array of Growing Method Codes associated with this Shift
|
|
3337
|
+
* @property {?ShiftQualitySummaryModel} qualitySummary The Quality Summary for this Shift
|
|
3338
|
+
* @property {number} binsTippedTarget Target number of Bins to Tip for the Shift
|
|
3339
|
+
* @property {number} totalBinsTipped Total Bins Tipped for the Shift
|
|
3340
|
+
* @property {number} binsTippedPerHour Rate of Bins Tipped per Hour
|
|
3341
|
+
* @property {number} binsTippedPerHourExcludingDowntime Rate of Bins Tipped per Hour excluding Downtime
|
|
3342
|
+
* @property {number} totalProductionTime Total Production Time for the Shift (exludes Breaks) represented as Seconds
|
|
3343
|
+
* @property {number} totalScheduledBreakTime Total Scheduled Break Time for the Shift represented as Seconds
|
|
3344
|
+
* @property {number} totalDowntime Total Downtime for the Shift represented as Seconds
|
|
3345
|
+
* @property {number} totalDowntimePercentage Total Downtime Percentage for the Shift
|
|
3346
|
+
* @property {number} downtimeEventsCount Number of Downtime Events that occurred during the Shift
|
|
3347
|
+
* @property {?number} downtimeEventsAverageDuration Average Duration of all Downtime Events for the Shift represented as Seconds
|
|
3348
|
+
* @property {?number} class1ManningTarget Target Number of People that should be working in all Areas except Class 2 for the Shift
|
|
3349
|
+
* @property {?number} averageClass1Manning Average Number of People working in all Areas except Class 2 for the Shift
|
|
3350
|
+
* @property {?number} class1ManningPercentage The Manning Percentage of all Areas except Class 2 for the Shift
|
|
3351
|
+
* @property {?number} class2ManningTarget Target Number of People that should be working in the Class 2 Area for the Shift
|
|
3352
|
+
* @property {?number} averageClass2Manning Average Number of People working in the Class 2 Area for the Shift
|
|
3353
|
+
* @property {?number} class2ManningPercentage The Manning Percentage of the Class 2 Area for the Shift
|
|
3354
|
+
* @property {?number} totalManningTarget Overall Target Number of People that should be working for the Shift
|
|
3355
|
+
* @property {?number} averageTotalManning Overall Average Number of People working for the Shift
|
|
3356
|
+
* @property {?number} totalManningPercentage The Overall Manning Percentage for the Shift
|
|
3357
|
+
* @property {?number} costPerManningUnitHour The Average Cost per Person working in all Areas for the Shift
|
|
3358
|
+
* @property {number} totalHoursWorked Total Hours Worked for the Shift (excludes Breaks)
|
|
3359
|
+
* @property {number} totalHoursWorkedExcludingDowntime Total Hours Worked excluding Downtime for the Shift
|
|
3360
|
+
* @property {number} totalHoursPaid Total Hours Paid for the Shift (factors in Breaks)
|
|
3361
|
+
* @property {?number} class1TotalManningCost Total Cost to Staff all Areas except Class 2 for the Shift
|
|
3362
|
+
* @property {?number} class2TotalManningCost Total Cost to Staff the Class 2 Area for the Shift
|
|
3363
|
+
* @property {?number} class1DowntimeManningCost Total Cost of Staff consumed by Downtime in all Areas except Class 2 for the Shift
|
|
3364
|
+
* @property {?number} class2DowntimeManningCost Total Cost of Staff consumed by Downtime in the Class 2 Area for the Shift
|
|
3365
|
+
* @property {?number} class1CostPerTrayTarget The Target Cost per Class 1 Tray Equivalent after Adjustment (Class 1 %, Layered %, Soft-Sort %) for the Shift
|
|
3366
|
+
* @property {?number} class1CostPerTrayActual The Actual Cost per Class 1 Tray Equivalent for the Shift
|
|
3367
|
+
* @property {?number} class2CostPerTrayActual The Actual Cost per Class 2 Tray Equivalent for the Shift
|
|
3368
|
+
* @property {number} totalClass1Trays The Total Number of Class 1 Tray Equivalents Packed for the Shift
|
|
3369
|
+
* @property {number} totalClass2Trays The Total Number of Class 2 Tray Equivalents Packed for the Shift
|
|
3370
|
+
* @property {?number} class1TraysPerHour The Actual Number of Class 1 Tray Equivalents Packed per Hour including Downtime for the Shift
|
|
3371
|
+
* @property {?number} class1TraysPerHourExcludingDowntime The Actual Number of Class 1 Tray Equivalents Packed per Hour excluding Downtime for the Shift
|
|
3372
|
+
* @property {?number} class1TraysPerHourExcludingDowntimeTarget The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %, Class 1 %, Layered %, Soft-Sort %) for the Shift
|
|
3373
|
+
* @property {?number} class1TraysPerManHour The Actual Number of Class 1 Tray Equivalents Packed per Person per Hour including Downtime for the Shift
|
|
3374
|
+
* @property {?number} class1TraysPerManHourExcludingDowntime The Actual Number of Class 1 Tray Equivalents Packed per Person per Hour excluding Downtime for the Shift
|
|
3375
|
+
* @property {?number} class2TraysPerHour The Actual Number of Class 2 Tray Equivalents Packed per Hour including Downtime for the Shift
|
|
3376
|
+
* @property {?number} class2TraysPerHourExcludingDowntime The Actual Number of Class 2 Tray Equivalents Packed per Hour excluding Downtime for the Shift
|
|
3377
|
+
* @property {?number} class2TraysPerManHour The Actual Number of Class 2 Tray Equivalents Packed per Person per Hour including Downtime for the Shift
|
|
3378
|
+
* @property {?number} class2TraysPerManHourExcludingDowntime The Actual Number of Class 2 Tray Equivalents Packed per Person per Hour excluding Downtime for the Shift
|
|
3379
|
+
* @property {?number} class1LayeredPercentageTarget The Target Percentage of Total Tray Equivalents that should be Layered for the Shift
|
|
3380
|
+
* @property {?number} class1LayeredPercentage The Actual Percentage of Total Tray Equivalents that are Layered for the Shift
|
|
3381
|
+
* @property {?number} class1BulkPercentage The Actual Percentage of Total Tray Equivalents that are Bulk for the Shift
|
|
3382
|
+
* @property {?number} averageClass1Percentage The Average Class 1 Percentage for all Packruns Active during this Shift
|
|
3383
|
+
* @property {?number} qualityR600IdealSamplesTarget The Target Percentage of Quality R600 Samples that should be Ideal for the Shift
|
|
3384
|
+
* @property {?number} qualityR600IdealSamplesActual The Actual Percentage of Quality R600 Samples that were Ideal for the Shift
|
|
3385
|
+
* @property {Array<ShiftController.ShiftSummaryReportCustomQualityItem>} customQualityData An Array of Custom Quality Data Items for the Shift
|
|
3386
|
+
* @property {?number} satisfactionRating An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift
|
|
3387
|
+
* @property {?string} keyCelebration An Optional Key Celebration the Line Manager and Team experienced during this Shift
|
|
3388
|
+
* @property {?string} keyChallenge An Optional Key Challenge the Line Manager and Team experienced during this Shift
|
|
3389
|
+
* @property {?number} class1TraysPerHourScorePercentage The Weighted Score Percentage for Class 1 Tray Equivalents per Hour
|
|
3390
|
+
* @property {?number} class1TraysPerHourScoreWeighting The Score Weighting for Class 1 Tray Equivalents per Hour represented as a Number between 0.0 and 1.0
|
|
3391
|
+
* @property {boolean} class1TraysPerHourTargetMet Whether the Class 1 Tray Equivalents per Hour Target was Met for the Shift
|
|
3392
|
+
* @property {?number} class1CostPerTrayScorePercentage The Weighted Score Percentage for Class 1 Cost per Tray Equivalent
|
|
3393
|
+
* @property {?number} class1CostPerTrayScoreWeighting The Score Weighting for Class 1 Cost per Tray Equivalent represented as a Number between 0.0 and 1.0
|
|
3394
|
+
* @property {boolean} class1CostPerTrayTargetMet Whether the Class 1 Cost per Tray Equivalent Target was Met for the Shift
|
|
3395
|
+
* @property {?number} qualityR600IdealSamplesScorePercentage The Weighted Score Percentage for Quality R600 Ideal Samples
|
|
3396
|
+
* @property {?number} qualityR600IdealSamplesScoreWeighting The Score Weighting for Quality R600 Ideal Samples represented as a Number between 0.0 and 1.0
|
|
3397
|
+
* @property {boolean} qualityR600IdealSamplesTargetMet Whether the Percentage of R600 Ideal Samples Target was Met for the Shift
|
|
3398
|
+
* @property {?number} calculatedScore The Final Calculated Score for the Shift
|
|
3399
|
+
* @memberof Controllers.Packhouse.Site
|
|
3400
|
+
*/
|
|
3401
|
+
|
|
1395
3402
|
/**
|
|
1396
3403
|
* A **ScoreHistoryItem** Type
|
|
1397
3404
|
*
|
|
@@ -1464,4 +3471,24 @@ export default ShiftController;
|
|
|
1464
3471
|
* @property {string} endTime When the Shift is Scheduled to End
|
|
1465
3472
|
* @property {Array<ShiftController.ShiftScheduleBreak>} breaks An Array of Scheduled Breaks for the Shift
|
|
1466
3473
|
* @memberof Controllers.Packhouse.Site
|
|
3474
|
+
*/
|
|
3475
|
+
|
|
3476
|
+
/**
|
|
3477
|
+
* A **ShiftScoreWeightingsCustomQuality** Type
|
|
3478
|
+
*
|
|
3479
|
+
* @typedef {Object} ShiftController.ShiftScoreWeightingsCustomQuality
|
|
3480
|
+
* @property {string} id The ID of the Custom Quality
|
|
3481
|
+
* @property {number} weighting The Score Weighting for the Custom Quality
|
|
3482
|
+
* @memberof Controllers.Packhouse.Site
|
|
3483
|
+
*/
|
|
3484
|
+
|
|
3485
|
+
/**
|
|
3486
|
+
* A **ShiftScoreWeightings** Type
|
|
3487
|
+
*
|
|
3488
|
+
* @typedef {Object} ShiftController.ShiftScoreWeightings
|
|
3489
|
+
* @property {number} class1TraysPerHour The Score Weighting for Class 1 Trays Per Hour
|
|
3490
|
+
* @property {number} costPerTray The Score Weighting for Cost per Tray
|
|
3491
|
+
* @property {number} qualityR600Ideal The Score Weighting for Quality R600 Ideal
|
|
3492
|
+
* @property {Array<ShiftController.ShiftScoreWeightingsCustomQuality>} customQualities An Array of Score Weightings for Custom Qualities
|
|
3493
|
+
* @memberof Controllers.Packhouse.Site
|
|
1467
3494
|
*/
|