@axelor/aos-mobile-stock 8.1.7 → 8.2.0

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.
Files changed (194) hide show
  1. package/lib/api/index.d.ts +4 -2
  2. package/lib/api/index.js +4 -2
  3. package/lib/api/index.js.map +1 -1
  4. package/lib/api/product-indicators-api.d.ts +20 -0
  5. package/lib/api/product-indicators-api.js +181 -0
  6. package/lib/api/product-indicators-api.js.map +1 -0
  7. package/lib/api/stock-move-line-api.d.ts +3 -0
  8. package/lib/api/stock-move-line-api.js +24 -0
  9. package/lib/api/stock-move-line-api.js.map +1 -0
  10. package/lib/api/supplier-arrival-line-api.d.ts +4 -0
  11. package/lib/api/supplier-arrival-line-api.js +8 -0
  12. package/lib/api/supplier-arrival-line-api.js.map +1 -1
  13. package/lib/api/tracking-number-api.d.ts +7 -1
  14. package/lib/api/tracking-number-api.js +27 -2
  15. package/lib/api/tracking-number-api.js.map +1 -1
  16. package/lib/components/atoms/OrderQtyIndicatorCard/OrderQtyIndicatorCard.d.ts +17 -0
  17. package/lib/components/atoms/OrderQtyIndicatorCard/OrderQtyIndicatorCard.js +68 -0
  18. package/lib/components/atoms/OrderQtyIndicatorCard/OrderQtyIndicatorCard.js.map +1 -0
  19. package/lib/components/atoms/StockQtyIndicatorCard/StockQtyIndicatorCard.d.ts +16 -0
  20. package/lib/components/atoms/StockQtyIndicatorCard/StockQtyIndicatorCard.js +73 -0
  21. package/lib/components/atoms/StockQtyIndicatorCard/StockQtyIndicatorCard.js.map +1 -0
  22. package/lib/components/atoms/index.d.ts +2 -0
  23. package/lib/components/atoms/index.js +20 -0
  24. package/lib/components/atoms/index.js.map +1 -0
  25. package/lib/components/index.d.ts +1 -0
  26. package/lib/components/index.js +1 -0
  27. package/lib/components/index.js.map +1 -1
  28. package/lib/components/organisms/StockMoveHeader/StockMoveHeader.d.ts +2 -1
  29. package/lib/components/organisms/StockMoveHeader/StockMoveHeader.js +22 -21
  30. package/lib/components/organisms/StockMoveHeader/StockMoveHeader.js.map +1 -1
  31. package/lib/components/organisms/index.d.ts +0 -1
  32. package/lib/components/organisms/index.js +0 -1
  33. package/lib/components/organisms/index.js.map +1 -1
  34. package/lib/components/templates/customerDelivery/CustomerDeliveryLineCard/CustomerDeliveryLineCard.d.ts +2 -1
  35. package/lib/components/templates/customerDelivery/CustomerDeliveryLineCard/CustomerDeliveryLineCard.js +31 -21
  36. package/lib/components/templates/customerDelivery/CustomerDeliveryLineCard/CustomerDeliveryLineCard.js.map +1 -1
  37. package/lib/components/templates/customerDelivery/CustomerDeliveryLineQuantityCard/CustomerDeliveryLineQuantityCard.js +2 -3
  38. package/lib/components/templates/customerDelivery/CustomerDeliveryLineQuantityCard/CustomerDeliveryLineQuantityCard.js.map +1 -1
  39. package/lib/components/templates/customerDelivery/CustomerDeliverySearchLineContainer/CustomerDeliverySearchLineContainer.js +1 -1
  40. package/lib/components/templates/customerDelivery/CustomerDeliverySearchLineContainer/CustomerDeliverySearchLineContainer.js.map +1 -1
  41. package/lib/components/templates/internalMove/InternalMoveCreationQuantityCard/InternalMoveCreationQuantityCard.js +2 -3
  42. package/lib/components/templates/internalMove/InternalMoveCreationQuantityCard/InternalMoveCreationQuantityCard.js.map +1 -1
  43. package/lib/components/templates/internalMove/InternalMoveLineCard/InternalMoveLineCard.d.ts +2 -1
  44. package/lib/components/templates/internalMove/InternalMoveLineCard/InternalMoveLineCard.js +22 -15
  45. package/lib/components/templates/internalMove/InternalMoveLineCard/InternalMoveLineCard.js.map +1 -1
  46. package/lib/components/templates/internalMove/InternalMoveLineQuantityCard/InternalMoveLineQuantityCard.js +2 -3
  47. package/lib/components/templates/internalMove/InternalMoveLineQuantityCard/InternalMoveLineQuantityCard.js.map +1 -1
  48. package/lib/components/templates/internalMove/InternalMoveSearchLineContainer/InternalMoveSearchLineContainer.js +1 -1
  49. package/lib/components/templates/internalMove/InternalMoveSearchLineContainer/InternalMoveSearchLineContainer.js.map +1 -1
  50. package/lib/components/templates/internalMove/index.d.ts +0 -2
  51. package/lib/components/templates/internalMove/index.js +0 -2
  52. package/lib/components/templates/internalMove/index.js.map +1 -1
  53. package/lib/components/templates/inventory/InventoryLineQuantityCard/InventoryLineQuantityCard.js +2 -3
  54. package/lib/components/templates/inventory/InventoryLineQuantityCard/InventoryLineQuantityCard.js.map +1 -1
  55. package/lib/components/templates/product/AvailableStockIndicatorCard/AvailableStockIndicatorCard.d.ts +11 -0
  56. package/lib/components/templates/product/{ProductStockLocationCard/ProductStockLocationCard.js → AvailableStockIndicatorCard/AvailableStockIndicatorCard.js} +30 -34
  57. package/lib/components/templates/product/AvailableStockIndicatorCard/AvailableStockIndicatorCard.js.map +1 -0
  58. package/lib/components/templates/product/ProductCard/ProductCard.js.map +1 -1
  59. package/lib/components/templates/product/ProductCardStockIndicatorList/ProductCardStockIndicatorList.d.ts +5 -1
  60. package/lib/components/templates/product/ProductCardStockIndicatorList/ProductCardStockIndicatorList.js +60 -34
  61. package/lib/components/templates/product/ProductCardStockIndicatorList/ProductCardStockIndicatorList.js.map +1 -1
  62. package/lib/components/templates/product/ProductSeeStockLocationDistribution/ProductSeeStockLocationDistribution.d.ts +1 -2
  63. package/lib/components/templates/product/ProductSeeStockLocationDistribution/ProductSeeStockLocationDistribution.js +4 -3
  64. package/lib/components/templates/product/ProductSeeStockLocationDistribution/ProductSeeStockLocationDistribution.js.map +1 -1
  65. package/lib/components/templates/product/index.d.ts +1 -1
  66. package/lib/components/templates/product/index.js +1 -1
  67. package/lib/components/templates/product/index.js.map +1 -1
  68. package/lib/components/templates/stockCorrection/StockCorrectionQuantityCard/StockCorrectionQuantityCard.js +2 -3
  69. package/lib/components/templates/stockCorrection/StockCorrectionQuantityCard/StockCorrectionQuantityCard.js.map +1 -1
  70. package/lib/components/templates/supplierArrival/SupplierArrivalLineActionCard/SupplierArrivalLineActionCard.d.ts +9 -0
  71. package/lib/components/templates/supplierArrival/SupplierArrivalLineActionCard/SupplierArrivalLineActionCard.js +53 -0
  72. package/lib/components/templates/supplierArrival/SupplierArrivalLineActionCard/SupplierArrivalLineActionCard.js.map +1 -0
  73. package/lib/components/templates/supplierArrival/SupplierArrivalLineButtons/SupplierArrivalLineButtons.d.ts +3 -1
  74. package/lib/components/templates/supplierArrival/SupplierArrivalLineButtons/SupplierArrivalLineButtons.js +12 -1
  75. package/lib/components/templates/supplierArrival/SupplierArrivalLineButtons/SupplierArrivalLineButtons.js.map +1 -1
  76. package/lib/components/templates/supplierArrival/SupplierArrivalLineCard/SupplierArrivalLineCard.js +5 -1
  77. package/lib/components/templates/supplierArrival/SupplierArrivalLineCard/SupplierArrivalLineCard.js.map +1 -1
  78. package/lib/components/templates/supplierArrival/SupplierArrivalLineQuantityCard/SupplierArrivalLineQuantityCard.js +2 -3
  79. package/lib/components/templates/supplierArrival/SupplierArrivalLineQuantityCard/SupplierArrivalLineQuantityCard.js.map +1 -1
  80. package/lib/components/templates/supplierArrival/SupplierArrivalOriginInput/SupplierArrivalOriginInput.d.ts +8 -0
  81. package/lib/components/templates/supplierArrival/SupplierArrivalOriginInput/SupplierArrivalOriginInput.js +29 -0
  82. package/lib/components/templates/supplierArrival/SupplierArrivalOriginInput/SupplierArrivalOriginInput.js.map +1 -0
  83. package/lib/components/templates/supplierArrival/SupplierArrivalSearchLineContainer/SupplierArrivalSearchLineContainer.js +4 -6
  84. package/lib/components/templates/supplierArrival/SupplierArrivalSearchLineContainer/SupplierArrivalSearchLineContainer.js.map +1 -1
  85. package/lib/components/templates/supplierArrival/index.d.ts +2 -0
  86. package/lib/components/templates/supplierArrival/index.js +2 -0
  87. package/lib/components/templates/supplierArrival/index.js.map +1 -1
  88. package/lib/features/asyncFunctions-index.d.ts +3 -3
  89. package/lib/features/asyncFunctions-index.js +3 -3
  90. package/lib/features/asyncFunctions-index.js.map +1 -1
  91. package/lib/features/customerDeliveryLineSlice.d.ts +40 -4
  92. package/lib/features/customerDeliverySlice.d.ts +40 -4
  93. package/lib/features/internalMoveLineSlice.d.ts +40 -4
  94. package/lib/features/internalMoveSlice.d.ts +40 -4
  95. package/lib/features/inventoryLineSlice.d.ts +50 -5
  96. package/lib/features/inventorySlice.d.ts +40 -4
  97. package/lib/features/partnerSlice.d.ts +20 -2
  98. package/lib/features/productIndicatorsSlice.d.ts +86 -3
  99. package/lib/features/productIndicatorsSlice.js +78 -1
  100. package/lib/features/productIndicatorsSlice.js.map +1 -1
  101. package/lib/features/productSlice.d.ts +30 -3
  102. package/lib/features/productTrackingNumberSlice.d.ts +10 -1
  103. package/lib/features/productVariantSlice.d.ts +20 -2
  104. package/lib/features/racksListSlice.d.ts +10 -1
  105. package/lib/features/stockCorrectionReasonSlice.d.ts +10 -1
  106. package/lib/features/stockCorrectionSlice.d.ts +50 -5
  107. package/lib/features/stockLocationLineSlice.d.ts +20 -2
  108. package/lib/features/stockLocationSlice.d.ts +20 -2
  109. package/lib/features/supplierArrivalLineSlice.d.ts +40 -3
  110. package/lib/features/supplierArrivalLineSlice.js +12 -1
  111. package/lib/features/supplierArrivalLineSlice.js.map +1 -1
  112. package/lib/features/supplierArrivalSlice.d.ts +40 -4
  113. package/lib/features/supplierCatalogSlice.d.ts +10 -1
  114. package/lib/features/trackingNumberSlice.d.ts +50 -4
  115. package/lib/features/trackingNumberSlice.js +10 -1
  116. package/lib/features/trackingNumberSlice.js.map +1 -1
  117. package/lib/features/unitSlice.d.ts +10 -1
  118. package/lib/hooks/index.d.ts +2 -1
  119. package/lib/hooks/index.js +2 -1
  120. package/lib/hooks/index.js.map +1 -1
  121. package/lib/hooks/stock-list-availability.d.ts +3 -0
  122. package/lib/hooks/{stock-location-lines-availability.js → stock-list-availability.js} +9 -10
  123. package/lib/hooks/stock-list-availability.js.map +1 -0
  124. package/lib/hooks/stock-move-lines.d.ts +1 -0
  125. package/lib/hooks/stock-move-lines.js +35 -0
  126. package/lib/hooks/stock-move-lines.js.map +1 -0
  127. package/lib/i18n/en.json +17 -3
  128. package/lib/i18n/fr.json +17 -3
  129. package/lib/models/objectFields.js +44 -1
  130. package/lib/models/objectFields.js.map +1 -1
  131. package/lib/models/typeObjects.js +153 -3
  132. package/lib/models/typeObjects.js.map +1 -1
  133. package/lib/screens/customerDeliveries/CustomerDeliveryLineDetailScreen.js +1 -1
  134. package/lib/screens/customerDeliveries/CustomerDeliveryLineDetailScreen.js.map +1 -1
  135. package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js +1 -1
  136. package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js.map +1 -1
  137. package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.js.map +1 -1
  138. package/lib/screens/customerDeliveries/CustomerDeliverySelectProductScreen.js +1 -1
  139. package/lib/screens/customerDeliveries/CustomerDeliverySelectProductScreen.js.map +1 -1
  140. package/lib/screens/customerDeliveries/CustomerDeliverySelectTrackingScreen.js +1 -1
  141. package/lib/screens/customerDeliveries/CustomerDeliverySelectTrackingScreen.js.map +1 -1
  142. package/lib/screens/internalMoves/InternalMoveCreationScreen.js +11 -5
  143. package/lib/screens/internalMoves/InternalMoveCreationScreen.js.map +1 -1
  144. package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js +1 -1
  145. package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js.map +1 -1
  146. package/lib/screens/internalMoves/InternalMoveLineListScreen.js +1 -1
  147. package/lib/screens/internalMoves/InternalMoveLineListScreen.js.map +1 -1
  148. package/lib/screens/internalMoves/InternalMoveSelectProductScreen.js +1 -1
  149. package/lib/screens/internalMoves/InternalMoveSelectProductScreen.js.map +1 -1
  150. package/lib/screens/internalMoves/InternalMoveSelectTrackingScreen.js +1 -1
  151. package/lib/screens/internalMoves/InternalMoveSelectTrackingScreen.js.map +1 -1
  152. package/lib/screens/products/ProductDetailsScreen.js +4 -1
  153. package/lib/screens/products/ProductDetailsScreen.js.map +1 -1
  154. package/lib/screens/products/ProductStockDetailsScreen.d.ts +2 -1
  155. package/lib/screens/products/ProductStockDetailsScreen.js +12 -6
  156. package/lib/screens/products/ProductStockDetailsScreen.js.map +1 -1
  157. package/lib/screens/products/ProductStockIndicatorDetails.d.ts +5 -0
  158. package/lib/screens/products/ProductStockIndicatorDetails.js +167 -0
  159. package/lib/screens/products/ProductStockIndicatorDetails.js.map +1 -0
  160. package/lib/screens/products/index.d.ts +11 -16
  161. package/lib/screens/products/index.js +6 -9
  162. package/lib/screens/products/index.js.map +1 -1
  163. package/lib/screens/supplierArrivals/SupplierArrivalAddTrackingScreen.js +10 -7
  164. package/lib/screens/supplierArrivals/SupplierArrivalAddTrackingScreen.js.map +1 -1
  165. package/lib/screens/supplierArrivals/SupplierArrivalLineDetailScreen.js +7 -2
  166. package/lib/screens/supplierArrivals/SupplierArrivalLineDetailScreen.js.map +1 -1
  167. package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js +2 -6
  168. package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js.map +1 -1
  169. package/lib/types/index.d.ts +2 -1
  170. package/lib/types/index.js +2 -1
  171. package/lib/types/index.js.map +1 -1
  172. package/lib/types/stock-indicator.d.ts +11 -0
  173. package/lib/types/stock-indicator.js +29 -0
  174. package/lib/types/stock-indicator.js.map +1 -0
  175. package/package.json +12 -11
  176. package/lib/components/organisms/QuantityCard/QuantityCard.d.ts +0 -15
  177. package/lib/components/organisms/QuantityCard/QuantityCard.js +0 -101
  178. package/lib/components/organisms/QuantityCard/QuantityCard.js.map +0 -1
  179. package/lib/components/templates/internalMove/InternalMoveCreationAlert/InternalMoveCreationAlert.d.ts +0 -10
  180. package/lib/components/templates/internalMove/InternalMoveCreationAlert/InternalMoveCreationAlert.js +0 -82
  181. package/lib/components/templates/internalMove/InternalMoveCreationAlert/InternalMoveCreationAlert.js.map +0 -1
  182. package/lib/components/templates/internalMove/InternalMoveCreationViewAll/InternalMoveCreationViewAll.d.ts +0 -10
  183. package/lib/components/templates/internalMove/InternalMoveCreationViewAll/InternalMoveCreationViewAll.js +0 -50
  184. package/lib/components/templates/internalMove/InternalMoveCreationViewAll/InternalMoveCreationViewAll.js.map +0 -1
  185. package/lib/components/templates/internalMove/InternalMoveCreationViewAll/LineComponent.d.ts +0 -8
  186. package/lib/components/templates/internalMove/InternalMoveCreationViewAll/LineComponent.js +0 -51
  187. package/lib/components/templates/internalMove/InternalMoveCreationViewAll/LineComponent.js.map +0 -1
  188. package/lib/components/templates/product/ProductStockLocationCard/ProductStockLocationCard.d.ts +0 -11
  189. package/lib/components/templates/product/ProductStockLocationCard/ProductStockLocationCard.js.map +0 -1
  190. package/lib/hooks/stock-location-lines-availability.d.ts +0 -3
  191. package/lib/hooks/stock-location-lines-availability.js.map +0 -1
  192. package/lib/screens/products/ProductStockLocationDetailsScreen.d.ts +0 -5
  193. package/lib/screens/products/ProductStockLocationDetailsScreen.js +0 -95
  194. package/lib/screens/products/ProductStockLocationDetailsScreen.js.map +0 -1
