@ricado/api-client 2.5.12 → 2.5.13
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/index.d.ts +5155 -4690
- 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/types/tslint.json +3 -1
|
@@ -205,6 +205,15 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
205
205
|
scheduleDefaultValue.breaks = [];
|
|
206
206
|
return scheduleDefaultValue;
|
|
207
207
|
}();
|
|
208
|
+
/**
|
|
209
|
+
* The Score Weightings used for this Shift. Represented as a Number between 0.0 and 1.0
|
|
210
|
+
*
|
|
211
|
+
* @type {?{class1TraysPerHour: number, costPerTray: number, qualityR600Ideal: number, customQualities: Array<{id: string, weighting: number}>}}
|
|
212
|
+
* @public
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
_this.scoreWeightings = null;
|
|
208
217
|
/**
|
|
209
218
|
* The Status of this Shift
|
|
210
219
|
*
|
|
@@ -212,7 +221,6 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
212
221
|
* @public
|
|
213
222
|
*/
|
|
214
223
|
|
|
215
|
-
|
|
216
224
|
_this.status = "";
|
|
217
225
|
/**
|
|
218
226
|
* Whether the Shift has been deleted
|
|
@@ -629,6 +637,96 @@ var ShiftModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
629
637
|
}();
|
|
630
638
|
}
|
|
631
639
|
|
|
640
|
+
if ('scoreWeightings' in jsonObject) {
|
|
641
|
+
model.scoreWeightings = function () {
|
|
642
|
+
if (jsonObject['scoreWeightings'] === null) {
|
|
643
|
+
return null;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
var scoreWeightingsObject = {};
|
|
647
|
+
|
|
648
|
+
if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'class1TraysPerHour' in jsonObject['scoreWeightings']) {
|
|
649
|
+
scoreWeightingsObject.class1TraysPerHour = function () {
|
|
650
|
+
if (typeof jsonObject['scoreWeightings'].class1TraysPerHour !== 'number') {
|
|
651
|
+
return Number(jsonObject['scoreWeightings'].class1TraysPerHour);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
return jsonObject['scoreWeightings'].class1TraysPerHour;
|
|
655
|
+
}();
|
|
656
|
+
} else {
|
|
657
|
+
scoreWeightingsObject.class1TraysPerHour = 0;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'costPerTray' in jsonObject['scoreWeightings']) {
|
|
661
|
+
scoreWeightingsObject.costPerTray = function () {
|
|
662
|
+
if (typeof jsonObject['scoreWeightings'].costPerTray !== 'number') {
|
|
663
|
+
return Number(jsonObject['scoreWeightings'].costPerTray);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
return jsonObject['scoreWeightings'].costPerTray;
|
|
667
|
+
}();
|
|
668
|
+
} else {
|
|
669
|
+
scoreWeightingsObject.costPerTray = 0;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'qualityR600Ideal' in jsonObject['scoreWeightings']) {
|
|
673
|
+
scoreWeightingsObject.qualityR600Ideal = function () {
|
|
674
|
+
if (typeof jsonObject['scoreWeightings'].qualityR600Ideal !== 'number') {
|
|
675
|
+
return Number(jsonObject['scoreWeightings'].qualityR600Ideal);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
return jsonObject['scoreWeightings'].qualityR600Ideal;
|
|
679
|
+
}();
|
|
680
|
+
} else {
|
|
681
|
+
scoreWeightingsObject.qualityR600Ideal = 0;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
if (_typeof(jsonObject['scoreWeightings']) === 'object' && 'customQualities' in jsonObject['scoreWeightings']) {
|
|
685
|
+
scoreWeightingsObject.customQualities = function () {
|
|
686
|
+
if (Array.isArray(jsonObject['scoreWeightings'].customQualities) !== true) {
|
|
687
|
+
return [];
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
return jsonObject['scoreWeightings'].customQualities.map(function (customQualitiesItem) {
|
|
691
|
+
return function () {
|
|
692
|
+
var customQualitiesItemObject = {};
|
|
693
|
+
|
|
694
|
+
if (_typeof(customQualitiesItem) === 'object' && 'id' in customQualitiesItem) {
|
|
695
|
+
customQualitiesItemObject.id = function () {
|
|
696
|
+
if (typeof customQualitiesItem.id !== 'string') {
|
|
697
|
+
return String(customQualitiesItem.id);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
return customQualitiesItem.id;
|
|
701
|
+
}();
|
|
702
|
+
} else {
|
|
703
|
+
customQualitiesItemObject.id = "";
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
if (_typeof(customQualitiesItem) === 'object' && 'weighting' in customQualitiesItem) {
|
|
707
|
+
customQualitiesItemObject.weighting = function () {
|
|
708
|
+
if (typeof customQualitiesItem.weighting !== 'number') {
|
|
709
|
+
return Number(customQualitiesItem.weighting);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
return customQualitiesItem.weighting;
|
|
713
|
+
}();
|
|
714
|
+
} else {
|
|
715
|
+
customQualitiesItemObject.weighting = 0;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
return customQualitiesItemObject;
|
|
719
|
+
}();
|
|
720
|
+
});
|
|
721
|
+
}();
|
|
722
|
+
} else {
|
|
723
|
+
scoreWeightingsObject.customQualities = [];
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
return scoreWeightingsObject;
|
|
727
|
+
}();
|
|
728
|
+
}
|
|
729
|
+
|
|
632
730
|
if ('status' in jsonObject) {
|
|
633
731
|
model.status = function () {
|
|
634
732
|
if (typeof jsonObject['status'] !== 'string') {
|
package/lib/PackageVersion.js
CHANGED