@ricado/api-client 2.0.0 → 2.1.1
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/README.md +5 -7
- 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 +29 -7
- 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/SoftSortBeltController.js +453 -0
- package/lib/Controllers/Packhouse/Site/VarietyController.js +5 -5
- package/lib/Controllers/Packhouse/Site/index.js +3 -0
- 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 +6 -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 +3 -3
- package/lib/Models/ApiAccountModel.js +3 -3
- package/lib/Models/BaseModel.js +6 -2
- package/lib/Models/CompanyModel.js +3 -3
- package/lib/Models/FirebaseTokenModel.js +3 -3
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +16 -6
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +16 -6
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +16 -6
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +16 -6
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackTypeModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackingLineModel.js +16 -6
- package/lib/Models/Packhouse/Site/PackrunModel.js +16 -6
- package/lib/Models/Packhouse/Site/RejectBinModel.js +16 -6
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +276 -10
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +16 -6
- package/lib/Models/Packhouse/Site/ShiftModel.js +16 -6
- package/lib/Models/Packhouse/Site/SoftSortBeltModel.js +235 -0
- package/lib/Models/Packhouse/Site/VarietyModel.js +16 -6
- package/lib/Models/Packhouse/Site/index.js +3 -0
- package/lib/Models/RTUModel.js +3 -3
- package/lib/Models/RTUPluginModel.js +3 -3
- package/lib/Models/Site/AlarmGroupModel.js +16 -6
- package/lib/Models/Site/AlarmModel.js +16 -6
- package/lib/Models/Site/DefinitionModel.js +16 -6
- package/lib/Models/Site/PermanentObjectDataModel.js +16 -6
- package/lib/Models/Site/PermanentObjectModel.js +16 -6
- package/lib/Models/Site/PointModel.js +16 -6
- package/lib/Models/Site/TemporaryObjectModel.js +16 -6
- package/lib/Models/SiteModel.js +3 -3
- package/lib/Models/TokenModel.js +3 -3
- package/lib/Models/UserAccountActionTokenModel.js +3 -3
- package/lib/Models/UserAccountModel.js +3 -3
- 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 +1038 -76
- 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 +28 -6
- 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/SoftSortBeltController.js +474 -0
- package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/src/Controllers/Packhouse/Site/index.js +2 -0
- 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 +4 -4
- package/src/Controllers/Site/TemporaryObjectController.js +4 -4
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +13 -3
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +13 -3
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +13 -3
- package/src/Models/Packhouse/Site/PackTypeModel.js +13 -3
- package/src/Models/Packhouse/Site/PackingLineModel.js +13 -3
- package/src/Models/Packhouse/Site/PackrunModel.js +13 -3
- package/src/Models/Packhouse/Site/RejectBinModel.js +13 -3
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +310 -7
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +13 -3
- package/src/Models/Packhouse/Site/ShiftModel.js +13 -3
- package/src/Models/Packhouse/Site/SoftSortBeltModel.js +215 -0
- package/src/Models/Packhouse/Site/VarietyModel.js +13 -3
- package/src/Models/Packhouse/Site/index.js +2 -0
- package/src/Models/Site/AlarmGroupModel.js +13 -3
- package/src/Models/Site/AlarmModel.js +13 -3
- package/src/Models/Site/DefinitionModel.js +13 -3
- package/src/Models/Site/PermanentObjectDataModel.js +13 -3
- package/src/Models/Site/PermanentObjectModel.js +13 -3
- package/src/Models/Site/PointModel.js +13 -3
- package/src/Models/Site/TemporaryObjectModel.js +13 -3
- package/src/PackageVersion.js +1 -1
|
@@ -29,7 +29,7 @@ class PackrunController
|
|
|
29
29
|
RequestHelper.getRequest(`/packhouse/sites/${siteId}/packruns/${id}`)
|
|
30
30
|
.then((result) => {
|
|
31
31
|
let resolveValue = (function(){
|
|
32
|
-
return PackrunModel.fromJSON(result);
|
|
32
|
+
return PackrunModel.fromJSON(result, siteId);
|
|
33
33
|
}());
|
|
34
34
|
|
|
35
35
|
resolve(resolveValue);
|
|
@@ -54,7 +54,7 @@ class PackrunController
|
|
|
54
54
|
RequestHelper.patchRequest(`/packhouse/sites/${siteId}/packruns/${id}`, updateData)
|
|
55
55
|
.then((result) => {
|
|
56
56
|
let resolveValue = (function(){
|
|
57
|
-
return PackrunModel.fromJSON(result);
|
|
57
|
+
return PackrunModel.fromJSON(result, siteId);
|
|
58
58
|
}());
|
|
59
59
|
|
|
60
60
|
resolve(resolveValue);
|
|
@@ -1589,6 +1589,342 @@ class PackrunController
|
|
|
1589
1589
|
});
|
|
1590
1590
|
}
|
|
1591
1591
|
|
|
1592
|
+
/**
|
|
1593
|
+
* Retrieve a Packrun Infeed Report [GET /packhouse/sites/{siteId}/packruns/{id}/infeedReport]
|
|
1594
|
+
*
|
|
1595
|
+
* Retrieves an Infeed Report for a Packrun
|
|
1596
|
+
*
|
|
1597
|
+
* @static
|
|
1598
|
+
* @public
|
|
1599
|
+
* @param {number} siteId The Site ID
|
|
1600
|
+
* @param {string} id The Packrun ID
|
|
1601
|
+
* @return {Promise<PackrunController.PackrunInfeedReport>}
|
|
1602
|
+
*/
|
|
1603
|
+
static getInfeedReport(siteId, id)
|
|
1604
|
+
{
|
|
1605
|
+
return new Promise((resolve, reject) => {
|
|
1606
|
+
RequestHelper.getRequest(`/packhouse/sites/${siteId}/packruns/${id}/infeedReport`)
|
|
1607
|
+
.then((result) => {
|
|
1608
|
+
let resolveValue = (function(){
|
|
1609
|
+
let resultObject = {};
|
|
1610
|
+
|
|
1611
|
+
if(typeof result === 'object' && 'id' in result)
|
|
1612
|
+
{
|
|
1613
|
+
resultObject.id = (function(){
|
|
1614
|
+
if(typeof result.id !== 'string')
|
|
1615
|
+
{
|
|
1616
|
+
return String(result.id);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
return result.id;
|
|
1620
|
+
}());
|
|
1621
|
+
}
|
|
1622
|
+
else
|
|
1623
|
+
{
|
|
1624
|
+
resultObject.id = "";
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
if(typeof result === 'object' && 'name' in result)
|
|
1628
|
+
{
|
|
1629
|
+
resultObject.name = (function(){
|
|
1630
|
+
if(typeof result.name !== 'string')
|
|
1631
|
+
{
|
|
1632
|
+
return String(result.name);
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
return result.name;
|
|
1636
|
+
}());
|
|
1637
|
+
}
|
|
1638
|
+
else
|
|
1639
|
+
{
|
|
1640
|
+
resultObject.name = "";
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
if(typeof result === 'object' && 'createdTimestamp' in result)
|
|
1644
|
+
{
|
|
1645
|
+
resultObject.createdTimestamp = (function(){
|
|
1646
|
+
if(typeof result.createdTimestamp !== 'string')
|
|
1647
|
+
{
|
|
1648
|
+
return new Date(String(result.createdTimestamp));
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
return new Date(result.createdTimestamp);
|
|
1652
|
+
}());
|
|
1653
|
+
}
|
|
1654
|
+
else
|
|
1655
|
+
{
|
|
1656
|
+
resultObject.createdTimestamp = new Date();
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
if(typeof result === 'object' && 'startTimestamp' in result)
|
|
1660
|
+
{
|
|
1661
|
+
resultObject.startTimestamp = (function(){
|
|
1662
|
+
if(result.startTimestamp === null)
|
|
1663
|
+
{
|
|
1664
|
+
return null;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
if(typeof result.startTimestamp !== 'string')
|
|
1668
|
+
{
|
|
1669
|
+
return new Date(String(result.startTimestamp));
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
return new Date(result.startTimestamp);
|
|
1673
|
+
}());
|
|
1674
|
+
}
|
|
1675
|
+
else
|
|
1676
|
+
{
|
|
1677
|
+
resultObject.startTimestamp = null;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
if(typeof result === 'object' && 'finishTimestamp' in result)
|
|
1681
|
+
{
|
|
1682
|
+
resultObject.finishTimestamp = (function(){
|
|
1683
|
+
if(result.finishTimestamp === null)
|
|
1684
|
+
{
|
|
1685
|
+
return null;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
if(typeof result.finishTimestamp !== 'string')
|
|
1689
|
+
{
|
|
1690
|
+
return new Date(String(result.finishTimestamp));
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
return new Date(result.finishTimestamp);
|
|
1694
|
+
}());
|
|
1695
|
+
}
|
|
1696
|
+
else
|
|
1697
|
+
{
|
|
1698
|
+
resultObject.finishTimestamp = null;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
if(typeof result === 'object' && 'packingLineId' in result)
|
|
1702
|
+
{
|
|
1703
|
+
resultObject.packingLineId = (function(){
|
|
1704
|
+
if(typeof result.packingLineId !== 'string')
|
|
1705
|
+
{
|
|
1706
|
+
return String(result.packingLineId);
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
return result.packingLineId;
|
|
1710
|
+
}());
|
|
1711
|
+
}
|
|
1712
|
+
else
|
|
1713
|
+
{
|
|
1714
|
+
resultObject.packingLineId = "";
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
if(typeof result === 'object' && 'packingLineName' in result)
|
|
1718
|
+
{
|
|
1719
|
+
resultObject.packingLineName = (function(){
|
|
1720
|
+
if(result.packingLineName === null)
|
|
1721
|
+
{
|
|
1722
|
+
return null;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
if(typeof result.packingLineName !== 'string')
|
|
1726
|
+
{
|
|
1727
|
+
return String(result.packingLineName);
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
return result.packingLineName;
|
|
1731
|
+
}());
|
|
1732
|
+
}
|
|
1733
|
+
else
|
|
1734
|
+
{
|
|
1735
|
+
resultObject.packingLineName = null;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
if(typeof result === 'object' && 'growerName' in result)
|
|
1739
|
+
{
|
|
1740
|
+
resultObject.growerName = (function(){
|
|
1741
|
+
if(typeof result.growerName !== 'string')
|
|
1742
|
+
{
|
|
1743
|
+
return String(result.growerName);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
return result.growerName;
|
|
1747
|
+
}());
|
|
1748
|
+
}
|
|
1749
|
+
else
|
|
1750
|
+
{
|
|
1751
|
+
resultObject.growerName = "";
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
if(typeof result === 'object' && 'growerCode' in result)
|
|
1755
|
+
{
|
|
1756
|
+
resultObject.growerCode = (function(){
|
|
1757
|
+
if(typeof result.growerCode !== 'string')
|
|
1758
|
+
{
|
|
1759
|
+
return String(result.growerCode);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
return result.growerCode;
|
|
1763
|
+
}());
|
|
1764
|
+
}
|
|
1765
|
+
else
|
|
1766
|
+
{
|
|
1767
|
+
resultObject.growerCode = "";
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
if(typeof result === 'object' && 'maturityArea' in result)
|
|
1771
|
+
{
|
|
1772
|
+
resultObject.maturityArea = (function(){
|
|
1773
|
+
if(result.maturityArea === null)
|
|
1774
|
+
{
|
|
1775
|
+
return null;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
if(typeof result.maturityArea !== 'string')
|
|
1779
|
+
{
|
|
1780
|
+
return String(result.maturityArea);
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
return result.maturityArea;
|
|
1784
|
+
}());
|
|
1785
|
+
}
|
|
1786
|
+
else
|
|
1787
|
+
{
|
|
1788
|
+
resultObject.maturityArea = null;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
if(typeof result === 'object' && 'allocatedBins' in result)
|
|
1792
|
+
{
|
|
1793
|
+
resultObject.allocatedBins = (function(){
|
|
1794
|
+
if(typeof result.allocatedBins !== 'number')
|
|
1795
|
+
{
|
|
1796
|
+
return Number.isInteger(Number(result.allocatedBins)) ? Number(result.allocatedBins) : Math.floor(Number(result.allocatedBins));
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
return Number.isInteger(result.allocatedBins) ? result.allocatedBins : Math.floor(result.allocatedBins);
|
|
1800
|
+
}());
|
|
1801
|
+
}
|
|
1802
|
+
else
|
|
1803
|
+
{
|
|
1804
|
+
resultObject.allocatedBins = 0;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
if(typeof result === 'object' && 'tippedBins' in result)
|
|
1808
|
+
{
|
|
1809
|
+
resultObject.tippedBins = (function(){
|
|
1810
|
+
if(typeof result.tippedBins !== 'number')
|
|
1811
|
+
{
|
|
1812
|
+
return Number.isInteger(Number(result.tippedBins)) ? Number(result.tippedBins) : Math.floor(Number(result.tippedBins));
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
return Number.isInteger(result.tippedBins) ? result.tippedBins : Math.floor(result.tippedBins);
|
|
1816
|
+
}());
|
|
1817
|
+
}
|
|
1818
|
+
else
|
|
1819
|
+
{
|
|
1820
|
+
resultObject.tippedBins = 0;
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
if(typeof result === 'object' && 'softSortRejectWeight' in result)
|
|
1824
|
+
{
|
|
1825
|
+
resultObject.softSortRejectWeight = (function(){
|
|
1826
|
+
if(typeof result.softSortRejectWeight !== 'number')
|
|
1827
|
+
{
|
|
1828
|
+
return Number(result.softSortRejectWeight);
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
return result.softSortRejectWeight;
|
|
1832
|
+
}());
|
|
1833
|
+
}
|
|
1834
|
+
else
|
|
1835
|
+
{
|
|
1836
|
+
resultObject.softSortRejectWeight = 0;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
if(typeof result === 'object' && 'softSortRejectPercentage' in result)
|
|
1840
|
+
{
|
|
1841
|
+
resultObject.softSortRejectPercentage = (function(){
|
|
1842
|
+
if(typeof result.softSortRejectPercentage !== 'number')
|
|
1843
|
+
{
|
|
1844
|
+
return Number(result.softSortRejectPercentage);
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
return result.softSortRejectPercentage;
|
|
1848
|
+
}());
|
|
1849
|
+
}
|
|
1850
|
+
else
|
|
1851
|
+
{
|
|
1852
|
+
resultObject.softSortRejectPercentage = 0;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
if(typeof result === 'object' && 'softSortEventsPerBin' in result)
|
|
1856
|
+
{
|
|
1857
|
+
resultObject.softSortEventsPerBin = (function(){
|
|
1858
|
+
if(typeof result.softSortEventsPerBin !== 'number')
|
|
1859
|
+
{
|
|
1860
|
+
return Number(result.softSortEventsPerBin);
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
return result.softSortEventsPerBin;
|
|
1864
|
+
}());
|
|
1865
|
+
}
|
|
1866
|
+
else
|
|
1867
|
+
{
|
|
1868
|
+
resultObject.softSortEventsPerBin = 0;
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
if(typeof result === 'object' && 'totalSoftSortEventsCount' in result)
|
|
1872
|
+
{
|
|
1873
|
+
resultObject.totalSoftSortEventsCount = (function(){
|
|
1874
|
+
if(typeof result.totalSoftSortEventsCount !== 'number')
|
|
1875
|
+
{
|
|
1876
|
+
return Number.isInteger(Number(result.totalSoftSortEventsCount)) ? Number(result.totalSoftSortEventsCount) : Math.floor(Number(result.totalSoftSortEventsCount));
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
return Number.isInteger(result.totalSoftSortEventsCount) ? result.totalSoftSortEventsCount : Math.floor(result.totalSoftSortEventsCount);
|
|
1880
|
+
}());
|
|
1881
|
+
}
|
|
1882
|
+
else
|
|
1883
|
+
{
|
|
1884
|
+
resultObject.totalSoftSortEventsCount = 0;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
if(typeof result === 'object' && 'averageSoftSortEventsDuration' in result)
|
|
1888
|
+
{
|
|
1889
|
+
resultObject.averageSoftSortEventsDuration = (function(){
|
|
1890
|
+
if(typeof result.averageSoftSortEventsDuration !== 'number')
|
|
1891
|
+
{
|
|
1892
|
+
return Number(result.averageSoftSortEventsDuration);
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
return result.averageSoftSortEventsDuration;
|
|
1896
|
+
}());
|
|
1897
|
+
}
|
|
1898
|
+
else
|
|
1899
|
+
{
|
|
1900
|
+
resultObject.averageSoftSortEventsDuration = 0;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
if(typeof result === 'object' && 'totalSoftSortEventsDuration' in result)
|
|
1904
|
+
{
|
|
1905
|
+
resultObject.totalSoftSortEventsDuration = (function(){
|
|
1906
|
+
if(typeof result.totalSoftSortEventsDuration !== 'number')
|
|
1907
|
+
{
|
|
1908
|
+
return Number(result.totalSoftSortEventsDuration);
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
return result.totalSoftSortEventsDuration;
|
|
1912
|
+
}());
|
|
1913
|
+
}
|
|
1914
|
+
else
|
|
1915
|
+
{
|
|
1916
|
+
resultObject.totalSoftSortEventsDuration = 0;
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
return resultObject;
|
|
1920
|
+
}());
|
|
1921
|
+
|
|
1922
|
+
resolve(resolveValue);
|
|
1923
|
+
})
|
|
1924
|
+
.catch(error => reject(error));
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1592
1928
|
/**
|
|
1593
1929
|
* List all Packruns [GET /packhouse/sites/{siteId}/packruns]
|
|
1594
1930
|
*
|
|
@@ -1611,7 +1947,7 @@ class PackrunController
|
|
|
1611
1947
|
|
|
1612
1948
|
return result.map((resultItem) => {
|
|
1613
1949
|
return (function(){
|
|
1614
|
-
return PackrunModel.fromJSON(resultItem);
|
|
1950
|
+
return PackrunModel.fromJSON(resultItem, siteId);
|
|
1615
1951
|
}());
|
|
1616
1952
|
});
|
|
1617
1953
|
}());
|
|
@@ -1637,7 +1973,7 @@ class PackrunController
|
|
|
1637
1973
|
RequestHelper.postRequest(`/packhouse/sites/${siteId}/packruns`, createData)
|
|
1638
1974
|
.then((result) => {
|
|
1639
1975
|
let resolveValue = (function(){
|
|
1640
|
-
return PackrunModel.fromJSON(result);
|
|
1976
|
+
return PackrunModel.fromJSON(result, siteId);
|
|
1641
1977
|
}());
|
|
1642
1978
|
|
|
1643
1979
|
resolve(resolveValue);
|
|
@@ -1820,4 +2156,29 @@ export default PackrunController;
|
|
|
1820
2156
|
* @property {number} class2AverageTrayWeight The Average Class 2 Tray Weight for this Packrun
|
|
1821
2157
|
* @property {Object[]} class2FreshPackSummary An Array of Class 2 Fruit Summaries by Size from FreshPack for the Packrun
|
|
1822
2158
|
* @memberof Controllers.Packhouse.Site
|
|
2159
|
+
*/
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* A **PackrunInfeedReport** Type
|
|
2163
|
+
*
|
|
2164
|
+
* @typedef {Object} PackrunController.PackrunInfeedReport
|
|
2165
|
+
* @property {string} id The Packrun ID
|
|
2166
|
+
* @property {string} name The Packrun Name
|
|
2167
|
+
* @property {Date} createdTimestamp When the Packrun was Created
|
|
2168
|
+
* @property {?Date} startTimestamp When the Packrun was Started
|
|
2169
|
+
* @property {?Date} finishTimestamp When the Packrun was Finished
|
|
2170
|
+
* @property {string} packingLineId The Packing Line ID
|
|
2171
|
+
* @property {?string} packingLineName The Packing Line Name
|
|
2172
|
+
* @property {string} growerName The Grower Name
|
|
2173
|
+
* @property {string} growerCode The Grower Code
|
|
2174
|
+
* @property {?string} maturityArea The Maturity Area
|
|
2175
|
+
* @property {number} allocatedBins The Number of Bins Allocated for the Packrun
|
|
2176
|
+
* @property {number} tippedBins The Number of Bins Tipped for the Packrun
|
|
2177
|
+
* @property {number} softSortRejectWeight The Total Reject Weight for the Soft-Sort category expressed in kilograms
|
|
2178
|
+
* @property {number} softSortRejectPercentage The Percentage of Packrun Weight categorized as Soft-Sort
|
|
2179
|
+
* @property {number} softSortEventsPerBin The Number of Soft-Sort Events per Bin
|
|
2180
|
+
* @property {number} totalSoftSortEventsCount The Number of Soft-Sort Events that occurred for the Packrun
|
|
2181
|
+
* @property {number} averageSoftSortEventsDuration The Average Duration of Soft-Sort Events for the Packrun expressed in Seconds
|
|
2182
|
+
* @property {number} totalSoftSortEventsDuration The Total Duration of all Soft-Sort Events for the Packrun expressed in Seconds
|
|
2183
|
+
* @memberof Controllers.Packhouse.Site
|
|
1823
2184
|
*/
|
|
@@ -29,7 +29,7 @@ class RejectBinController
|
|
|
29
29
|
RequestHelper.getRequest(`/packhouse/sites/${siteId}/reject-bins/${id}`)
|
|
30
30
|
.then((result) => {
|
|
31
31
|
let resolveValue = (function(){
|
|
32
|
-
return RejectBinModel.fromJSON(result);
|
|
32
|
+
return RejectBinModel.fromJSON(result, siteId);
|
|
33
33
|
}());
|
|
34
34
|
|
|
35
35
|
resolve(resolveValue);
|
|
@@ -54,7 +54,7 @@ class RejectBinController
|
|
|
54
54
|
RequestHelper.patchRequest(`/packhouse/sites/${siteId}/reject-bins/${id}`, updateData)
|
|
55
55
|
.then((result) => {
|
|
56
56
|
let resolveValue = (function(){
|
|
57
|
-
return RejectBinModel.fromJSON(result);
|
|
57
|
+
return RejectBinModel.fromJSON(result, siteId);
|
|
58
58
|
}());
|
|
59
59
|
|
|
60
60
|
resolve(resolveValue);
|
|
@@ -569,7 +569,7 @@ class RejectBinController
|
|
|
569
569
|
|
|
570
570
|
return result.map((resultItem) => {
|
|
571
571
|
return (function(){
|
|
572
|
-
return RejectBinModel.fromJSON(resultItem);
|
|
572
|
+
return RejectBinModel.fromJSON(resultItem, siteId);
|
|
573
573
|
}());
|
|
574
574
|
});
|
|
575
575
|
}());
|
|
@@ -595,7 +595,7 @@ class RejectBinController
|
|
|
595
595
|
RequestHelper.postRequest(`/packhouse/sites/${siteId}/reject-bins`, createData)
|
|
596
596
|
.then((result) => {
|
|
597
597
|
let resolveValue = (function(){
|
|
598
|
-
return RejectBinModel.fromJSON(result);
|
|
598
|
+
return RejectBinModel.fromJSON(result, siteId);
|
|
599
599
|
}());
|
|
600
600
|
|
|
601
601
|
resolve(resolveValue);
|
|
@@ -29,7 +29,7 @@ class RejectBinScaleController
|
|
|
29
29
|
RequestHelper.getRequest(`/packhouse/sites/${siteId}/reject-bin-scales/${id}`)
|
|
30
30
|
.then((result) => {
|
|
31
31
|
let resolveValue = (function(){
|
|
32
|
-
return RejectBinScaleModel.fromJSON(result);
|
|
32
|
+
return RejectBinScaleModel.fromJSON(result, siteId);
|
|
33
33
|
}());
|
|
34
34
|
|
|
35
35
|
resolve(resolveValue);
|
|
@@ -54,7 +54,7 @@ class RejectBinScaleController
|
|
|
54
54
|
RequestHelper.patchRequest(`/packhouse/sites/${siteId}/reject-bin-scales/${id}`, updateData)
|
|
55
55
|
.then((result) => {
|
|
56
56
|
let resolveValue = (function(){
|
|
57
|
-
return RejectBinScaleModel.fromJSON(result);
|
|
57
|
+
return RejectBinScaleModel.fromJSON(result, siteId);
|
|
58
58
|
}());
|
|
59
59
|
|
|
60
60
|
resolve(resolveValue);
|
|
@@ -105,7 +105,7 @@ class RejectBinScaleController
|
|
|
105
105
|
|
|
106
106
|
return result.map((resultItem) => {
|
|
107
107
|
return (function(){
|
|
108
|
-
return RejectBinScaleModel.fromJSON(resultItem);
|
|
108
|
+
return RejectBinScaleModel.fromJSON(resultItem, siteId);
|
|
109
109
|
}());
|
|
110
110
|
});
|
|
111
111
|
}());
|
|
@@ -131,7 +131,7 @@ class RejectBinScaleController
|
|
|
131
131
|
RequestHelper.postRequest(`/packhouse/sites/${siteId}/reject-bin-scales`, createData)
|
|
132
132
|
.then((result) => {
|
|
133
133
|
let resolveValue = (function(){
|
|
134
|
-
return RejectBinScaleModel.fromJSON(result);
|
|
134
|
+
return RejectBinScaleModel.fromJSON(result, siteId);
|
|
135
135
|
}());
|
|
136
136
|
|
|
137
137
|
resolve(resolveValue);
|
|
@@ -166,7 +166,18 @@ export default RejectBinScaleController;
|
|
|
166
166
|
* @property {?string} [packrunSourceId] The Permanent Object that provides the Next Packrun for this Reject Bin Scale
|
|
167
167
|
* @property {?number} [packrunGroup] The Packrun Group this Reject Bin Scale is a part of
|
|
168
168
|
* @property {Object[]} [sources] An Array of Sources that deliver Fruit to this Reject Bin Scale
|
|
169
|
-
* @property {?number} [autoPackrunChange] The Auto Packrun Change Configuration for this Reject Bin Scale
|
|
169
|
+
* @property {?{delay: ?number}} [autoPackrunChange] The Auto Packrun Change Configuration for this Reject Bin Scale
|
|
170
|
+
* @property {?boolean} [supportsLiveWeighing] Whether this Reject Bin Scale supports Live Weighing
|
|
171
|
+
* @property {?number} [autoWeighingStartThreshold] The Minimum Weight Change Required to Automatically Start Live Weighing
|
|
172
|
+
* @property {?number} [autoWeighingStartDelay] The Delay in Milliseconds before Auto Live Weighing would Start
|
|
173
|
+
* @property {?number} [autoWeighingFinishThreshold] The Minimum Weight Change Required to Automatically Finish Live Weighing
|
|
174
|
+
* @property {?number} [autoWeighingFinishDelay] The Delay in Milliseconds before Auto Live Weighing would Finish
|
|
175
|
+
* @property {?number} [manualInterventionMaximumDuration] The Maximum Duration in Milliseconds before a Manual Intervention would end
|
|
176
|
+
* @property {?number} [liveWeighingIncreaseTolerance] The Maximum Weight Increase allowed within a single Live Weighing Update Interval
|
|
177
|
+
* @property {?number} [liveWeighingDecreaseTolerance] The Maximum Weight Decrease allowed within a single Live Weighing Update Interval
|
|
178
|
+
* @property {?number} [liveWeighingUpdateInterval] The Interval in Milliseconds between Live Weighing Updates
|
|
179
|
+
* @property {?boolean} [liveWeighingUsesStableStatus] Whether the Loadcell Stable Status is used to ignore Changes during Live Weighing
|
|
180
|
+
* @property {?number} [incorrectOperationTolerance] The Maximum Weight Change allowed while Live Weighing before an Incorrect Operation is Logged
|
|
170
181
|
* @property {?Object} [freshPackIntegration] The FreshPack Integration Configuration for this Reject Bin Scale
|
|
171
182
|
* @memberof Controllers.Packhouse.Site
|
|
172
183
|
*/
|
|
@@ -181,7 +192,18 @@ export default RejectBinScaleController;
|
|
|
181
192
|
* @property {?string} [packrunSourceId] The Permanent Object that provides the Next Packrun for this Reject Bin Scale
|
|
182
193
|
* @property {?number} [packrunGroup] The Packrun Group this Reject Bin Scale is a part of
|
|
183
194
|
* @property {Object[]} [sources] An Array of Sources that deliver Fruit to this Reject Bin Scale
|
|
184
|
-
* @property {?number} [autoPackrunChange] The Auto Packrun Change Configuration for this Reject Bin Scale
|
|
195
|
+
* @property {?{delay: ?number}} [autoPackrunChange] The Auto Packrun Change Configuration for this Reject Bin Scale
|
|
196
|
+
* @property {?boolean} [supportsLiveWeighing] Whether this Reject Bin Scale supports Live Weighing
|
|
197
|
+
* @property {?number} [autoWeighingStartThreshold] The Minimum Weight Change Required to Automatically Start Live Weighing
|
|
198
|
+
* @property {?number} [autoWeighingStartDelay] The Delay in Milliseconds before Auto Live Weighing would Start
|
|
199
|
+
* @property {?number} [autoWeighingFinishThreshold] The Minimum Weight Change Required to Automatically Finish Live Weighing
|
|
200
|
+
* @property {?number} [autoWeighingFinishDelay] The Delay in Milliseconds before Auto Live Weighing would Finish
|
|
201
|
+
* @property {?number} [manualInterventionMaximumDuration] The Maximum Duration in Milliseconds before a Manual Intervention would end
|
|
202
|
+
* @property {?number} [liveWeighingIncreaseTolerance] The Maximum Weight Increase allowed within a single Live Weighing Update Interval
|
|
203
|
+
* @property {?number} [liveWeighingDecreaseTolerance] The Maximum Weight Decrease allowed within a single Live Weighing Update Interval
|
|
204
|
+
* @property {?number} [liveWeighingUpdateInterval] The Interval in Milliseconds between Live Weighing Updates
|
|
205
|
+
* @property {?boolean} [liveWeighingUsesStableStatus] Whether the Loadcell Stable Status is used to ignore Changes during Live Weighing
|
|
206
|
+
* @property {?number} [incorrectOperationTolerance] The Maximum Weight Change allowed while Live Weighing before an Incorrect Operation is Logged
|
|
185
207
|
* @property {?Object} [freshPackIntegration] The FreshPack Integration Configuration for this Reject Bin Scale
|
|
186
208
|
* @memberof Controllers.Packhouse.Site
|
|
187
209
|
*/
|
|
@@ -29,7 +29,7 @@ class RejectBinWeightController
|
|
|
29
29
|
RequestHelper.getRequest(`/packhouse/sites/${siteId}/reject-bin-weights/${id}`)
|
|
30
30
|
.then((result) => {
|
|
31
31
|
let resolveValue = (function(){
|
|
32
|
-
return RejectBinWeightModel.fromJSON(result);
|
|
32
|
+
return RejectBinWeightModel.fromJSON(result, siteId);
|
|
33
33
|
}());
|
|
34
34
|
|
|
35
35
|
resolve(resolveValue);
|
|
@@ -54,7 +54,7 @@ class RejectBinWeightController
|
|
|
54
54
|
RequestHelper.patchRequest(`/packhouse/sites/${siteId}/reject-bin-weights/${id}`, updateData)
|
|
55
55
|
.then((result) => {
|
|
56
56
|
let resolveValue = (function(){
|
|
57
|
-
return RejectBinWeightModel.fromJSON(result);
|
|
57
|
+
return RejectBinWeightModel.fromJSON(result, siteId);
|
|
58
58
|
}());
|
|
59
59
|
|
|
60
60
|
resolve(resolveValue);
|
|
@@ -569,7 +569,7 @@ class RejectBinWeightController
|
|
|
569
569
|
|
|
570
570
|
return result.map((resultItem) => {
|
|
571
571
|
return (function(){
|
|
572
|
-
return RejectBinWeightModel.fromJSON(resultItem);
|
|
572
|
+
return RejectBinWeightModel.fromJSON(resultItem, siteId);
|
|
573
573
|
}());
|
|
574
574
|
});
|
|
575
575
|
}());
|
|
@@ -595,7 +595,7 @@ class RejectBinWeightController
|
|
|
595
595
|
RequestHelper.postRequest(`/packhouse/sites/${siteId}/reject-bin-weights`, createData)
|
|
596
596
|
.then((result) => {
|
|
597
597
|
let resolveValue = (function(){
|
|
598
|
-
return RejectBinWeightModel.fromJSON(result);
|
|
598
|
+
return RejectBinWeightModel.fromJSON(result, siteId);
|
|
599
599
|
}());
|
|
600
600
|
|
|
601
601
|
resolve(resolveValue);
|
|
@@ -29,7 +29,7 @@ class ShiftController
|
|
|
29
29
|
RequestHelper.getRequest(`/packhouse/sites/${siteId}/shifts/${id}`)
|
|
30
30
|
.then((result) => {
|
|
31
31
|
let resolveValue = (function(){
|
|
32
|
-
return ShiftModel.fromJSON(result);
|
|
32
|
+
return ShiftModel.fromJSON(result, siteId);
|
|
33
33
|
}());
|
|
34
34
|
|
|
35
35
|
resolve(resolveValue);
|
|
@@ -54,7 +54,7 @@ class ShiftController
|
|
|
54
54
|
RequestHelper.patchRequest(`/packhouse/sites/${siteId}/shifts/${id}`, updateData)
|
|
55
55
|
.then((result) => {
|
|
56
56
|
let resolveValue = (function(){
|
|
57
|
-
return ShiftModel.fromJSON(result);
|
|
57
|
+
return ShiftModel.fromJSON(result, siteId);
|
|
58
58
|
}());
|
|
59
59
|
|
|
60
60
|
resolve(resolveValue);
|
|
@@ -569,7 +569,7 @@ class ShiftController
|
|
|
569
569
|
|
|
570
570
|
return result.map((resultItem) => {
|
|
571
571
|
return (function(){
|
|
572
|
-
return ShiftModel.fromJSON(resultItem);
|
|
572
|
+
return ShiftModel.fromJSON(resultItem, siteId);
|
|
573
573
|
}());
|
|
574
574
|
});
|
|
575
575
|
}());
|
|
@@ -595,7 +595,7 @@ class ShiftController
|
|
|
595
595
|
RequestHelper.postRequest(`/packhouse/sites/${siteId}/shifts`, createData)
|
|
596
596
|
.then((result) => {
|
|
597
597
|
let resolveValue = (function(){
|
|
598
|
-
return ShiftModel.fromJSON(result);
|
|
598
|
+
return ShiftModel.fromJSON(result, siteId);
|
|
599
599
|
}());
|
|
600
600
|
|
|
601
601
|
resolve(resolveValue);
|
|
@@ -29,7 +29,7 @@ class ShiftFocusMeetingController
|
|
|
29
29
|
RequestHelper.getRequest(`/packhouse/sites/${siteId}/shift-focus-meetings/${id}`)
|
|
30
30
|
.then((result) => {
|
|
31
31
|
let resolveValue = (function(){
|
|
32
|
-
return ShiftFocusMeetingModel.fromJSON(result);
|
|
32
|
+
return ShiftFocusMeetingModel.fromJSON(result, siteId);
|
|
33
33
|
}());
|
|
34
34
|
|
|
35
35
|
resolve(resolveValue);
|
|
@@ -54,7 +54,7 @@ class ShiftFocusMeetingController
|
|
|
54
54
|
RequestHelper.patchRequest(`/packhouse/sites/${siteId}/shift-focus-meetings/${id}`, updateData)
|
|
55
55
|
.then((result) => {
|
|
56
56
|
let resolveValue = (function(){
|
|
57
|
-
return ShiftFocusMeetingModel.fromJSON(result);
|
|
57
|
+
return ShiftFocusMeetingModel.fromJSON(result, siteId);
|
|
58
58
|
}());
|
|
59
59
|
|
|
60
60
|
resolve(resolveValue);
|
|
@@ -569,7 +569,7 @@ class ShiftFocusMeetingController
|
|
|
569
569
|
|
|
570
570
|
return result.map((resultItem) => {
|
|
571
571
|
return (function(){
|
|
572
|
-
return ShiftFocusMeetingModel.fromJSON(resultItem);
|
|
572
|
+
return ShiftFocusMeetingModel.fromJSON(resultItem, siteId);
|
|
573
573
|
}());
|
|
574
574
|
});
|
|
575
575
|
}());
|
|
@@ -595,7 +595,7 @@ class ShiftFocusMeetingController
|
|
|
595
595
|
RequestHelper.postRequest(`/packhouse/sites/${siteId}/shift-focus-meetings`, createData)
|
|
596
596
|
.then((result) => {
|
|
597
597
|
let resolveValue = (function(){
|
|
598
|
-
return ShiftFocusMeetingModel.fromJSON(result);
|
|
598
|
+
return ShiftFocusMeetingModel.fromJSON(result, siteId);
|
|
599
599
|
}());
|
|
600
600
|
|
|
601
601
|
resolve(resolveValue);
|
|
@@ -29,7 +29,7 @@ class ShiftHourlyEntryController
|
|
|
29
29
|
RequestHelper.getRequest(`/packhouse/sites/${siteId}/shift-hourly-entries/${id}`)
|
|
30
30
|
.then((result) => {
|
|
31
31
|
let resolveValue = (function(){
|
|
32
|
-
return ShiftHourlyEntryModel.fromJSON(result);
|
|
32
|
+
return ShiftHourlyEntryModel.fromJSON(result, siteId);
|
|
33
33
|
}());
|
|
34
34
|
|
|
35
35
|
resolve(resolveValue);
|
|
@@ -54,7 +54,7 @@ class ShiftHourlyEntryController
|
|
|
54
54
|
RequestHelper.patchRequest(`/packhouse/sites/${siteId}/shift-hourly-entries/${id}`, updateData)
|
|
55
55
|
.then((result) => {
|
|
56
56
|
let resolveValue = (function(){
|
|
57
|
-
return ShiftHourlyEntryModel.fromJSON(result);
|
|
57
|
+
return ShiftHourlyEntryModel.fromJSON(result, siteId);
|
|
58
58
|
}());
|
|
59
59
|
|
|
60
60
|
resolve(resolveValue);
|
|
@@ -569,7 +569,7 @@ class ShiftHourlyEntryController
|
|
|
569
569
|
|
|
570
570
|
return result.map((resultItem) => {
|
|
571
571
|
return (function(){
|
|
572
|
-
return ShiftHourlyEntryModel.fromJSON(resultItem);
|
|
572
|
+
return ShiftHourlyEntryModel.fromJSON(resultItem, siteId);
|
|
573
573
|
}());
|
|
574
574
|
});
|
|
575
575
|
}());
|
|
@@ -595,7 +595,7 @@ class ShiftHourlyEntryController
|
|
|
595
595
|
RequestHelper.postRequest(`/packhouse/sites/${siteId}/shift-hourly-entries`, createData)
|
|
596
596
|
.then((result) => {
|
|
597
597
|
let resolveValue = (function(){
|
|
598
|
-
return ShiftHourlyEntryModel.fromJSON(result);
|
|
598
|
+
return ShiftHourlyEntryModel.fromJSON(result, siteId);
|
|
599
599
|
}());
|
|
600
600
|
|
|
601
601
|
resolve(resolveValue);
|