@@ -6,12 +6,14 @@ export * from './inventory-api';
6
6
  export { addTrackingNumber, createInventoryLine, fetchInventoryLine as fetchInventoryLineApi, searchInventoryLines, updateInventoryLineDetails, } from './inventory-line-api';
7
7
  export * from './partner-api';
8
8
  export * from './product-api';
9
+ export { fetchAvailableStockIndicator as fetchAvailableStockIndicatorApi, fetchPurchaseOrderQtyIndicator as fetchPurchaseOrderQtyIndicatorApi, fetchSaleOrderQtyIndicator as fetchSaleOrderQtyIndicatorApi, fetchStockQtyIndicator as fetchStockQtyIndicatorApi, } from './product-indicators-api';
9
10
  export { createStockCorrection, fetchStockCorrection as fetchStockCorrectionApi, searchStockCorrection, updateStockCorrection, updateStockCorrectionTrackingNumber, } from './stock-correction-api';
10
11
  export * from './stock-correction-reason-api';
11
12
  export * from './stock-location-api';
12
13
  export { searchAvailableProducts as searchAvailableProductsApi, searchStockLocationLine, } from './stock-location-line-api';
14
+ export { checkQuantity as checkQuantityApi } from './stock-move-line-api';
13
15
  export { addLineStockMove as addSupplierArrivalLine, fetchSupplierArrival as fetchSupplierArrivalApi, realizeSockMove as realizeSupplierArrivalApi, searchSupplierArrivalFilter, } from './supplier-arrival-api';
