@axelor/aos-mobile-manufacturing 0.0.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.
Files changed (196) hide show
  1. package/README.md +45 -0
  2. package/lib/api/index.d.ts +7 -0
  3. package/lib/api/index.js +25 -0
  4. package/lib/api/index.js.map +1 -0
  5. package/lib/api/machine-api.d.ts +3 -0
  6. package/lib/api/machine-api.js +47 -0
  7. package/lib/api/machine-api.js.map +1 -0
  8. package/lib/api/manufacturing-order-api.d.ts +22 -0
  9. package/lib/api/manufacturing-order-api.js +225 -0
  10. package/lib/api/manufacturing-order-api.js.map +1 -0
  11. package/lib/api/operation-order-api.d.ts +14 -0
  12. package/lib/api/operation-order-api.js +153 -0
  13. package/lib/api/operation-order-api.js.map +1 -0
  14. package/lib/api/prod-product-api.d.ts +21 -0
  15. package/lib/api/prod-product-api.js +59 -0
  16. package/lib/api/prod-product-api.js.map +1 -0
  17. package/lib/api/production-file-api.d.ts +4 -0
  18. package/lib/api/production-file-api.js +51 -0
  19. package/lib/api/production-file-api.js.map +1 -0
  20. package/lib/api/waste-product-api.d.ts +27 -0
  21. package/lib/api/waste-product-api.js +123 -0
  22. package/lib/api/waste-product-api.js.map +1 -0
  23. package/lib/api/work-center-api.d.ts +3 -0
  24. package/lib/api/work-center-api.js +47 -0
  25. package/lib/api/work-center-api.js.map +1 -0
  26. package/lib/components/index.d.ts +2 -0
  27. package/lib/components/index.js +20 -0
  28. package/lib/components/index.js.map +1 -0
  29. package/lib/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.d.ts +7 -0
  30. package/lib/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.js +32 -0
  31. package/lib/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.js.map +1 -0
  32. package/lib/components/molecules/index.d.ts +1 -0
  33. package/lib/components/molecules/index.js +19 -0
  34. package/lib/components/molecules/index.js.map +1 -0
  35. package/lib/components/organisms/ConsumedProductCard/ConsumedProductCard.d.ts +17 -0
  36. package/lib/components/organisms/ConsumedProductCard/ConsumedProductCard.js +92 -0
  37. package/lib/components/organisms/ConsumedProductCard/ConsumedProductCard.js.map +1 -0
  38. package/lib/components/organisms/ConsumedProductGlobalCard/ConsumedProductGlobalCard.d.ts +17 -0
  39. package/lib/components/organisms/ConsumedProductGlobalCard/ConsumedProductGlobalCard.js +81 -0
  40. package/lib/components/organisms/ConsumedProductGlobalCard/ConsumedProductGlobalCard.js.map +1 -0
  41. package/lib/components/organisms/ManufacturingOrderCard/ManufacturingOrderCard.d.ts +16 -0
  42. package/lib/components/organisms/ManufacturingOrderCard/ManufacturingOrderCard.js +83 -0
  43. package/lib/components/organisms/ManufacturingOrderCard/ManufacturingOrderCard.js.map +1 -0
  44. package/lib/components/organisms/ManufacturingOrderHeader/ManufacturingOrderHeader.d.ts +8 -0
  45. package/lib/components/organisms/ManufacturingOrderHeader/ManufacturingOrderHeader.js +68 -0
  46. package/lib/components/organisms/ManufacturingOrderHeader/ManufacturingOrderHeader.js.map +1 -0
  47. package/lib/components/organisms/OperationOrderCard/OperationOrderCard.d.ts +11 -0
  48. package/lib/components/organisms/OperationOrderCard/OperationOrderCard.js +76 -0
  49. package/lib/components/organisms/OperationOrderCard/OperationOrderCard.js.map +1 -0
  50. package/lib/components/organisms/OperationOrderDetailsCard/OperationOrderDetailsCard.d.ts +17 -0
  51. package/lib/components/organisms/OperationOrderDetailsCard/OperationOrderDetailsCard.js +86 -0
  52. package/lib/components/organisms/OperationOrderDetailsCard/OperationOrderDetailsCard.js.map +1 -0
  53. package/lib/components/organisms/OperationOrderHeader/OperationOrderHeader.d.ts +8 -0
  54. package/lib/components/organisms/OperationOrderHeader/OperationOrderHeader.js +72 -0
  55. package/lib/components/organisms/OperationOrderHeader/OperationOrderHeader.js.map +1 -0
  56. package/lib/components/organisms/ProducedProductCard/ProducedProductCard.d.ts +11 -0
  57. package/lib/components/organisms/ProducedProductCard/ProducedProductCard.js +61 -0
  58. package/lib/components/organisms/ProducedProductCard/ProducedProductCard.js.map +1 -0
  59. package/lib/components/organisms/ProductionFileLargeCard/ProductionFileLargeCard.d.ts +10 -0
  60. package/lib/components/organisms/ProductionFileLargeCard/ProductionFileLargeCard.js +62 -0
  61. package/lib/components/organisms/ProductionFileLargeCard/ProductionFileLargeCard.js.map +1 -0
  62. package/lib/components/organisms/ProductionFileSmallCard/ProductionFileSmallCard.d.ts +10 -0
  63. package/lib/components/organisms/ProductionFileSmallCard/ProductionFileSmallCard.js +52 -0
  64. package/lib/components/organisms/ProductionFileSmallCard/ProductionFileSmallCard.js.map +1 -0
  65. package/lib/components/organisms/WasteProductCard/WasteProductCard.d.ts +9 -0
  66. package/lib/components/organisms/WasteProductCard/WasteProductCard.js +47 -0
  67. package/lib/components/organisms/WasteProductCard/WasteProductCard.js.map +1 -0
  68. package/lib/components/organisms/index.d.ts +11 -0
  69. package/lib/components/organisms/index.js +29 -0
  70. package/lib/components/organisms/index.js.map +1 -0
  71. package/lib/features/asyncFunctions-index.d.ts +7 -0
  72. package/lib/features/asyncFunctions-index.js +25 -0
  73. package/lib/features/asyncFunctions-index.js.map +1 -0
  74. package/lib/features/index.d.ts +7 -0
  75. package/lib/features/index.js +25 -0
  76. package/lib/features/index.js.map +1 -0
  77. package/lib/features/machinesSlice.d.ts +14 -0
  78. package/lib/features/machinesSlice.js +48 -0
  79. package/lib/features/machinesSlice.js.map +1 -0
  80. package/lib/features/manufacturingOrderSlice.d.ts +66 -0
  81. package/lib/features/manufacturingOrderSlice.js +186 -0
  82. package/lib/features/manufacturingOrderSlice.js.map +1 -0
  83. package/lib/features/operationOrderSlice.d.ts +49 -0
  84. package/lib/features/operationOrderSlice.js +124 -0
  85. package/lib/features/operationOrderSlice.js.map +1 -0
  86. package/lib/features/prodProductSlice.d.ts +46 -0
  87. package/lib/features/prodProductSlice.js +114 -0
  88. package/lib/features/prodProductSlice.js.map +1 -0
  89. package/lib/features/productionFileSlice.d.ts +16 -0
  90. package/lib/features/productionFileSlice.js +71 -0
  91. package/lib/features/productionFileSlice.js.map +1 -0
  92. package/lib/features/wasteProductsSlice.d.ts +48 -0
  93. package/lib/features/wasteProductsSlice.js +117 -0
  94. package/lib/features/wasteProductsSlice.js.map +1 -0
  95. package/lib/features/workCentersSlice.d.ts +14 -0
  96. package/lib/features/workCentersSlice.js +48 -0
  97. package/lib/features/workCentersSlice.js.map +1 -0
  98. package/lib/i18n/en.json +45 -0
  99. package/lib/i18n/fr.json +45 -0
  100. package/lib/index.d.ts +13 -0
  101. package/lib/index.js +68 -0
  102. package/lib/index.js.map +1 -0
  103. package/lib/screens/manufactoringOrder/ManufacturingOrderDetailsScreen.d.ts +5 -0
  104. package/lib/screens/manufactoringOrder/ManufacturingOrderDetailsScreen.js +158 -0
  105. package/lib/screens/manufactoringOrder/ManufacturingOrderDetailsScreen.js.map +1 -0
  106. package/lib/screens/manufactoringOrder/ManufacturingOrderListProductionOrderScreen.d.ts +5 -0
  107. package/lib/screens/manufactoringOrder/ManufacturingOrderListProductionOrderScreen.js +72 -0
  108. package/lib/screens/manufactoringOrder/ManufacturingOrderListProductionOrderScreen.js.map +1 -0
  109. package/lib/screens/manufactoringOrder/ManufacturingOrderListSaleOrderScreen.d.ts +4 -0
  110. package/lib/screens/manufactoringOrder/ManufacturingOrderListSaleOrderScreen.js +60 -0
  111. package/lib/screens/manufactoringOrder/ManufacturingOrderListSaleOrderScreen.js.map +1 -0
  112. package/lib/screens/manufactoringOrder/ManufacturingOrderListScreen.d.ts +4 -0
  113. package/lib/screens/manufactoringOrder/ManufacturingOrderListScreen.js +182 -0
  114. package/lib/screens/manufactoringOrder/ManufacturingOrderListScreen.js.map +1 -0
  115. package/lib/screens/manufactoringOrder/ManufacturingOrderOperationListScreen.d.ts +5 -0
  116. package/lib/screens/manufactoringOrder/ManufacturingOrderOperationListScreen.js +150 -0
  117. package/lib/screens/manufactoringOrder/ManufacturingOrderOperationListScreen.js.map +1 -0
  118. package/lib/screens/manufactoringOrder/consumedProduct/ChildrenManufOrderListScreen.d.ts +5 -0
  119. package/lib/screens/manufactoringOrder/consumedProduct/ChildrenManufOrderListScreen.js +184 -0
  120. package/lib/screens/manufactoringOrder/consumedProduct/ChildrenManufOrderListScreen.js.map +1 -0
  121. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductDetailsScreen.d.ts +5 -0
  122. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductDetailsScreen.js +103 -0
  123. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductDetailsScreen.js.map +1 -0
  124. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductListScreen.d.ts +5 -0
  125. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductListScreen.js +160 -0
  126. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductListScreen.js.map +1 -0
  127. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductSelectProductScreen.d.ts +5 -0
  128. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductSelectProductScreen.js +56 -0
  129. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductSelectProductScreen.js.map +1 -0
  130. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductSelectTrackingScreen.d.ts +5 -0
  131. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductSelectTrackingScreen.js +51 -0
  132. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductSelectTrackingScreen.js.map +1 -0
  133. package/lib/screens/manufactoringOrder/consumedProduct/index.d.ts +55 -0
  134. package/lib/screens/manufactoringOrder/consumedProduct/index.js +60 -0
  135. package/lib/screens/manufactoringOrder/consumedProduct/index.js.map +1 -0
  136. package/lib/screens/manufactoringOrder/index.d.ts +171 -0
  137. package/lib/screens/manufactoringOrder/index.js +66 -0
  138. package/lib/screens/manufactoringOrder/index.js.map +1 -0
  139. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductDetailsScreen.d.ts +5 -0
  140. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductDetailsScreen.js +103 -0
  141. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductDetailsScreen.js.map +1 -0
  142. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductListScreen.d.ts +5 -0
  143. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductListScreen.js +141 -0
  144. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductListScreen.js.map +1 -0
  145. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductSelectProductScreen.d.ts +5 -0
  146. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductSelectProductScreen.js +56 -0
  147. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductSelectProductScreen.js.map +1 -0
  148. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductSelectTrackingScreen.d.ts +5 -0
  149. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductSelectTrackingScreen.js +74 -0
  150. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductSelectTrackingScreen.js.map +1 -0
  151. package/lib/screens/manufactoringOrder/producedProduct/index.d.ts +44 -0
  152. package/lib/screens/manufactoringOrder/producedProduct/index.js +52 -0
  153. package/lib/screens/manufactoringOrder/producedProduct/index.js.map +1 -0
  154. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductDetailsScreen.d.ts +5 -0
  155. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductDetailsScreen.js +100 -0
  156. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductDetailsScreen.js.map +1 -0
  157. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductListScreen.d.ts +5 -0
  158. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductListScreen.js +103 -0
  159. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductListScreen.js.map +1 -0
  160. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductSelectProductScreen.d.ts +5 -0
  161. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductSelectProductScreen.js +48 -0
  162. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductSelectProductScreen.js.map +1 -0
  163. package/lib/screens/manufactoringOrder/wasteProduct/index.d.ts +33 -0
  164. package/lib/screens/manufactoringOrder/wasteProduct/index.js +44 -0
  165. package/lib/screens/manufactoringOrder/wasteProduct/index.js.map +1 -0
  166. package/lib/screens/operationOrder/OperationOrderDetailsScreen.d.ts +5 -0
  167. package/lib/screens/operationOrder/OperationOrderDetailsScreen.js +87 -0
  168. package/lib/screens/operationOrder/OperationOrderDetailsScreen.js.map +1 -0
  169. package/lib/screens/operationOrder/OperationOrderListScreen.d.ts +4 -0
  170. package/lib/screens/operationOrder/OperationOrderListScreen.js +178 -0
  171. package/lib/screens/operationOrder/OperationOrderListScreen.js.map +1 -0
  172. package/lib/screens/operationOrder/OperationOrderPlanningScreen.d.ts +2 -0
  173. package/lib/screens/operationOrder/OperationOrderPlanningScreen.js +126 -0
  174. package/lib/screens/operationOrder/OperationOrderPlanningScreen.js.map +1 -0
  175. package/lib/screens/operationOrder/ProductionFileScreen.d.ts +5 -0
  176. package/lib/screens/operationOrder/ProductionFileScreen.js +45 -0
  177. package/lib/screens/operationOrder/ProductionFileScreen.js.map +1 -0
  178. package/lib/screens/operationOrder/index.d.ts +44 -0
  179. package/lib/screens/operationOrder/index.js +52 -0
  180. package/lib/screens/operationOrder/index.js.map +1 -0
  181. package/lib/types/index.d.ts +2 -0
  182. package/lib/types/index.js +20 -0
  183. package/lib/types/index.js.map +1 -0
  184. package/lib/types/manufacturing-order.d.ts +29 -0
  185. package/lib/types/manufacturing-order.js +117 -0
  186. package/lib/types/manufacturing-order.js.map +1 -0
  187. package/lib/types/operation-order.d.ts +25 -0
  188. package/lib/types/operation-order.js +169 -0
  189. package/lib/types/operation-order.js.map +1 -0
  190. package/lib/utils/displayers.d.ts +1 -0
  191. package/lib/utils/displayers.js +19 -0
  192. package/lib/utils/displayers.js.map +1 -0
  193. package/lib/utils/formaters.d.ts +4 -0
  194. package/lib/utils/formaters.js +23 -0
  195. package/lib/utils/formaters.js.map +1 -0
  196. package/package.json +51 -0
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ <h1 align="center">@axelor/aos-mobile-manufacturing</h1>
2
+
3
+ <div align="center">
4
+ <img src="https://i.imgur.com/KJAAFlT.png" width="30%"/>
5
+ </div>
6
+
7
+ ## Presentation
8
+
9
+ This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
10
+
11
+ The purpose of this package is to link with the manufacturing 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
+
13
+ ## Usage
14
+
15
+ Install the library :
16
+
17
+ ```bash
18
+ yarn add @axelor/aos-mobile-manufacturing
19
+ ```
20
+
21
+ Compatibility with React v18.2.x and React Native v0.68.x.
22
+
23
+ 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. This package is dependent on the stock module, so both modules must be added to make it work.
24
+
25
+ ```typescript
26
+ import React from 'react';
27
+ import {Application} from '@axelor/aos-mobile-core';
28
+ import {StockModule} from '@axelor/aos-mobile-stock';
29
+ import {ManufacturingModule} from '@axelor/aos-mobile-manufacturing';
30
+
31
+ const App = () => {
32
+ return (
33
+ <Application
34
+ modules={[StockModule, ManufacturingModule]}
35
+ mainMenu="auth_menu_user"
36
+ />
37
+ );
38
+ };
39
+
40
+ export default App;
41
+ ```
42
+
43
+ ## Developpment
44
+
45
+ This package is developed as part of the Axelor Open Mobile application. To contribute, please go to the [Github project](https://github.com/axelor/axelor-mobile) and follow the guidelines. You will also find an installation guide to help you configure your environment.
@@ -0,0 +1,7 @@
1
+ export * from './machine-api';
2
+ export * from './manufacturing-order-api';
3
+ export * from './operation-order-api';
4
+ export * from './prod-product-api';
5
+ export * from './production-file-api';
6
+ export * from './waste-product-api';
7
+ export * from './work-center-api';
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 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 * from './machine-api';
19
+ export * from './manufacturing-order-api';
20
+ export * from './operation-order-api';
21
+ export * from './prod-product-api';
22
+ export * from './production-file-api';
23
+ export * from './waste-product-api';
24
+ export * from './work-center-api';
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export function searchMachineFilter({ searchValue }: {
2
+ searchValue?: any;
3
+ }): Promise<any>;
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 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
+ const machineFields = ['code', 'name'];
20
+ const createMachineCriteria = searchValue => {
21
+ let criterias = [];
22
+ if (searchValue != null) {
23
+ criterias.push({
24
+ fieldName: 'name',
25
+ operator: 'like',
26
+ value: searchValue,
27
+ });
28
+ }
29
+ return criterias;
30
+ };
31
+ export async function searchMachineFilter({ searchValue = null }) {
32
+ return axiosApiProvider.post({
33
+ url: '/ws/rest/com.axelor.apps.production.db.Machine/search',
34
+ data: {
35
+ data: {
36
+ criteria: [
37
+ {
38
+ operator: 'and',
39
+ criteria: createMachineCriteria(searchValue),
40
+ },
41
+ ],
42
+ },
43
+ fields: machineFields,
44
+ },
45
+ });
46
+ }
47
+ //# sourceMappingURL=machine-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machine-api.js","sourceRoot":"","sources":["../../src/api/machine-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEzD,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEvC,MAAM,qBAAqB,GAAG,WAAW,CAAC,EAAE;IAC1C,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,WAAW,IAAI,IAAI,EAAE;QACvB,SAAS,CAAC,IAAI,CAAC;YACb,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,WAAW;SACnB,CAAC,CAAC;KACJ;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EAAC,WAAW,GAAG,IAAI,EAAC;IAC5D,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,uDAAuD;QAC5D,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,QAAQ,EAAE;oBACR;wBACE,QAAQ,EAAE,KAAK;wBACf,QAAQ,EAAE,qBAAqB,CAAC,WAAW,CAAC;qBAC7C;iBACF;aACF;YACD,MAAM,EAAE,aAAa;SACtB;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,22 @@
1
+ export function searchManufacturingOrderFilter({ companyId, workshopId, searchValue, page, }: {
2
+ companyId?: any;
3
+ workshopId?: any;
4
+ searchValue?: any;
5
+ page?: number;
6
+ }): Promise<any>;
7
+ export function fetchManufacturingOrder({ manufOrderId }: {
8
+ manufOrderId: any;
9
+ }): Promise<any>;
10
+ export function fetchManufacturingOrderOfProductionOrder({ productionOrderList, page, }: {
11
+ productionOrderList: any;
12
+ page?: number;
13
+ }): Promise<any>;
14
+ export function fetchChildrenManufacturingOrders({ parentManufOrderId, page, }: {
15
+ parentManufOrderId: any;
16
+ page?: number;
17
+ }): Promise<any>;
18
+ export function updateManufacturingOrderStatus({ manufOrderId, manufOrderVersion, targetStatus, }: {
19
+ manufOrderId: any;
20
+ manufOrderVersion: any;
21
+ targetStatus: any;
22
+ }): Promise<any>;
@@ -0,0 +1,225 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 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
+ import ManufacturingOrder from '../types/manufacturing-order';
20
+ const manufacturingOrderFields = [
21
+ 'id',
22
+ 'manufOrderSeq',
23
+ 'statusSelect',
24
+ 'prioritySelect',
25
+ 'product',
26
+ 'qty',
27
+ 'unit',
28
+ 'clientPartner',
29
+ 'saleOrderSet',
30
+ 'toConsumeProdProductList',
31
+ 'note',
32
+ 'moCommentFromSaleOrder',
33
+ 'moCommentFromSaleOrderLine',
34
+ 'parentMO',
35
+ 'wasteProdProductList',
36
+ 'wasteStockMove',
37
+ 'productionOrderSet',
38
+ 'company',
39
+ ];
40
+ const sortByFields = [
41
+ 'statusSelect',
42
+ '-realStartDateT',
43
+ 'plannedStartDateT',
44
+ 'manufOrderSeq',
45
+ ];
46
+ const createManufOrderCriteria = (companyId, workshopId, searchValue) => {
47
+ let criterias = [];
48
+ criterias.push({
49
+ fieldName: 'typeSelect',
50
+ operator: '=',
51
+ value: ManufacturingOrder.type.production,
52
+ }, {
53
+ operator: 'OR',
54
+ criteria: [
55
+ {
56
+ fieldName: 'statusSelect',
57
+ operator: '=',
58
+ value: ManufacturingOrder.status.Planned,
59
+ },
60
+ {
61
+ fieldName: 'statusSelect',
62
+ operator: '=',
63
+ value: ManufacturingOrder.status.InProgress,
64
+ },
65
+ {
66
+ fieldName: 'statusSelect',
67
+ operator: '=',
68
+ value: ManufacturingOrder.status.StandBy,
69
+ },
70
+ {
71
+ fieldName: 'statusSelect',
72
+ operator: '=',
73
+ value: ManufacturingOrder.status.Finished,
74
+ },
75
+ ],
76
+ });
77
+ if (companyId != null) {
78
+ criterias.push({
79
+ fieldName: 'company.id',
80
+ operator: '=',
81
+ value: companyId,
82
+ });
83
+ }
84
+ if (searchValue != null) {
85
+ criterias.push({
86
+ fieldName: 'manufOrderSeq',
87
+ operator: 'like',
88
+ value: searchValue,
89
+ });
90
+ }
91
+ if (workshopId != null) {
92
+ criterias.push({
93
+ operator: 'or',
94
+ criteria: [
95
+ {
96
+ fieldName: 'workshopStockLocation.id',
97
+ operator: '=',
98
+ value: workshopId,
99
+ },
100
+ {
101
+ fieldName: 'workshopStockLocation.parentStockLocation.id',
102
+ operator: '=',
103
+ value: workshopId,
104
+ },
105
+ ],
106
+ });
107
+ }
108
+ return criterias;
109
+ };
110
+ export async function searchManufacturingOrderFilter({ companyId = null, workshopId = null, searchValue = null, page = 0, }) {
111
+ return axiosApiProvider.post({
112
+ url: '/ws/rest/com.axelor.apps.production.db.ManufOrder/search',
113
+ data: {
114
+ data: {
115
+ criteria: [
116
+ {
117
+ operator: 'and',
118
+ criteria: createManufOrderCriteria(companyId, workshopId, searchValue),
119
+ },
120
+ ],
121
+ },
122
+ fields: manufacturingOrderFields,
123
+ sortBy: sortByFields,
124
+ limit: 10,
125
+ offset: 10 * page,
126
+ },
127
+ });
128
+ }
129
+ export async function fetchManufacturingOrder({ manufOrderId }) {
130
+ return axiosApiProvider.post({
131
+ url: `/ws/rest/com.axelor.apps.production.db.ManufOrder/${manufOrderId}/fetch`,
132
+ data: {
133
+ fields: manufacturingOrderFields,
134
+ related: { product: ['name', 'code', 'picture'] },
135
+ },
136
+ });
137
+ }
138
+ export async function fetchManufacturingOrderOfProductionOrder({ productionOrderList, page = 0, }) {
139
+ if (productionOrderList == null) {
140
+ return null;
141
+ }
142
+ return axiosApiProvider
143
+ .post({
144
+ url: '/ws/rest/com.axelor.apps.production.db.ProductionOrder/search',
145
+ data: {
146
+ data: {
147
+ _domain: 'self.id IN :productionOrderIds',
148
+ _domainContext: {
149
+ productionOrderIds: productionOrderList.map(productionOrder => productionOrder.id),
150
+ },
151
+ },
152
+ fields: ['id', 'manufOrderSet'],
153
+ },
154
+ })
155
+ .then(res => {
156
+ const result = res?.data?.data;
157
+ const manufOrderList = result
158
+ ?.map(productionOrder => productionOrder?.manufOrderSet)
159
+ ?.flat(1);
160
+ if (manufOrderList == null) {
161
+ return null;
162
+ }
163
+ const manufOrderIds = [];
164
+ manufOrderList.forEach(manufOrder => {
165
+ manufOrderIds.push(manufOrder.id);
166
+ });
167
+ return manufOrderIds;
168
+ })
169
+ .then(manufOrderIds => fetchManufacturingOrderByIds({ manufOrderIds, page }));
170
+ }
171
+ async function fetchManufacturingOrderByIds({ manufOrderIds, page = 0 }) {
172
+ if (manufOrderIds == null) {
173
+ return null;
174
+ }
175
+ return axiosApiProvider.post({
176
+ url: '/ws/rest/com.axelor.apps.production.db.ManufOrder/search',
177
+ data: {
178
+ data: {
179
+ _domain: 'self.id IN :manufOrderIds',
180
+ _domainContext: {
181
+ manufOrderIds: manufOrderIds,
182
+ },
183
+ },
184
+ fields: ['id', 'manufOrderSeq', 'statusSelect'],
185
+ sortBy: sortByFields,
186
+ limit: 10,
187
+ offset: 10 * page,
188
+ },
189
+ });
190
+ }
191
+ export async function fetchChildrenManufacturingOrders({ parentManufOrderId, page = 0, }) {
192
+ return axiosApiProvider.post({
193
+ url: '/ws/rest/com.axelor.apps.production.db.ManufOrder/search',
194
+ data: {
195
+ data: {
196
+ criteria: [
197
+ {
198
+ operator: 'and',
199
+ criteria: [
200
+ {
201
+ fieldName: 'parentMO.id',
202
+ operator: '=',
203
+ value: parentManufOrderId,
204
+ },
205
+ ],
206
+ },
207
+ ],
208
+ },
209
+ fields: manufacturingOrderFields,
210
+ sortBy: sortByFields,
211
+ limit: 10,
212
+ offset: 10 * page,
213
+ },
214
+ });
215
+ }
216
+ export async function updateManufacturingOrderStatus({ manufOrderId, manufOrderVersion, targetStatus, }) {
217
+ return axiosApiProvider.put({
218
+ url: `ws/aos/manuf-order/${manufOrderId}`,
219
+ data: {
220
+ version: manufOrderVersion,
221
+ status: targetStatus,
222
+ },
223
+ });
224
+ }
225
+ //# sourceMappingURL=manufacturing-order-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manufacturing-order-api.js","sourceRoot":"","sources":["../../src/api/manufacturing-order-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAE9D,MAAM,wBAAwB,GAAG;IAC/B,IAAI;IACJ,eAAe;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;SACrB;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ export function searchOperationOrderFilter({ manufOrderId, searchValue, page, }: {
2
+ manufOrderId?: any;
3
+ searchValue?: any;
4
+ page?: number;
5
+ }): Promise<any>;
6
+ export function getPlannedOperationOrder(date: any): Promise<any>;
7
+ export function fetchOperationOrder({ operationOrderId }: {
8
+ operationOrderId: any;
9
+ }): Promise<any>;
10
+ export function updateOperationOrderStatus({ operationOrderId, version, status, }: {
11
+ operationOrderId: any;
12
+ version: any;
13
+ status: any;
14
+ }): Promise<any>;
@@ -0,0 +1,153 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 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, getNextMonth, getPreviousMonth, } from '@axelor/aos-mobile-core';
19
+ import OperationOrder from '../types/operation-order';
20
+ const operationOrderListFields = [
21
+ 'id',
22
+ 'operationName',
23
+ 'statusSelect',
24
+ 'priority',
25
+ 'workCenter',
26
+ 'plannedDuration',
27
+ 'manufOrder',
28
+ 'machine',
29
+ 'plannedStartDateT',
30
+ 'plannedEndDateT',
31
+ 'realStartDateT',
32
+ 'realEndDateT',
33
+ 'operationOrderDurationList',
34
+ 'realDuration',
35
+ 'prodProcessLine',
36
+ ];
37
+ const sortByFields = ['manufOrder.manufOrderSeq', 'statusSelect', 'priority'];
38
+ const createOperationOrderCriteria = (manufOrderId, searchValue) => {
39
+ let criterias = [];
40
+ criterias.push({
41
+ operator: 'OR',
42
+ criteria: [
43
+ {
44
+ fieldName: 'statusSelect',
45
+ operator: '=',
46
+ value: OperationOrder.status.Planned,
47
+ },
48
+ {
49
+ fieldName: 'statusSelect',
50
+ operator: '=',
51
+ value: OperationOrder.status.InProgress,
52
+ },
53
+ {
54
+ fieldName: 'statusSelect',
55
+ operator: '=',
56
+ value: OperationOrder.status.StandBy,
57
+ },
58
+ {
59
+ fieldName: 'statusSelect',
60
+ operator: '=',
61
+ value: OperationOrder.status.Finished,
62
+ },
63
+ ],
64
+ });
65
+ if (manufOrderId != null) {
66
+ criterias.push({
67
+ fieldName: 'manufOrder.id',
68
+ operator: '=',
69
+ value: manufOrderId,
70
+ });
71
+ }
72
+ if (searchValue != null) {
73
+ criterias.push({
74
+ fieldName: 'manufOrder.manufOrderSeq',
75
+ operator: 'like',
76
+ value: searchValue,
77
+ });
78
+ }
79
+ return criterias;
80
+ };
81
+ export async function searchOperationOrderFilter({ manufOrderId = null, searchValue = null, page = 0, }) {
82
+ return axiosApiProvider.post({
83
+ url: '/ws/rest/com.axelor.apps.production.db.OperationOrder/search',
84
+ data: {
85
+ data: {
86
+ criteria: [
87
+ {
88
+ operator: 'and',
89
+ criteria: createOperationOrderCriteria(manufOrderId, searchValue),
90
+ },
91
+ ],
92
+ },
93
+ fields: operationOrderListFields,
94
+ sortBy: sortByFields,
95
+ limit: 10,
96
+ offset: 10 * page,
97
+ },
98
+ });
99
+ }
100
+ export async function getPlannedOperationOrder(date) {
101
+ const startDate = getPreviousMonth(new Date(date.dateString));
102
+ const endDate = getNextMonth(new Date(date.dateString));
103
+ return axiosApiProvider.post({
104
+ url: '/ws/rest/com.axelor.apps.production.db.OperationOrder/search',
105
+ data: {
106
+ data: {
107
+ criteria: [
108
+ {
109
+ operator: 'and',
110
+ criteria: [
111
+ {
112
+ fieldName: 'plannedStartDateT',
113
+ operator: '>=',
114
+ value: `${startDate.getFullYear()}-${(startDate.getMonth() + 1)
115
+ .toString()
116
+ .padStart(2, '0')}-01T00:00:00.000Z`,
117
+ },
118
+ {
119
+ fieldName: 'plannedStartDateT',
120
+ operator: '<=',
121
+ value: `${endDate.getFullYear()}-${(endDate.getMonth() + 1)
122
+ .toString()
123
+ .padStart(2, '0')}-31T23:59:00.000Z`,
124
+ },
125
+ ],
126
+ },
127
+ ],
128
+ },
129
+ },
130
+ });
131
+ }
132
+ export async function fetchOperationOrder({ operationOrderId }) {
133
+ return axiosApiProvider.post({
134
+ url: `/ws/rest/com.axelor.apps.production.db.OperationOrder/${operationOrderId}/fetch`,
135
+ data: {
136
+ fields: operationOrderListFields,
137
+ related: {
138
+ operationOrderDurationList: ['startingDateTime', 'stoppingDateTime'],
139
+ prodProcessLine: ['objectDescriptionList'],
140
+ },
141
+ },
142
+ });
143
+ }
144
+ export async function updateOperationOrderStatus({ operationOrderId, version, status, }) {
145
+ return axiosApiProvider.put({
146
+ url: `ws/aos/operation-order/${operationOrderId}`,
147
+ data: {
148
+ version,
149
+ status,
150
+ },
151
+ });
152
+ }
153
+ //# sourceMappingURL=operation-order-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-order-api.js","sourceRoot":"","sources":["../../src/api/operation-order-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,cAAc,MAAM,0BAA0B,CAAC;AAEtD,MAAM,wBAAwB,GAAG;IAC/B,IAAI;IACJ,eAAe;IACf,cAAc;IACd,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,SAAS;IACT,mBAAmB;IACnB,iBAAiB;IACjB,gBAAgB;IAChB,cAAc;IACd,4BAA4B;IAC5B,cAAc;IACd,iBAAiB;CAClB,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,0BAA0B,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;AAE9E,MAAM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B,CAAC,EAAC,gBAAgB,EAAC;IAC1D,OAAO,gBAAgB,CAAC,IAAI,CAAC;QAC3B,GAAG,EAAE,yDAAyD,gBAAgB,QAAQ;QACtF,IAAI,EAAE;YACJ,MAAM,EAAE,wBAAwB;YAChC,OAAO,EAAE;gBACP,0BAA0B,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACpE,eAAe,EAAE,CAAC,uBAAuB,CAAC;aAC3C;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,EAC/C,gBAAgB,EAChB,OAAO,EACP,MAAM,GACP;IACC,OAAO,gBAAgB,CAAC,GAAG,CAAC;QAC1B,GAAG,EAAE,0BAA0B,gBAAgB,EAAE;QACjD,IAAI,EAAE;YACJ,OAAO;YACP,MAAM;SACP;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,21 @@
1
+ export function fetchManufacturingOrderConsumedProducts({ manufOrderId, manufOrderVersion, }: {
2
+ manufOrderId: any;
3
+ manufOrderVersion: any;
4
+ }): Promise<any>;
5
+ export function fetchManufacturingOrderProducedProducts({ manufOrderId, manufOrderVersion, }: {
6
+ manufOrderId: any;
7
+ manufOrderVersion: any;
8
+ }): Promise<any>;
9
+ export function createProdProduct({ manufOrderId, manufOrderVersion, productId, trackingNumberId, qty, productType, }: {
10
+ manufOrderId: any;
11
+ manufOrderVersion: any;
12
+ productId: any;
13
+ trackingNumberId: any;
14
+ qty: any;
15
+ productType: any;
16
+ }): Promise<any>;
17
+ export function updateProdProduct({ stockMoveLineVersion, stockMoveLineId, prodProductQty, }: {
18
+ stockMoveLineVersion: any;
19
+ stockMoveLineId: any;
20
+ prodProductQty: any;
21
+ }): Promise<any>;
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2023 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 fetchManufacturingOrderConsumedProducts({ manufOrderId, manufOrderVersion, }) {
20
+ return axiosApiProvider.post({
21
+ url: '/ws/aos/manuf-order/consumed-products/fetch',
22
+ data: {
23
+ manufOrderId: manufOrderId,
24
+ manufOrderVersion: manufOrderVersion,
25
+ },
26
+ });
27
+ }
28
+ export async function fetchManufacturingOrderProducedProducts({ manufOrderId, manufOrderVersion, }) {
29
+ return axiosApiProvider.post({
30
+ url: '/ws/aos/manuf-order/produced-products/fetch',
31
+ data: {
32
+ manufOrderId: manufOrderId,
33
+ manufOrderVersion: manufOrderVersion,
34
+ },
35
+ });
36
+ }
37
+ export async function createProdProduct({ manufOrderId, manufOrderVersion, productId, trackingNumberId, qty, productType, }) {
38
+ return axiosApiProvider.post({
39
+ url: `ws/aos/manuf-order/${manufOrderId}/add-product`,
40
+ data: {
41
+ version: manufOrderVersion,
42
+ productId: productId,
43
+ trackingNumberId: trackingNumberId,
44
+ qty: qty,
45
+ productType: productType,
46
+ },
47
+ });
48
+ }
49
+ export async function updateProdProduct({ stockMoveLineVersion, stockMoveLineId, prodProductQty, }) {
50
+ return axiosApiProvider.put({
51
+ url: 'ws/aos/manuf-order/update-product-qty',
52
+ data: {
53
+ version: stockMoveLineVersion,
54
+ stockMoveLineId: stockMoveLineId,
55
+ prodProductQty: prodProductQty,
56
+ },
57
+ });
58
+ }
59
+ //# sourceMappingURL=prod-product-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prod-product-api.js","sourceRo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cAAc,EAAE,cAAc;SAC/B;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ export function searchProductionFile({ prodProcessLineId, page, }: {
2
+ prodProcessLineId?: any;
3
+ page?: number;
4
+ }): Promise<any>;