@axelor/aos-mobile-stock 6.4.2 → 6.5.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 +8 -8
- package/lib/api/customer-delivery-api.d.ts +3 -0
- package/lib/api/customer-delivery-api.js +42 -77
- package/lib/api/customer-delivery-api.js.map +1 -1
- package/lib/api/customer-delivery-line-api.js +15 -42
- package/lib/api/customer-delivery-line-api.js.map +1 -1
- package/lib/api/index.d.ts +2 -2
- package/lib/api/index.js +2 -2
- package/lib/api/index.js.map +1 -1
- package/lib/api/internal-move-api.d.ts +3 -0
- package/lib/api/internal-move-api.js +32 -62
- package/lib/api/internal-move-api.js.map +1 -1
- package/lib/api/internal-move-line-api.js +15 -39
- package/lib/api/internal-move-line-api.js.map +1 -1
- package/lib/api/inventory-api.js +24 -67
- package/lib/api/inventory-api.js.map +1 -1
- package/lib/api/inventory-line-api.js +15 -38
- package/lib/api/inventory-line-api.js.map +1 -1
- package/lib/api/partner-api.js +46 -131
- package/lib/api/partner-api.js.map +1 -1
- package/lib/api/product-api.d.ts +0 -1
- package/lib/api/product-api.js +44 -133
- package/lib/api/product-api.js.map +1 -1
- package/lib/api/stock-correction-api.d.ts +3 -0
- package/lib/api/stock-correction-api.js +14 -29
- package/lib/api/stock-correction-api.js.map +1 -1
- package/lib/api/stock-location-api.d.ts +0 -1
- package/lib/api/stock-location-api.js +18 -72
- package/lib/api/stock-location-api.js.map +1 -1
- package/lib/api/stock-location-line-api.js +41 -92
- package/lib/api/stock-location-line-api.js.map +1 -1
- package/lib/api/supplier-arrival-api.d.ts +3 -0
- package/lib/api/supplier-arrival-api.js +42 -76
- package/lib/api/supplier-arrival-api.js.map +1 -1
- package/lib/api/supplier-arrival-line-api.js +15 -42
- package/lib/api/supplier-arrival-line-api.js.map +1 -1
- package/lib/api/supplier-catalog-api.js +17 -27
- package/lib/api/supplier-catalog-api.js.map +1 -1
- package/lib/api/tracking-number-api.d.ts +0 -1
- package/lib/api/tracking-number-api.js +13 -61
- package/lib/api/tracking-number-api.js.map +1 -1
- package/lib/components/templates/customerDelivery/CustomerDeliveryLineButtons/CustomerDeliveryLineButtons.d.ts +1 -2
- package/lib/components/templates/customerDelivery/CustomerDeliveryLineButtons/CustomerDeliveryLineButtons.js +3 -2
- package/lib/components/templates/customerDelivery/CustomerDeliveryLineButtons/CustomerDeliveryLineButtons.js.map +1 -1
- package/lib/components/templates/customerDelivery/CustomerDeliveryRealizeButton/CustomerDeliveryRealizeButton.d.ts +1 -2
- package/lib/components/templates/customerDelivery/CustomerDeliveryRealizeButton/CustomerDeliveryRealizeButton.js +3 -2
- package/lib/components/templates/customerDelivery/CustomerDeliveryRealizeButton/CustomerDeliveryRealizeButton.js.map +1 -1
- package/lib/components/templates/customerDelivery/CustomerDeliveryViewAllContainer/CustomerDeliveryViewAllContainer.d.ts +1 -4
- package/lib/components/templates/customerDelivery/CustomerDeliveryViewAllContainer/CustomerDeliveryViewAllContainer.js +28 -4
- package/lib/components/templates/customerDelivery/CustomerDeliveryViewAllContainer/CustomerDeliveryViewAllContainer.js.map +1 -1
- package/lib/components/templates/internalMove/InternalMoveLineButtons/InternalMoveLineButtons.d.ts +1 -2
- package/lib/components/templates/internalMove/InternalMoveLineButtons/InternalMoveLineButtons.js +3 -2
- package/lib/components/templates/internalMove/InternalMoveLineButtons/InternalMoveLineButtons.js.map +1 -1
- package/lib/components/templates/internalMove/InternalMoveLineQuantityCard/InternalMoveLineQuantityCard.d.ts +1 -2
- package/lib/components/templates/internalMove/InternalMoveLineQuantityCard/InternalMoveLineQuantityCard.js +3 -2
- package/lib/components/templates/internalMove/InternalMoveLineQuantityCard/InternalMoveLineQuantityCard.js.map +1 -1
- package/lib/components/templates/internalMove/InternalMoveRealizeButton/InternalMoveRealizeButton.d.ts +1 -2
- package/lib/components/templates/internalMove/InternalMoveRealizeButton/InternalMoveRealizeButton.js +3 -2
- package/lib/components/templates/internalMove/InternalMoveRealizeButton/InternalMoveRealizeButton.js.map +1 -1
- package/lib/components/templates/internalMove/InternalMoveViewAllContainer/InternalMoveViewAllContainer.d.ts +1 -4
- package/lib/components/templates/internalMove/InternalMoveViewAllContainer/InternalMoveViewAllContainer.js +21 -4
- package/lib/components/templates/internalMove/InternalMoveViewAllContainer/InternalMoveViewAllContainer.js.map +1 -1
- package/lib/components/templates/inventory/InventoryButtons/InventoryButtons.d.ts +1 -3
- package/lib/components/templates/inventory/InventoryButtons/InventoryButtons.js +3 -2
- package/lib/components/templates/inventory/InventoryButtons/InventoryButtons.js.map +1 -1
- package/lib/components/templates/inventory/InventoryLineButtons/InventoryLineButtons.d.ts +1 -2
- package/lib/components/templates/inventory/InventoryLineButtons/InventoryLineButtons.js +3 -2
- package/lib/components/templates/inventory/InventoryLineButtons/InventoryLineButtons.js.map +1 -1
- package/lib/components/templates/inventory/InventoryViewAllContainer/InventoryViewAllContainer.d.ts +1 -3
- package/lib/components/templates/inventory/InventoryViewAllContainer/InventoryViewAllContainer.js +13 -4
- package/lib/components/templates/inventory/InventoryViewAllContainer/InventoryViewAllContainer.js.map +1 -1
- package/lib/components/templates/product/ProductSeeStockLocationDistribution/ProductSeeStockLocationDistribution.d.ts +1 -2
- package/lib/components/templates/product/ProductSeeStockLocationDistribution/ProductSeeStockLocationDistribution.js +3 -2
- package/lib/components/templates/product/ProductSeeStockLocationDistribution/ProductSeeStockLocationDistribution.js.map +1 -1
- package/lib/components/templates/product/ProductStockHeader/ProductStockHeader.d.ts +1 -2
- package/lib/components/templates/product/ProductStockHeader/ProductStockHeader.js +3 -2
- package/lib/components/templates/product/ProductStockHeader/ProductStockHeader.js.map +1 -1
- package/lib/components/templates/product/ProductVariantButton/ProductVariantButton.d.ts +1 -2
- package/lib/components/templates/product/ProductVariantButton/ProductVariantButton.js +3 -2
- package/lib/components/templates/product/ProductVariantButton/ProductVariantButton.js.map +1 -1
- package/lib/components/templates/stockCorrection/StockCorrectionButtons/StockCorrectionButtons.d.ts +1 -3
- package/lib/components/templates/stockCorrection/StockCorrectionButtons/StockCorrectionButtons.js +7 -4
- package/lib/components/templates/stockCorrection/StockCorrectionButtons/StockCorrectionButtons.js.map +1 -1
- package/lib/components/templates/stockCorrection/StockCorrectionProductCardInfo/StockCorrectionProductCardInfo.d.ts +1 -2
- package/lib/components/templates/stockCorrection/StockCorrectionProductCardInfo/StockCorrectionProductCardInfo.js +3 -1
- package/lib/components/templates/stockCorrection/StockCorrectionProductCardInfo/StockCorrectionProductCardInfo.js.map +1 -1
- package/lib/components/templates/supplierArrival/SupplierArrivalButtons/SupplierArrivalButtons.d.ts +1 -2
- package/lib/components/templates/supplierArrival/SupplierArrivalButtons/SupplierArrivalButtons.js +3 -2
- package/lib/components/templates/supplierArrival/SupplierArrivalButtons/SupplierArrivalButtons.js.map +1 -1
- package/lib/components/templates/supplierArrival/SupplierArrivalLineButtons/SupplierArrivalLineButtons.d.ts +1 -2
- package/lib/components/templates/supplierArrival/SupplierArrivalLineButtons/SupplierArrivalLineButtons.js +4 -3
- package/lib/components/templates/supplierArrival/SupplierArrivalLineButtons/SupplierArrivalLineButtons.js.map +1 -1
- package/lib/components/templates/supplierArrival/SupplierArrivalTrackingNumberSelect/SupplierArrivalTrackingNumberSelect.d.ts +1 -2
- package/lib/components/templates/supplierArrival/SupplierArrivalTrackingNumberSelect/SupplierArrivalTrackingNumberSelect.js +3 -2
- package/lib/components/templates/supplierArrival/SupplierArrivalTrackingNumberSelect/SupplierArrivalTrackingNumberSelect.js.map +1 -1
- package/lib/components/templates/supplierArrival/SupplierArrivalViewAllContainer/SupplierArrivalViewAllContainer.d.ts +1 -4
- package/lib/components/templates/supplierArrival/SupplierArrivalViewAllContainer/SupplierArrivalViewAllContainer.js +20 -3
- package/lib/components/templates/supplierArrival/SupplierArrivalViewAllContainer/SupplierArrivalViewAllContainer.js.map +1 -1
- package/lib/features/asyncFunctions-index.d.ts +4 -4
- package/lib/features/asyncFunctions-index.js +4 -4
- package/lib/features/asyncFunctions-index.js.map +1 -1
- package/lib/features/customerDeliverySlice.d.ts +11 -0
- package/lib/features/customerDeliverySlice.js +18 -1
- package/lib/features/customerDeliverySlice.js.map +1 -1
- package/lib/features/index.d.ts +1 -1
- package/lib/features/index.js +1 -1
- package/lib/features/index.js.map +1 -1
- package/lib/features/internalMoveSlice.d.ts +11 -0
- package/lib/features/internalMoveSlice.js +18 -1
- package/lib/features/internalMoveSlice.js.map +1 -1
- package/lib/features/partnerSlice.js +3 -3
- package/lib/features/partnerSlice.js.map +1 -1
- package/lib/features/stockCorrectionSlice.d.ts +15 -3
- package/lib/features/stockCorrectionSlice.js +27 -4
- package/lib/features/stockCorrectionSlice.js.map +1 -1
- package/lib/features/supplierArrivalSlice.d.ts +11 -0
- package/lib/features/supplierArrivalSlice.js +21 -4
- package/lib/features/supplierArrivalSlice.js.map +1 -1
- package/lib/hooks/use-stock-header-actions.d.ts +1 -0
- package/lib/hooks/use-stock-header-actions.js +163 -0
- package/lib/hooks/use-stock-header-actions.js.map +1 -0
- package/lib/i18n/en.json +2 -0
- package/lib/i18n/fr.json +2 -0
- package/lib/index.js +10 -1
- package/lib/index.js.map +1 -1
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.js +21 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +211 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +34 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +47 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryDetailScreen.js +13 -32
- package/lib/screens/customerDeliveries/CustomerDeliveryDetailScreen.js.map +1 -1
- package/lib/screens/customerDeliveries/CustomerDeliveryLineDetailScreen.js +1 -1
- package/lib/screens/customerDeliveries/CustomerDeliveryLineDetailScreen.js.map +1 -1
- package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js +4 -4
- package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js.map +1 -1
- package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.js +6 -6
- package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.js.map +1 -1
- package/lib/screens/customerDeliveries/index.d.ts +1 -0
- package/lib/screens/customerDeliveries/index.js +1 -0
- package/lib/screens/customerDeliveries/index.js.map +1 -1
- package/lib/screens/internalMoves/InternalMoveDetailsGeneralScreen.js +11 -23
- package/lib/screens/internalMoves/InternalMoveDetailsGeneralScreen.js.map +1 -1
- package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js +2 -2
- package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js.map +1 -1
- package/lib/screens/internalMoves/InternalMoveLineListScreen.js +3 -3
- package/lib/screens/internalMoves/InternalMoveLineListScreen.js.map +1 -1
- package/lib/screens/internalMoves/InternalMoveListScreen.js +4 -11
- package/lib/screens/internalMoves/InternalMoveListScreen.js.map +1 -1
- package/lib/screens/internalMoves/index.d.ts +3 -0
- package/lib/screens/internalMoves/index.js +2 -0
- package/lib/screens/internalMoves/index.js.map +1 -1
- package/lib/screens/inventories/InventoryLineDetailsScreen.js +1 -1
- package/lib/screens/inventories/InventoryLineDetailsScreen.js.map +1 -1
- package/lib/screens/inventories/InventoryLineListScreen.js +3 -3
- package/lib/screens/inventories/InventoryLineListScreen.js.map +1 -1
- package/lib/screens/inventories/InventoryListScreen.js +3 -3
- package/lib/screens/inventories/InventoryListScreen.js.map +1 -1
- package/lib/screens/inventories/InventoryPlannedDetailsScreen.js +9 -12
- package/lib/screens/inventories/InventoryPlannedDetailsScreen.js.map +1 -1
- package/lib/screens/inventories/InventoryStartedDetailsScreen.js +7 -14
- package/lib/screens/inventories/InventoryStartedDetailsScreen.js.map +1 -1
- package/lib/screens/inventories/index.d.ts +3 -0
- package/lib/screens/inventories/index.js +2 -0
- package/lib/screens/inventories/index.js.map +1 -1
- package/lib/screens/products/ProductDetailsScreen.js +3 -9
- package/lib/screens/products/ProductDetailsScreen.js.map +1 -1
- package/lib/screens/products/ProductListVariantScreen.js +3 -2
- package/lib/screens/products/ProductListVariantScreen.js.map +1 -1
- package/lib/screens/products/ProductStockDetailsScreen.js +14 -15
- package/lib/screens/products/ProductStockDetailsScreen.js.map +1 -1
- package/lib/screens/products/ProductStockLocationDetailsScreen.js +1 -1
- package/lib/screens/products/ProductStockLocationDetailsScreen.js.map +1 -1
- package/lib/screens/products/index.d.ts +3 -0
- package/lib/screens/products/index.js +2 -0
- package/lib/screens/products/index.js.map +1 -1
- package/lib/screens/stockCorrections/StockCorrectionDetailsScreen.d.ts +1 -2
- package/lib/screens/stockCorrections/StockCorrectionDetailsScreen.js +72 -40
- package/lib/screens/stockCorrections/StockCorrectionDetailsScreen.js.map +1 -1
- package/lib/screens/stockCorrections/StockCorrectionListScreen.js +7 -14
- package/lib/screens/stockCorrections/StockCorrectionListScreen.js.map +1 -1
- package/lib/screens/stockCorrections/index.d.ts +3 -0
- package/lib/screens/stockCorrections/index.js +2 -0
- package/lib/screens/stockCorrections/index.js.map +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalDetailsScreen.js +14 -12
- package/lib/screens/supplierArrivals/SupplierArrivalDetailsScreen.js.map +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalLineDetailScreen.js +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalLineDetailScreen.js.map +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js.map +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalListScreen.js +3 -3
- package/lib/screens/supplierArrivals/SupplierArrivalListScreen.js.map +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalSelectTrackingScreen.js +1 -1
- package/lib/screens/supplierArrivals/SupplierArrivalSelectTrackingScreen.js.map +1 -1
- package/lib/screens/supplierArrivals/index.d.ts +1 -0
- package/lib/screens/supplierArrivals/index.js +1 -0
- package/lib/screens/supplierArrivals/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Stock
|
|
3
|
+
tags: Readme
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
<h1 align="center">@axelor/aos-mobile-stock</h1>
|
|
2
7
|
|
|
3
8
|
<div align="center">
|
|
@@ -6,7 +11,7 @@
|
|
|
6
11
|
|
|
7
12
|
## Presentation
|
|
8
13
|
|
|
9
|
-
This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
|
|
14
|
+
This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
|
|
10
15
|
|
|
11
16
|
The purpose of this package is to link with the stock module of the [Axelor Open Suite (AOS)](https://github.com/axelor/axelor-open-suite) ERP. It provides a simplified version of a number of processes available on the webapp. This package is compatible with AOS from version 6.4.0.
|
|
12
17
|
|
|
@@ -20,7 +25,7 @@ yarn add @axelor/aos-mobile-stock
|
|
|
20
25
|
|
|
21
26
|
Compatibility with React v18.2.x and React Native v0.68.x.
|
|
22
27
|
|
|
23
|
-
To add this package in your application, you need to add it the
|
|
28
|
+
To add this package in your application, you need to add it the _modules_ props of the component `Application` from @axelor/aos-mobile-core package.
|
|
24
29
|
|
|
25
30
|
```typescript
|
|
26
31
|
import React from 'react';
|
|
@@ -28,12 +33,7 @@ import {Application} from '@axelor/aos-mobile-core';
|
|
|
28
33
|
import {StockModule} from '@axelor/aos-mobile-stock';
|
|
29
34
|
|
|
30
35
|
const App = () => {
|
|
31
|
-
return
|
|
32
|
-
<Application
|
|
33
|
-
modules={[StockModule]}
|
|
34
|
-
mainMenu="auth_menu_user"
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
36
|
+
return <Application modules={[StockModule]} mainMenu="auth_menu_user" />;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export default App;
|
|
@@ -2,6 +2,9 @@ export function searchDeliveryFilter({ searchValue, page }: {
|
|
|
2
2
|
searchValue?: any;
|
|
3
3
|
page?: number;
|
|
4
4
|
}): Promise<any>;
|
|
5
|
+
export function fetchCustomerDelivery({ customerDeliveryId }: {
|
|
6
|
+
customerDeliveryId: any;
|
|
7
|
+
}): Promise<any>;
|
|
5
8
|
export function addLineStockMove({ stockMoveId, productId, unitId, trackingNumberId, expectedQty, realQty, }: {
|
|
6
9
|
stockMoveId: any;
|
|
7
10
|
productId: any;
|
|
@@ -15,87 +15,52 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
18
|
+
import { axiosApiProvider, createStandardFetch, createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
19
|
import StockMove from '../types/stock-move';
|
|
20
|
-
const deliveryFields = [
|
|
21
|
-
'id',
|
|
22
|
-
'availableStatusSelect',
|
|
23
|
-
'filterOnAvailableProducts',
|
|
24
|
-
'name',
|
|
25
|
-
'stockMoveLineList',
|
|
26
|
-
'stockMoveSeq',
|
|
27
|
-
'fromStockLocation',
|
|
28
|
-
'toAddress',
|
|
29
|
-
'toAddressStr',
|
|
30
|
-
'company',
|
|
31
|
-
'originId',
|
|
32
|
-
'origin',
|
|
33
|
-
'createdOn',
|
|
34
|
-
'estimatedDate',
|
|
35
|
-
'realDate',
|
|
36
|
-
'partner',
|
|
37
|
-
'statusSelect',
|
|
38
|
-
'pickingOrderComments',
|
|
39
|
-
'deliveryCondition',
|
|
40
|
-
'isIspmRequired',
|
|
41
|
-
];
|
|
42
|
-
const sortByFields = [
|
|
43
|
-
'statusSelect',
|
|
44
|
-
'-realDate',
|
|
45
|
-
'estimatedDate',
|
|
46
|
-
'stockMoveSeq',
|
|
47
|
-
];
|
|
48
20
|
const createSearchCriteria = searchValue => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
value: searchValue,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
return criteria;
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
fieldName: 'isReversion',
|
|
24
|
+
operator: '=',
|
|
25
|
+
value: false,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
fieldName: 'typeSelect',
|
|
29
|
+
operator: '=',
|
|
30
|
+
value: StockMove.type.outgoing,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
operator: 'OR',
|
|
34
|
+
criteria: [
|
|
35
|
+
{
|
|
36
|
+
fieldName: 'statusSelect',
|
|
37
|
+
operator: '=',
|
|
38
|
+
value: StockMove.status.Planned,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
fieldName: 'statusSelect',
|
|
42
|
+
operator: '=',
|
|
43
|
+
value: StockMove.status.Realized,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
getSearchCriterias('stock_customerDelivery', searchValue),
|
|
48
|
+
];
|
|
81
49
|
};
|
|
82
50
|
export async function searchDeliveryFilter({ searchValue = null, page = 0 }) {
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
limit: 10,
|
|
97
|
-
offset: 10 * page,
|
|
98
|
-
},
|
|
51
|
+
return createStandardSearch({
|
|
52
|
+
model: 'com.axelor.apps.stock.db.StockMove',
|
|
53
|
+
criteria: createSearchCriteria(searchValue),
|
|
54
|
+
fieldKey: 'stock_customerDelivery',
|
|
55
|
+
sortKey: 'stock_customerDelivery',
|
|
56
|
+
page,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export async function fetchCustomerDelivery({ customerDeliveryId }) {
|
|
60
|
+
return createStandardFetch({
|
|
61
|
+
model: 'com.axelor.apps.stock.db.StockMove',
|
|
62
|
+
id: customerDeliveryId,
|
|
63
|
+
fieldKey: 'stock_customerDelivery',
|
|
99
64
|
});
|
|
100
65
|
}
|
|
101
66
|
export async function addLineStockMove({ stockMoveId, productId, unitId, trackingNumberId, expectedQty, realQty, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-delivery-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"customer-delivery-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAE5C,MAAM,oBAAoB,GAAG,WAAW,CAAC,EAAE;IACzC,OAAO;QACL;YACE,SAAS,EAAE,aAAa;YACxB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,KAAK;SACb;QACD;YACE,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ;SAC/B;QACD;YACE,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE;gBACR;oBACE,SAAS,EAAE,cAAc;oBACzB,Q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AC,WAAW,EAAE,OAAO,EAAC;IAC1D,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,8BAA8B,WAAW,EAAE;QAChD,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -15,45 +15,19 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
19
|
-
const customerDeliveryLineFields = [
|
|
20
|
-
'id',
|
|
21
|
-
'product',
|
|
22
|
-
'availableStatusSelect',
|
|
23
|
-
'trackingNumber',
|
|
24
|
-
'unit',
|
|
25
|
-
'qty',
|
|
26
|
-
'realQty',
|
|
27
|
-
'locker',
|
|
28
|
-
'name',
|
|
29
|
-
'saleOrderLine.pickingOrderInfo',
|
|
30
|
-
'product.name',
|
|
31
|
-
'product.trackingNumberConfiguration',
|
|
32
|
-
'isRealQtyModifiedByUser',
|
|
33
|
-
];
|
|
18
|
+
import { axiosApiProvider, createStandardFetch, createStandardSearch, } from '@axelor/aos-mobile-core';
|
|
34
19
|
export async function searchCustomerDeliveryLines({ page = 0, customerDeliveryId, }) {
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
criteria: [
|
|
43
|
-
{
|
|
44
|
-
fieldName: 'stockMove.id',
|
|
45
|
-
operator: '=',
|
|
46
|
-
value: customerDeliveryId,
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
],
|
|
20
|
+
return createStandardSearch({
|
|
21
|
+
model: 'com.axelor.apps.stock.db.StockMoveLine',
|
|
22
|
+
criteria: [
|
|
23
|
+
{
|
|
24
|
+
fieldName: 'stockMove.id',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: customerDeliveryId,
|
|
51
27
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
offset: 10 * page,
|
|
56
|
-
},
|
|
28
|
+
],
|
|
29
|
+
fieldKey: 'stock_customerDeliveryLine',
|
|
30
|
+
page,
|
|
57
31
|
});
|
|
58
32
|
}
|
|
59
33
|
export async function updateLine({ stockMoveLineId, version, realQty }) {
|
|
@@ -66,11 +40,10 @@ export async function updateLine({ stockMoveLineId, version, realQty }) {
|
|
|
66
40
|
});
|
|
67
41
|
}
|
|
68
42
|
export async function fetchCustomerDeliveryLine({ customerDeliveryLineId }) {
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
43
|
+
return createStandardFetch({
|
|
44
|
+
model: 'com.axelor.apps.stock.db.StockMoveLine',
|
|
45
|
+
id: customerDeliveryLineId,
|
|
46
|
+
fieldKey: 'stock_customerDeliveryLine',
|
|
74
47
|
});
|
|
75
48
|
}
|
|
76
49
|
//# sourceMappingURL=customer-delivery-line-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-delivery-line-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"customer-delivery-line-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,EAChD,IAAI,GAAG,CAAC,EACR,kBAAkB,GACnB;IACC,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,wCAAwC;QAC/C,QAAQ,EAAE;YACR;gBACE,SAAS,EAAE,cAAc;gBACzB,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,kBAAkB;aAC1B;SACF;QACD,QAAQ,EAAE,4BAA4B;QACtC,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAAC,eAAe,EAAE,OAAO,EAAE,OAAO,EAAC;IAClE,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2BAA2B,eAAe,EAAE;QACjD,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,EAAC,sBAAsB,EAAC;IACtE,OAAO,mBAAmB,CAAC;QACzB,KAAK,EAAE,wCAAwC;QAC/C,EAAE,EAAE,sBAAsB;QAC1B,QAAQ,EAAE,4BAA4B;KACvC,CAAC,CAAC;AACL,CAAC"}
|
package/lib/api/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { addLineStockMove as addCustomerDeliveryLine, searchDeliveryFilter, realizeSockMove as realizeCustomerDeliveryApi, } from './customer-delivery-api';
|
|
2
2
|
export { searchCustomerDeliveryLines, updateLine as updateCustomerDeliveryLineApi, } from './customer-delivery-line-api';
|
|
3
|
-
export { searchInternalMoveFilter, realizeInternalMove as realizeInternalMoveApi, createInternalStockMove, } from './internal-move-api';
|
|
3
|
+
export { fetchInternalMove as fetchInternalMoveApi, searchInternalMoveFilter, realizeInternalMove as realizeInternalMoveApi, createInternalStockMove, } from './internal-move-api';
|
|
4
4
|
export { searchInternalMoveLines, updateInternalMoveLine as updateInternalMoveLineApi, } from './internal-move-line-api';
|
|
5
5
|
export * from './inventory-api';
|
|
6
6
|
export * from './inventory-line-api';
|
|
7
7
|
export * from './partner-api';
|
|
8
8
|
export * from './product-api';
|
|
9
|
-
export { createStockCorrection, updateStockCorrection, searchStockCorrection, } from './stock-correction-api';
|
|
9
|
+
export { fetchStockCorrection as fetchStockCorrectionApi, createStockCorrection, updateStockCorrection, searchStockCorrection, } from './stock-correction-api';
|
|
10
10
|
export * from './stock-correction-reason-api';
|
|
11
11
|
export * from './stock-location-api';
|
|
12
12
|
export * from './stock-location-line-api';
|
package/lib/api/index.js
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export { addLineStockMove as addCustomerDeliveryLine, searchDeliveryFilter, realizeSockMove as realizeCustomerDeliveryApi, } from './customer-delivery-api';
|
|
19
19
|
export { searchCustomerDeliveryLines, updateLine as updateCustomerDeliveryLineApi, } from './customer-delivery-line-api';
|
|
20
|
-
export { searchInternalMoveFilter, realizeInternalMove as realizeInternalMoveApi, createInternalStockMove, } from './internal-move-api';
|
|
20
|
+
export { fetchInternalMove as fetchInternalMoveApi, searchInternalMoveFilter, realizeInternalMove as realizeInternalMoveApi, createInternalStockMove, } from './internal-move-api';
|
|
21
21
|
export { searchInternalMoveLines, updateInternalMoveLine as updateInternalMoveLineApi, } from './internal-move-line-api';
|
|
22
22
|
export * from './inventory-api';
|
|
23
23
|
export * from './inventory-line-api';
|
|
24
24
|
export * from './partner-api';
|
|
25
25
|
export * from './product-api';
|
|
26
|
-
export { createStockCorrection, updateStockCorrection, searchStockCorrection, } from './stock-correction-api';
|
|
26
|
+
export { fetchStockCorrection as fetchStockCorrectionApi, createStockCorrection, updateStockCorrection, searchStockCorrection, } from './stock-correction-api';
|
|
27
27
|
export * from './stock-correction-reason-api';
|
|
28
28
|
export * from './stock-location-api';
|
|
29
29
|
export * from './stock-location-line-api';
|
package/lib/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,IAAI,uBAAuB,EAC3C,oBAAoB,EACpB,eAAe,IAAI,0BAA0B,GAC9C,MAAM,yBAAyB,CAA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AqB,CAAC;AAC7B,OAAO,EACL,uBAAuB,EACvB,sBAAsB,IAAI,yBAAyB,GACpD,MAAM,0BAA0B,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,oBAAoB,IAAI,uBAAuB,EAC/C,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,IAAI,sBAAsB,EAC1C,eAAe,IAAI,yBAAyB,GAC7C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,0BAA0B,EAC1B,UAAU,IAAI,4BAA4B,GAC3C,MAAM,6BAA6B,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
|
|
@@ -2,6 +2,9 @@ export function searchInternalMoveFilter({ searchValue, page }: {
|
|
|
2
2
|
searchValue?: any;
|
|
3
3
|
page?: number;
|
|
4
4
|
}): Promise<any>;
|
|
5
|
+
export function fetchInternalMove({ internalMoveId }: {
|
|
6
|
+
internalMoveId: any;
|
|
7
|
+
}): Promise<any>;
|
|
5
8
|
export function createInternalStockMove({ productId, companyId, originStockLocationId, destStockLocationId, unitId, trackingNumberId, movedQty, }: {
|
|
6
9
|
productId: any;
|
|
7
10
|
companyId: any;
|
|
@@ -15,73 +15,43 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
18
|
+
import { axiosApiProvider, createStandardFetch, createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
19
|
import StockLocation from '../types/stock-location';
|
|
20
20
|
import StockMove from '../types/stock-move';
|
|
21
|
-
const internalMoveFields = [
|
|
22
|
-
'name',
|
|
23
|
-
'stockMoveSeq',
|
|
24
|
-
'statusSelect',
|
|
25
|
-
'availableStatusSelect',
|
|
26
|
-
'fromStockLocation',
|
|
27
|
-
'toStockLocation',
|
|
28
|
-
'origin',
|
|
29
|
-
'createdOn',
|
|
30
|
-
'realDate',
|
|
31
|
-
'estimatedDate',
|
|
32
|
-
'stockMoveLineList',
|
|
33
|
-
'note',
|
|
34
|
-
'pickingOrderComments',
|
|
35
|
-
];
|
|
36
|
-
const sortByFields = [
|
|
37
|
-
'statusSelect',
|
|
38
|
-
'-realDate',
|
|
39
|
-
'estimatedDate',
|
|
40
|
-
'stockMoveSeq',
|
|
41
|
-
];
|
|
42
21
|
const createSearchCriteria = searchValue => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fieldName: 'stockMoveSeq',
|
|
62
|
-
operator: 'like',
|
|
63
|
-
value: searchValue,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return criteria;
|
|
22
|
+
return [
|
|
23
|
+
{
|
|
24
|
+
fieldName: 'fromStockLocation.typeSelect',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: StockLocation.type.internal,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
fieldName: 'toStockLocation.typeSelect',
|
|
30
|
+
operator: '=',
|
|
31
|
+
value: StockLocation.type.internal,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
fieldName: 'typeSelect',
|
|
35
|
+
operator: '=',
|
|
36
|
+
value: StockMove.type.internal,
|
|
37
|
+
},
|
|
38
|
+
getSearchCriterias('stock_internalMove', searchValue),
|
|
39
|
+
];
|
|
67
40
|
};
|
|
68
41
|
export async function searchInternalMoveFilter({ searchValue = null, page = 0 }) {
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
limit: 10,
|
|
83
|
-
offset: 10 * page,
|
|
84
|
-
},
|
|
42
|
+
return createStandardSearch({
|
|
43
|
+
model: 'com.axelor.apps.stock.db.StockMove',
|
|
44
|
+
criteria: createSearchCriteria(searchValue),
|
|
45
|
+
fieldKey: 'stock_internalMove',
|
|
46
|
+
sortKey: 'stock_internalMove',
|
|
47
|
+
page,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export async function fetchInternalMove({ internalMoveId }) {
|
|
51
|
+
return createStandardFetch({
|
|
52
|
+
model: 'com.axelor.apps.stock.db.StockMove',
|
|
53
|
+
id: internalMoveId,
|
|
54
|
+
fieldKey: 'stock_internalMove',
|
|
85
55
|
});
|
|
86
56
|
}
|
|
87
57
|
export async function createInternalStockMove({ productId, companyId, originStockLocationId, destStockLocationId, unitId, trackingNumberId, movedQty, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-move-api.js","sourceRoot":"","sources":["../../src/api/internal-move-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"internal-move-api.js","sourceRoot":"","sources":["../../src/api/internal-move-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,aAAa,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AAE;YACJ,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;YACpB,qBAAqB,EAAE,qBAAqB;YAC5C,mBAAmB,EAAE,mBAAmB;YACxC,MAAM,EAAE,MAAM;YACd,gBAAgB,EAAE,gBAAgB;YAClC,QAAQ,EAAE,QAAQ;SACnB;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EAAC,WAAW,EAAE,OAAO,EAAC;IAC9D,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,8BAA8B,WAAW,EAAE;QAChD,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -15,42 +15,19 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
19
|
-
const internalMoveLineFields = [
|
|
20
|
-
'id',
|
|
21
|
-
'product',
|
|
22
|
-
'availableStatusSelect',
|
|
23
|
-
'trackingNumber',
|
|
24
|
-
'unit',
|
|
25
|
-
'qty',
|
|
26
|
-
'realQty',
|
|
27
|
-
'product.name',
|
|
28
|
-
'product.trackingNumberConfiguration',
|
|
29
|
-
'isRealQtyModifiedByUser',
|
|
30
|
-
];
|
|
18
|
+
import { axiosApiProvider, createStandardFetch, createStandardSearch, } from '@axelor/aos-mobile-core';
|
|
31
19
|
export async function searchInternalMoveLines({ internalMoveId, page = 0 }) {
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
criteria: [
|
|
40
|
-
{
|
|
41
|
-
fieldName: 'stockMove.id',
|
|
42
|
-
operator: '=',
|
|
43
|
-
value: internalMoveId,
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
],
|
|
20
|
+
return createStandardSearch({
|
|
21
|
+
model: 'com.axelor.apps.stock.db.StockMoveLine',
|
|
22
|
+
criteria: [
|
|
23
|
+
{
|
|
24
|
+
fieldName: 'stockMove.id',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: internalMoveId,
|
|
48
27
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
offset: 10 * page,
|
|
53
|
-
},
|
|
28
|
+
],
|
|
29
|
+
fieldKey: 'stock_internalMoveLine',
|
|
30
|
+
page,
|
|
54
31
|
});
|
|
55
32
|
}
|
|
56
33
|
export async function updateInternalMoveLine({ stockMoveLineId, version, realQty, unitId, }) {
|
|
@@ -64,11 +41,10 @@ export async function updateInternalMoveLine({ stockMoveLineId, version, realQty
|
|
|
64
41
|
});
|
|
65
42
|
}
|
|
66
43
|
export async function fetchInternalMoveLine({ internalMoveLineId }) {
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},
|
|
44
|
+
return createStandardFetch({
|
|
45
|
+
model: 'com.axelor.apps.stock.db.StockMoveLine',
|
|
46
|
+
id: internalMoveLineId,
|
|
47
|
+
fieldKey: 'stock_internalMoveLine',
|
|
72
48
|
});
|
|
73
49
|
}
|
|
74
50
|
//# sourceMappingURL=internal-move-line-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-move-line-api.js","sourceRoot":"","sources":["../../src/api/internal-move-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"internal-move-line-api.js","sourceRoot":"","sources":["../../src/api/internal-move-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAAC,cAAc,EAAE,IAAI,GAAG,CAAC,EAAC;IACtE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,wCAAwC;QAC/C,QAAQ,EAAE;YACR;gBACE,SAAS,EAAE,cAAc;gBACzB,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,cAAc;aACtB;SACF;QACD,QAAQ,EAAE,wBAAwB;QAClC,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,eAAe,EACf,OAAO,EACP,OAAO,EACP,MAAM,GACP;IACC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,2BAA2B,eAAe,EAAE;QACjD,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,MAAM;SACf;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAAC,kBAAkB,EAAC;IAC9D,OAAO,mBAAmB,CAAC;QACzB,KAAK,EAAE,wCAAwC;QAC/C,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,wBAAwB;KACnC,CAAC,CAAC;AACL,CAAC"}
|
package/lib/api/inventory-api.js
CHANGED
|
@@ -15,80 +15,37 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import { axiosApiProvider } from '@axelor/aos-mobile-core';
|
|
18
|
+
import { axiosApiProvider, createStandardFetch, createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
19
|
import Inventory from '../types/inventory';
|
|
20
|
-
const inventoryFields = [
|
|
21
|
-
'id',
|
|
22
|
-
'stockLocation',
|
|
23
|
-
'company',
|
|
24
|
-
'inventorySeq',
|
|
25
|
-
'inventoryTitle',
|
|
26
|
-
'createdOn',
|
|
27
|
-
'updatedOn',
|
|
28
|
-
'plannedStartDateT',
|
|
29
|
-
'plannedEndDateT',
|
|
30
|
-
'validatedOn',
|
|
31
|
-
'typeSelect',
|
|
32
|
-
'statusSelect',
|
|
33
|
-
'product',
|
|
34
|
-
'description',
|
|
35
|
-
'version',
|
|
36
|
-
'fromRack',
|
|
37
|
-
'toRack',
|
|
38
|
-
'productCategory',
|
|
39
|
-
'productFamily',
|
|
40
|
-
];
|
|
41
|
-
const sortByFields = [
|
|
42
|
-
'statusSelect',
|
|
43
|
-
'-validatedOn',
|
|
44
|
-
'plannedStartDateT',
|
|
45
|
-
'inventorySeq',
|
|
46
|
-
];
|
|
47
20
|
const createSearchCriteria = searchValue => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
operator: 'like',
|
|
62
|
-
value: searchValue,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return criteria;
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
fieldName: 'statusSelect',
|
|
24
|
+
operator: '!=',
|
|
25
|
+
value: Inventory.status.Draft,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
fieldName: 'statusSelect',
|
|
29
|
+
operator: '!=',
|
|
30
|
+
value: Inventory.status.Canceled,
|
|
31
|
+
},
|
|
32
|
+
getSearchCriterias('stock_inventory', searchValue),
|
|
33
|
+
];
|
|
66
34
|
};
|
|
67
35
|
export async function fetchInventory({ inventoryId }) {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
36
|
+
return createStandardFetch({
|
|
37
|
+
model: 'com.axelor.apps.stock.db.Inventory',
|
|
38
|
+
id: inventoryId,
|
|
39
|
+
fieldKey: 'stock_inventory',
|
|
73
40
|
});
|
|
74
41
|
}
|
|
75
42
|
export async function searchInventoryFilter({ searchValue, page = 0 }) {
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
operator: 'and',
|
|
83
|
-
criteria: createSearchCriteria(searchValue),
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
fields: inventoryFields,
|
|
88
|
-
sortBy: sortByFields,
|
|
89
|
-
limit: 10,
|
|
90
|
-
offset: 10 * page,
|
|
91
|
-
},
|
|
43
|
+
return createStandardSearch({
|
|
44
|
+
model: 'com.axelor.apps.stock.db.Inventory',
|
|
45
|
+
criteria: createSearchCriteria(searchValue),
|
|
46
|
+
fieldKey: 'stock_inventory',
|
|
47
|
+
sortKey: 'stock_inventory',
|
|
48
|
+
page,
|
|
92
49
|
});
|
|
93
50
|
}
|
|
94
51
|
export async function modifyDescriptionInventory({ inventoryId, description, version, }) {
|