14
- export { fetchSupplierArrivalLine as fetchSupplierArrivalLineApi, searchSupplierArrivalLines, updateLine as updateSupplierArrivalLineApi, } from './supplier-arrival-line-api';
16
+ export { fetchSupplierArrivalLine as fetchSupplierArrivalLineApi, searchSupplierArrivalLines, splitSupplierArrivalLine as splitSupplierArrivalLineApi, updateLine as updateSupplierArrivalLineApi, } from './supplier-arrival-line-api';
15
17
  export * from './supplier-catalog-api';
16
- export * from './tracking-number-api';
18
+ export { createTrackingNumber as createTrackingNumberApi, searchTrackingNumberFilter as searchTrackingNumberFilterApi, updateStockMoveLineTrackingNumber as updateStockMoveLineTrackingNumberApi, updateTrackingNumber as updateTrackingNumberApi, } from './tracking-number-api';
17
19
  export * from './unit-api';
package/lib/api/index.js CHANGED
@@ -23,13 +23,15 @@ export * from './inventory-api';
23
23
  export { addTrackingNumber, createInventoryLine, fetchInventoryLine as fetchInventoryLineApi, searchInventoryLines, updateInventoryLineDetails, } from './inventory-line-api';
24
24
  export * from './partner-api';
25
25
  export * from './product-api';
26
+ export { fetchAvailableStockIndicator as fetchAvailableStockIndicatorApi, fetchPurchaseOrderQtyIndicator as fetchPurchaseOrderQtyIndicatorApi, fetchSaleOrderQtyIndicator as fetchSaleOrderQtyIndicatorApi, fetchStockQtyIndicator as fetchStockQtyIndicatorApi, } from './product-indicators-api';
26
27
  export { createStockCorrection, fetchStockCorrection as fetchStockCorrectionApi, searchStockCorrection, updateStockCorrection, updateStockCorrectionTrackingNumber, } from './stock-correction-api';
27
28
  export * from './stock-correction-reason-api';
28
29
  export * from './stock-location-api';
29
30
  export { searchAvailableProducts as searchAvailableProductsApi, searchStockLocationLine, } from './stock-location-line-api';
31
+ export { checkQuantity as checkQuantityApi } from './stock-move-line-api';
30
32
  export { addLineStockMove as addSupplierArrivalLine, fetchSupplierArrival as fetchSupplierArrivalApi, realizeSockMove as realizeSupplierArrivalApi, searchSupplierArrivalFilter, } from './supplier-arrival-api';
31
- export { fetchSupplierArrivalLine as fetchSupplierArrivalLineApi, searchSupplierArrivalLines, updateLine as updateSupplierArrivalLineApi, } from './supplier-arrival-line-api';
33
+ export { fetchSupplierArrivalLine as fetchSupplierArrivalLineApi, searchSupplierArrivalLines, splitSupplierArrivalLine as splitSupplierArrivalLineApi, updateLine as updateSupplierArrivalLineApi, } from './supplier-arrival-line-api';
32
34
  export * from './supplier-catalog-api';
33
- export * from './tracking-number-api';
35
+ export { createTrackingNumber as createTrackingNumberApi, searchTrackingNumberFilter as searchTrackingNumberFilterApi, updateStockMoveLineTrackingNumber as updateStockMoveLineTrackingNumberApi, updateTrackingNumber as updateTrackingNumberApi, } from './tracking-number-api';
34
36
  export * from './unit-api';
35
37
  //# sourceMappingURL=index.js.map
@@ -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,qBAAqB,IAAI,wBAAwB,EACjD,eAAe,IAAI,0BAA0B,EAC7C,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,2BAA2B,EAC3B,UAAU,IAAI,6BAA6B,EAC3C,yBAAyB,IAAI,4BAA4B,GAC1D,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,oBAAoB,EACzC,uBAAuB,EACvB,mBAAmB,IAAI,sBAAsB,EAC7C,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,IAAI,wBAAwB,EACjD,uBAAuB,EACvB,sBAAsB,IAAI,yBAAyB,GACpD,MAAM,0BAA0B,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,IAAI,qBAAqB,EAC3C,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,cAAc,eAAe,C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, }: {
2
+ status: any;
3
+ isAllocatedQty: any;
4
+ productId: any;
5
+ stockLocationId: any;
6
+ companyId: any;
7
+ page?: number;
8
+ }): Promise<any>;
9
+ export function fetchSaleOrderQtyIndicator({ productId, page }: {
10
+ productId: any;
11
+ page?: number;
12
+ }): Promise<any>;
13
+ export function fetchPurchaseOrderQtyIndicator({ productId, page }: {
14
+ productId: any;
15
+ page?: number;
16
+ }): Promise<any>;
17
+ export function fetchAvailableStockIndicator({ productId, page }: {
18
+ productId: any;
19
+ page?: number;
20
+ }): Promise<any>;
@@ -0,0 +1,181 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { createStandardSearch, getTypes } from '@axelor/aos-mobile-core';
19
+ const createStockQtyCriteria = (status, isAllocatedQty, productId, stockLocationId, companyId) => {
20
+ const criteria = [
21
+ {
22
+ fieldName: 'stockMove.statusSelect',
23
+ operator: '=',
24
+ value: status,
25
+ },
26
+ {
27
+ fieldName: 'product.id',
28
+ operator: '=',
29
+ value: productId,
30
+ },
31
+ ];
32
+ if (isAllocatedQty) {
33
+ criteria.push({
34
+ fieldName: 'reservedQty',
35
+ operator: '>',
36
+ value: 0,
37
+ });
38
+ }
39
+ if (stockLocationId != null) {
40
+ criteria.push({
41
+ operator: 'or',
42
+ criteria: [
43
+ {
44
+ fieldName: 'toStockLocation.id',
45
+ operator: '=',
46
+ value: stockLocationId,
47
+ },
48
+ {
49
+ fieldName: 'fromStockLocation.id',
50
+ operator: '=',
51
+ value: stockLocationId,
52
+ },
53
+ ],
54
+ });
55
+ }
56
+ if (companyId != null) {
57
+ criteria.push({
58
+ fieldName: 'stockMove.company.id',
59
+ operator: '=',
60
+ value: companyId,
61
+ });
62
+ }
63
+ return criteria;
64
+ };
65
+ const createSaleOrderQtyCriteria = productId => {
66
+ const SaleOrder = getTypes().Stock_SaleOrder;
67
+ const SaleOrderLine = getTypes().Stock_SaleOrderLine;
68
+ const criteria = [
69
+ {
70
+ fieldName: 'saleOrder.statusSelect',
71
+ operator: '=',
72
+ value: SaleOrder?.statusSelect.OrderConfirmed,
73
+ },
74
+ {
75
+ fieldName: 'deliveryState',
76
+ operator: '!=',
77
+ value: SaleOrderLine?.deliveryState.Delivered,
78
+ },
79
+ {
80
+ fieldName: 'product.id',
81
+ operator: '=',
82
+ value: productId,
83
+ },
84
+ ];
85
+ return criteria;
86
+ };
87
+ const createPurchaseOrderQtyCriteria = productId => {
88
+ const PurchaseOrder = getTypes().Stock_PurchaseOrder;
89
+ const PurchaseOrderLine = getTypes().Stock_PurchaseOrderLine;
90
+ const criteria = [
91
+ {
92
+ fieldName: 'purchaseOrder.statusSelect',
93
+ operator: '=',
94
+ value: PurchaseOrder?.statusSelect.Validated,
95
+ },
96
+ {
97
+ fieldName: 'receiptState',
98
+ operator: '!=',
99
+ value: PurchaseOrderLine?.receiptState.Received,
100
+ },
101
+ {
102
+ fieldName: 'product.id',
103
+ operator: '=',
104
+ value: productId,
105
+ },
106
+ ];
107
+ return criteria;
108
+ };
109
+ const createAvailableStockCriteria = productId => {
110
+ const StockLocation = getTypes().StockLocation;
111
+ const criteria = [
112
+ {
113
+ fieldName: 'stockLocation.typeSelect',
114
+ operator: '!=',
115
+ value: StockLocation?.typeSelect.virtual,
116
+ },
117
+ {
118
+ fieldName: 'stockLocation.isNotInCalculStock',
119
+ operator: '=',
120
+ value: false,
121
+ },
122
+ {
123
+ operator: 'or',
124
+ criteria: [
125
+ {
126
+ fieldName: 'currentQty',
127
+ operator: '>',
128
+ value: 0,
129
+ },
130
+ {
131
+ fieldName: 'futureQty',
132
+ operator: '>',
133
+ value: 0,
134
+ },
135
+ ],
136
+ },
137
+ {
138
+ fieldName: 'product.id',
139
+ operator: '=',
140
+ value: productId,
141
+ },
142
+ ];
143
+ return criteria;
144
+ };
145
+ export async function fetchStockQtyIndicator({ status, isAllocatedQty, productId, stockLocationId, companyId, page = 0, }) {
146
+ return createStandardSearch({
147
+ model: 'com.axelor.apps.stock.db.StockMoveLine',
148
+ criteria: createStockQtyCriteria(status, isAllocatedQty, productId, stockLocationId, companyId),
149
+ fieldKey: 'stock_stockQtyIndicator',
150
+ page,
151
+ provider: 'model',
152
+ });
153
+ }
154
+ export async function fetchSaleOrderQtyIndicator({ productId, page = 0 }) {
155
+ return createStandardSearch({
156
+ model: 'com.axelor.apps.sale.db.SaleOrderLine',
157
+ criteria: createSaleOrderQtyCriteria(productId),
158
+ fieldKey: 'stock_saleOrderQtyIndicator',
159
+ page,
160
+ provider: 'model',
161
+ });
162
+ }
163
+ export async function fetchPurchaseOrderQtyIndicator({ productId, page = 0 }) {
164
+ return createStandardSearch({
165
+ model: 'com.axelor.apps.purchase.db.PurchaseOrderLine',
166
+ criteria: createPurchaseOrderQtyCriteria(productId),
167
+ fieldKey: 'stock_purchaseOrderQtyIndicator',
168
+ page,
169
+ provider: 'model',
170
+ });
171
+ }
172
+ export async function fetchAvailableStockIndicator({ productId, page = 0 }) {
173
+ return createStandardSearch({
174
+ model: 'com.axelor.apps.stock.db.StockLocationLine',
175
+ criteria: createAvailableStockCriteria(productId),
176
+ fieldKey: 'stock_stockLocationLine',
177
+ page,
178
+ provider: 'model',
179
+ });
180
+ }
181
+ //# sourceMappingURL=product-indicators-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-indicators-api.js","sourceRoot":"","sources":["../../src/api/product-indicators-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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AQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EAAC,SAAS,EAAE,IAAI,GAAG,CAAC,EAAC;IACtE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,4CAA4C;QACnD,QAAQ,EAAE,4BAA4B,CAAC,SAAS,CAAC;QACjD,QAAQ,EAAE,yBAAyB;QACnC,IAAI;QACJ,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ export function checkQuantity({ stockMoveLineId }: {
2
+ stockMoveLineId: any;
3
+ }): Promise<any>;
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { axiosApiProvider } from '@axelor/aos-mobile-core';
19
+ export async function checkQuantity({ stockMoveLineId }) {
20
+ return axiosApiProvider.get({
21
+ url: `ws/aos/stock-move-line/check-quantity/${stockMoveLineId}`,
22
+ });
23
+ }
24
+ //# sourceMappingURL=stock-move-line-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stock-move-line-api.js","sourceRoot":"","sources":["../../src/api/stock-move-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAAC,eAAe,EAAC;IACnD,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,yCAAyC,eAAe,EAAE;KAChE,CAAC,CAAC;AACL,CAAC"}
@@ -13,3 +13,7 @@ export function updateLine({ stockMoveLineId, version, realQty, conformity: _con
13
13
  export function fetchSupplierArrivalLine({ supplierArrivalLineId }: {
14
14
  supplierArrivalLineId: any;
15
15
  }): Promise<any>;
16
+ export function splitSupplierArrivalLine({ id, version }: {
17
+ id: any;
18
+ version: any;
19
+ }): Promise<void>;
@@ -73,4 +73,12 @@ export async function fetchSupplierArrivalLine({ supplierArrivalLineId }) {
73
73
  provider: 'model',
74
74
  });
75
75
  }
76
+ export async function splitSupplierArrivalLine({ id, version }) {
77
+ return getActionApi().send({
78
+ url: `ws/aos/stock-move-line/split/${id}`,
79
+ method: 'put',
80
+ body: { version },
81
+ description: 'split supplier arrival line',
82
+ });
83
+ }
76
84
  //# sourceMappingURL=supplier-arrival-line-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"supplier-arrival-line-api.js","sourceRoot":"","sources":["../../src/api/supplier-arrival-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,GACT,MAAM,yBAAyB,CAAC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,iBAAiB,EAAE,WAAW,EAAE,EAAE;IAC9D,OAAO;QACL;YACE,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,iBAAiB;SACzB;QACD,kBAAkB,CAAC,2BAA2B,EAAE,WAAW,CAAC;KAC7D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,EAC/C,iBAAiB,EACjB,WAAW,EACX,IAAI,GAAG,CAAC,GACT;IACC,OAAO,oBAAoB,CAAC;QAC1B,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OAAO;gBACP,OAAO;gBACP,iBAAiB;aAClB;QACP,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE;YACR,SAAS,EAAE,wCAAwC;YACnD,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE;gBACN,UAAU,EAAE,kBAAkB;gBAC9B,OAAO;gBACP,iBAAiB,EAAE,oBAAoB;aACxC;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAAC,qBAAqB,EAAC;IACpE,OAAO,mBAAmB,CAAC;QACzB,KAAK,EAAE,wCAAwC;QAC/C,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,2BAA2B;QACrC,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAAC,EAAE,EAAE,OAAO,EAAC;IAC1D,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC;QACzB,GAAG,EAAE,gCAAgC,EAAE,EAAE;QACzC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,EAAC,OAAO,EAAC;QACf,WAAW,EAAE,6BAA6B;KAC3C,CAAC,CAAC;AACL,CAAC"}
@@ -3,13 +3,19 @@ export function searchTrackingNumberFilter({ productId, searchValue, page, }: {
3
3
  searchValue: any;
4
4
  page?: number;
5
5
  }): Promise<any>;
6
- export function createTrackingNumber({ qty, product, trackingNumberSeq }: {
6
+ export function createTrackingNumber({ qty, product, trackingNumberSeq, origin, }: {
7
7
  qty: any;
8
8
  product: any;
9
9
  trackingNumberSeq: any;
10
+ origin: any;
10
11
  }): Promise<void>;
11
12
  export function updateStockMoveLineTrackingNumber({ stockMoveLineId, stockMoveLineVersion, trackingNumber, }: {
12
13
  stockMoveLineId: any;
13
14
  stockMoveLineVersion: any;
14
15
  trackingNumber: any;
15
16
  }): Promise<void>;
17
+ export function updateTrackingNumber({ id, origin, ...trackingNumber }: {
18
+ [x: string]: any;
19
+ id: any;
20
+ origin: any;
21
+ }): Promise<void>;
@@ -15,7 +15,7 @@
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 { createStandardSearch, getActionApi, getSearchCriterias, } from '@axelor/aos-mobile-core';
18
+ import { createStandardSearch, formatRequestBody, getActionApi, getSearchCriterias, } from '@axelor/aos-mobile-core';
19
19
  const createSearchCriteria = (productId, searchValue) => {
20
20
  const criteria = [getSearchCriterias('stock_trackingNumber', searchValue)];
21
21
  if (productId != null) {
@@ -37,7 +37,7 @@ export async function searchTrackingNumberFilter({ productId = null, searchValue
37
37
  provider: 'model',
38
38
  });
39
39
  }
40
- export async function createTrackingNumber({ qty, product, trackingNumberSeq }) {
40
+ export async function createTrackingNumber({ qty, product, trackingNumberSeq, origin, }) {
41
41
  return getActionApi().send({
42
42
  url: '/ws/rest/com.axelor.apps.stock.db.TrackingNumber',
43
43
  method: 'put',
@@ -46,6 +46,7 @@ export async function createTrackingNumber({ qty, product, trackingNumberSeq })
46
46
  counter: qty,
47
47
  product,
48
48
  trackingNumberSeq,
49
+ origin,
49
50
  },
50
51
  },
51
52
  description: 'create tracking number',
@@ -56,6 +57,7 @@ export async function createTrackingNumber({ qty, product, trackingNumberSeq })
56
57
  'data.counter': 'counter',
57
58
  'data.product': 'product',
58
59
  'data.trackingNumberSeq': 'trackingNumberSeq',
60
+ 'data.origin': 'origin',
59
61
  },
60
62
  },
61
63
  });
@@ -79,4 +81,27 @@ export async function updateStockMoveLineTrackingNumber({ stockMoveLineId, stock
79
81
  },
80
82
  });
81
83
  }
84
+ export async function updateTrackingNumber({ id, origin, ...trackingNumber }) {
85
+ const { matchers } = formatRequestBody(trackingNumber, 'data');
86
+ return getActionApi().send({
87
+ url: `/ws/rest/com.axelor.apps.stock.db.TrackingNumber/${id}`,
88
+ method: 'post',
89
+ body: {
90
+ data: {
91
+ ...trackingNumber,
92
+ origin: origin,
93
+ version: trackingNumber.$version ?? trackingNumber.version,
94
+ },
95
+ },
96
+ description: 'Update tracking number',
97
+ matchers: {
98
+ modelName: 'com.axelor.apps.stock.db.TrackingNumber',
99
+ id: id,
100
+ fields: {
101
+ 'data.origin': 'origin',
102
+ ...matchers,
103
+ },
104
+ },
105
+ });
106
+ }
82
107
  //# sourceMappingURL=tracking-number-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracking-number-api.js","sourceRoot":"","sources":["../../src/api/tracking-number-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE;IACtD,MAAM,QAAQ,GAAG,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC;IAE3E,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,EAC/C,SAAS,GAAG,IAAI,EAChB,WAAW,EACX,IAAI,GAAG,CAAC,GACT;IACC,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,yCAAyC;QAChD,QAAQ,EAAE,oBAAoB,CAAC,SAAS,EAAE,WAAW,CAAC;QACtD,QAAQ,EAAE,sBAAsB;QAChC,OAAO,EAAE,sBAAsB;QAC/B,IAAI;QACJ,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EAAC,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAC;IAC1E,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC;QACzB,GAAG,EAAE,kDAAkD;QACvD,MAAM,EAAE,KAAK;QACb,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,OAAO,EAAE,GAAG;gBACZ,OAAO;gBACP,iBAAiB;aAClB;SACF;QACD,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE;YACR,SAAS,EAAE,yCAAyC;YACpD,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;YACd,MAAM,EAAE;gBACN,cAAc,EAAE,SAAS;gBACzB,cAAc,EAAE,SAAS;gBACzB,wBAAwB,EAAE,mBAAmB;aAC9C;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,EACtD,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf;IACC,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC;QACzB,GAAG,EAAE,2BAA2B,eAAe,EAAE;QACjD,MAAM,EAAE,KAAK;QACb,IAAI,EAAE;YACJ,EAAE,EAAE,eAAe;YACnB,OAAO,EAAE,oBAAoB;YAC7B,cAAc;SACf;QACD,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE;YACR,SAAS,EAAE,wCAAwC;YACnD,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE;gBACN,qBAAqB,EAAE,gBAAgB;aACxC;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"tracking-number-api.js","sourceRoot":"","sources":["../../src/api/tracking-number-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE;IACtD,MAAM,QAAQ,GAAG,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC;IAE3E,IAAI,SAA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ACzB,GAAG,EAAE,2BAA2B,eAAe,EAAE;QACjD,MAAM,EAAE,KAAK;QACb,IAAI,EAAE;YACJ,EAAE,EAAE,eAAe;YACnB,OAAO,EAAE,oBAAoB;YAC7B,cAAc;SACf;QACD,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE;YACR,SAAS,EAAE,wCAAwC;YACnD,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE;gBACN,qBAAqB,EAAE,gBAAgB;aACxC;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EAAC,EAAE,EAAE,MAAM,EAAE,GAAG,cAAc,EAAC;IACxE,MAAM,EAAC,QAAQ,EAAC,GAAG,iBAAiB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IAE7D,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC;QACzB,GAAG,EAAE,oDAAoD,EAAE,EAAE;QAC7D,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,GAAG,cAAc;gBACjB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,cAAc,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO;aAC3D;SACF;QACD,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE;YACR,SAAS,EAAE,yCAAyC;YACpD,EAAE,EAAE,EAAE;YACN,MAAM,EAAE;gBACN,aAAa,EAAE,QAAQ;gBACvB,GAAG,QAAQ;aACZ;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface SaleOrderQtyIndicatorCardProps {
3
+ style?: any;
4
+ saleOrder?: any;
5
+ purchaseOrder?: any;
6
+ qty: number;
7
+ deliveredQty?: number;
8
+ reservedQty?: number;
9
+ receivedQty?: number;
10
+ unit: any;
11
+ estimatedShippingDate?: string;
12
+ estimatedReceiptDate?: string;
13
+ deliveryState?: number;
14
+ receiptState?: number;
15
+ }
16
+ declare const SaleOrderQtyIndicatorCard: ({ style, saleOrder, purchaseOrder, qty, deliveredQty, reservedQty, receivedQty, unit, estimatedShippingDate, estimatedReceiptDate, deliveryState, receiptState, }: SaleOrderQtyIndicatorCardProps) => React.JSX.Element;
17
+ export default SaleOrderQtyIndicatorCard;
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback } from 'react';
19
+ import { DateDisplay, useTranslator, useTypeHelpers, useTypes, } from '@axelor/aos-mobile-core';
20
+ import { ObjectCard, useDigitFormat } from '@axelor/aos-mobile-ui';
21
+ const SaleOrderQtyIndicatorCard = ({ style, saleOrder, purchaseOrder, qty, deliveredQty, reservedQty, receivedQty, unit, estimatedShippingDate, estimatedReceiptDate, deliveryState, receiptState, }) => {
22
+ const I18n = useTranslator();
23
+ const { Stock_PurchaseOrderLine: PurchaseOrderLine, Stock_SaleOrderLine: SaleOrderLine, } = useTypes();
24
+ const { getItemColor, getItemTitle } = useTypeHelpers();
25
+ const formatNumber = useDigitFormat();
26
+ const formatQty = useCallback((_qty, titleKey) => {
27
+ return {
28
+ displayText: `${formatNumber(_qty)} ${unit?.name}`,
29
+ indicatorText: `${I18n.t(titleKey)} :`,
30
+ hideIf: _qty == null,
31
+ };
32
+ }, [I18n, formatNumber, unit?.name]);
33
+ return (<ObjectCard style={style} showArrow={false} touchable={false} upperTexts={{
34
+ items: [
35
+ {
36
+ displayText: saleOrder?.saleOrderSeq ?? purchaseOrder?.purchaseOrderSeq,
37
+ isTitle: true,
38
+ },
39
+ {
40
+ iconName: 'house',
41
+ indicatorText: saleOrder?.stockLocation ?? purchaseOrder?.stockLocation,
42
+ hideIfNull: true,
43
+ },
44
+ { ...formatQty(qty, 'Stock_Quantity') },
45
+ { ...formatQty(deliveredQty, 'Stock_DeliveredQty') },
46
+ { ...formatQty(reservedQty, 'Stock_AllocatedQty') },
47
+ { ...formatQty(receivedQty, 'Stock_ReceivedQty') },
48
+ {
49
+ customComponent: (<DateDisplay date={estimatedShippingDate ?? estimatedReceiptDate} size={14} displayYear/>),
50
+ },
51
+ ],
52
+ }} sideBadges={{
53
+ items: [
54
+ {
55
+ displayText: getItemTitle(SaleOrderLine?.deliveryState, deliveryState),
56
+ color: getItemColor(SaleOrderLine?.deliveryState, deliveryState),
57
+ showIf: deliveryState == null,
58
+ },
59
+ {
60
+ displayText: getItemTitle(PurchaseOrderLine?.receiptState, receiptState),
61
+ color: getItemColor(PurchaseOrderLine?.receiptState, receiptState),
62
+ showIf: receiptState == null,
63
+ },
64
+ ],
65
+ }}/>);
66
+ };
67
+ export default SaleOrderQtyIndicatorCard;
68
+ //# sourceMappingURL=OrderQtyIndicatorCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderQtyIndicatorCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/OrderQtyIndicatorCard/OrderQtyIndicatorCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,QAAQ,GACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAiBjE,MAAM,yBAAyB,GAAG,CAAC,EACjC,KAAK,EACL,SAAS,EACT,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,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAAC;gBAClD,EAAC,GAAG,SAAS,CAAC,WAAW,EAAE,oBAAoB,CAAC,EAAC;gBACjD,EAAC,GAAG,SAAS,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAC;gBAChD;oBACE,eAAe,EAAE,CACf,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,qBAAqB,IAAI,oBAAoB,CAAC,CACpD,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,WAAW,EACX,CACH;iBACF;aACF;SACF,CAAC,CACF,UAAU,CAAC,CAAC;YACV,KAAK,EAAE;gBACL;oBACE,WAAW,EAAE,YAAY,CACvB,aAAa,EAAE,aAAa,EAC5B,aAAa,CACd;oBACD,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,CAAC;oBAChE,MAAM,EAAE,aAAa,IAAI,IAAI;iBAC9B;gBACD;oBACE,WAAW,EAAE,YAAY,CACvB,iBAAiB,EAAE,YAAY,EAC/B,YAAY,CACb;oBACD,KAAK,EAAE,YAAY,CAAC,iBAAiB,EAAE,YAAY,EAAE,YAAY,CAAC;oBAClE,MAAM,EAAE,YAAY,IAAI,IAAI;iBAC7B;aACF;SACF,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface RealQtyIndicatorCardProps {
3
+ style?: any;
4
+ indicatorType: number;
5
+ name: string;
6
+ statusSelect?: number;
7
+ stockMove: any;
8
+ realQty: number;
9
+ qty: number;
10
+ reservedQty: number;
11
+ unit: any;
12
+ trackingNumber: any;
13
+ onPress: () => void;
14
+ }
15
+ declare const RealQtyIndicatorCard: ({ style, indicatorType, name, statusSelect, stockMove, realQty, qty, reservedQty, unit, trackingNumber, onPress, }: RealQtyIndicatorCardProps) => React.JSX.Element;
16
+ export default RealQtyIndicatorCard;
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useMemo } from 'react';
19
+ import { DateDisplay, useTranslator, useTypeHelpers, useTypes, } from '@axelor/aos-mobile-core';
20
+ import { ObjectCard, TextUnit, useDigitFormat } from '@axelor/aos-mobile-ui';
21
+ import { StockIndicator } from '../../../types';
22
+ const RealQtyIndicatorCard = ({ style, indicatorType, name, statusSelect, stockMove, realQty, qty, reservedQty, unit, trackingNumber, onPress, }) => {
23
+ const I18n = useTranslator();
24
+ const { StockMove } = useTypes();
25
+ const { getItemTitle, getItemColor } = useTypeHelpers();
26
+ const formatNumber = useDigitFormat();
27
+ const date = useMemo(() => stockMove?.realDate ?? stockMove?.estimatedDate, [stockMove]);
28
+ const quantity = useMemo(() => {
29
+ if (indicatorType === StockIndicator.type.RealQty) {
30
+ return realQty;
31
+ }
32
+ else if (indicatorType === StockIndicator.type.FutureQty) {
33
+ return qty;
34
+ }
35
+ else {
36
+ return reservedQty;
37
+ }
38
+ }, [indicatorType, qty, realQty, reservedQty]);
39
+ return (<ObjectCard style={style} leftContainerFlex={2} iconLeftMargin={5} onPress={onPress} upperTexts={{
40
+ items: [
41
+ { displayText: name, isTitle: true },
42
+ {
43
+ indicatorText: I18n.t('Stock_Type'),
44
+ displayText: getItemTitle(StockMove?.typeSelect, stockMove?.typeSelect),
45
+ numberOfLines: 2,
46
+ },
47
+ { customComponent: <DateDisplay date={date} size={14} displayYear/> },
48
+ {
49
+ iconName: 'house-down',
50
+ indicatorText: stockMove?.fromStockLocation?.name,
51
+ hideIfNull: true,
52
+ },
53
+ {
54
+ iconName: 'house-up',
55
+ indicatorText: stockMove?.toStockLocation?.name,
56
+ hideIfNull: true,
57
+ },
58
+ { displayText: trackingNumber?.trackingNumberSeq, hideIfNull: true },
59
+ ],
60
+ }} sideBadges={{
61
+ items: [
62
+ {
63
+ customComponent: (<TextUnit value={formatNumber(quantity)} unit={unit?.name} fontSize={18}/>),
64
+ },
65
+ {
66
+ displayText: getItemTitle(StockMove.statusSelect, statusSelect),
67
+ color: getItemColor(StockMove.statusSelect, statusSelect),
68
+ },
69
+ ],
70
+ }}/>);
71
+ };
72
+ export default RealQtyIndicatorCard;
73
+ //# sourceMappingURL=StockQtyIndicatorCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StockQtyIndicatorCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/StockQtyIndicatorCard/StockQtyIndicatorCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,QAAQ,GACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAgB9C,MAAM,oBAAoB,GAAG,CAAC,EAC5B,KAAK,EACL,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,OAAO,EACP,GAAG,EACH,WAAW,EACX,IAAI,EACJ,cAAc,EACd,OAAO,GACmB,EAAE,EAAE;IAC9B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,EAAC,SAAS,EAAC,GAAG,QAAQ,EAAE,CAAC;IAC/B,MAAM,EAAC,YAA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AI;oBACjD,UAAU,EAAE,IAAI;iBACjB;gBACD;oBACE,QAAQ,EAAE,UAAU;oBACpB,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI;oBAC/C,UAAU,EAAE,IAAI;iBACjB;gBACD,EAAC,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAC;aACnE;SACF,CAAC,CACF,UAAU,CAAC,CAAC;YACV,KAAK,EAAE;gBACL;oBACE,eAAe,EAAE,CACf,CAAC,QAAQ,CACP,KAAK,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAC9B,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CACjB,QAAQ,CAAC,CAAC,EAAE,CAAC,EACb,CACH;iBACF;gBACD;oBACE,WAAW,EAAE,YAAY,CAAC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;oBAC/D,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;iBAC1D;aACF;SACF,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as OrderQtyIndicatorCard } from './OrderQtyIndicatorCard/OrderQtyIndicatorCard';
2
+ export { default as StockQtyIndicatorCard } from './StockQtyIndicatorCard/StockQtyIndicatorCard';
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2024 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ export { default as OrderQtyIndicatorCard } from './OrderQtyIndicatorCard/OrderQtyIndicatorCard';
19
+ export { default as StockQtyIndicatorCard } from './StockQtyIndicatorCard/StockQtyIndicatorCard';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,+CAA+C,CAAC"}