@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
@@ -0,0 +1,83 @@
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 React, { useMemo } from 'react';
19
+ import { StyleSheet, View, TouchableOpacity } from 'react-native';
20
+ import { Badge, Card, Icon, LabelText, Text, useThemeColor, } from '@axelor/aos-mobile-ui';
21
+ import { useTranslator } from '@axelor/aos-mobile-core';
22
+ import ManufacturingOrder from '../../../types/manufacturing-order';
23
+ const ManufacturingOrderCard = ({ style, reference, status, priority, productName, qty, unit, link = { ordersRef: [null], client: null }, onPress, }) => {
24
+ const Colors = useThemeColor();
25
+ const I18n = useTranslator();
26
+ const borderStyle = useMemo(() => {
27
+ return getStyles(ManufacturingOrder.getStatusColor(status, Colors).background)?.border;
28
+ }, [Colors, status]);
29
+ return (<TouchableOpacity onPress={onPress} activeOpacity={0.9}>
30
+ <Card style={[styles.container, borderStyle, style]}>
31
+ <View style={styles.textContainer}>
32
+ <Text style={styles.txtImportant}>{reference}</Text>
33
+ <Text style={styles.txtDetails}>{productName}</Text>
34
+ <LabelText iconName="hammer" title={`${parseFloat(qty.toString()).toFixed(2)} ${unit != null ? unit.name : ''}`}/>
35
+ {link.client != null && link.ordersRef?.length > 0 && (<View style={styles.origin}>
36
+ <Icon name="tag" size={12} style={styles.icon}/>
37
+ <Text style={styles.txtDetails}>
38
+ {link.ordersRef[0].fullName}
39
+ </Text>
40
+ </View>)}
41
+ </View>
42
+ <View style={styles.rightContainer}>
43
+ {priority == null ? null : (<Badge color={ManufacturingOrder.getPriorityColor(priority, Colors)} title={ManufacturingOrder.getPriority(priority, I18n)}/>)}
44
+ <Icon name="chevron-right" color={Colors.secondaryColor.background_light} size={20}/>
45
+ </View>
46
+ </Card>
47
+ </TouchableOpacity>);
48
+ };
49
+ const getStyles = color => StyleSheet.create({
50
+ border: { borderLeftWidth: 7, borderLeftColor: color },
51
+ });
52
+ const styles = StyleSheet.create({
53
+ rightContainer: {
54
+ width: '20%',
55
+ flexDirection: 'column',
56
+ justifyContent: 'space-evenly',
57
+ alignItems: 'center',
58
+ },
59
+ container: {
60
+ flexDirection: 'row',
61
+ },
62
+ textContainer: {
63
+ width: '80%',
64
+ flexDirection: 'column',
65
+ justifyContent: 'space-between',
66
+ marginRight: 5,
67
+ },
68
+ txtImportant: {
69
+ fontSize: 18,
70
+ fontWeight: 'bold',
71
+ },
72
+ txtDetails: {
73
+ fontSize: 14,
74
+ },
75
+ origin: {
76
+ flexDirection: 'row',
77
+ },
78
+ icon: {
79
+ marginRight: 5,
80
+ },
81
+ });
82
+ export default ManufacturingOrderCard;
83
+ //# sourceMappingURL=ManufacturingOrderCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManufacturingOrderCard.js","sourceRoot":"","sources":["../../../../src/components/organisms/ManufacturingOrderCard/ManufacturingOrderCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,kBAAkB,MAAM,oC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E,CACxB,UAAU,CAAC,MAAM,CAAC;IAChB,MAAM,EAAE,EAAC,eAAe,EAAE,CAAC,EAAE,eAAe,EAAE,KAAK,EAAC;CACrD,CAAC,CAAC;AAEL,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,KAAK,EAAE,KAAK;QACZ,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,QAAQ;KACrB;IACD,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;KACrB;IACD,aAAa,EAAE;QACb,KAAK,EAAE,KAAK;QACZ,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,eAAe;QAC/B,WAAW,EAAE,CAAC;KACf;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;KACb;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;KACrB;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;KACf;CACF,CAAC,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface ManufacturingOrderHeaderProps {
2
+ reference: string;
3
+ status: number;
4
+ priority: number;
5
+ parentMO?: any;
6
+ }
7
+ declare const ManufacturingOrderHeader: ({ reference, status, priority, parentMO, }: ManufacturingOrderHeaderProps) => JSX.Element;
8
+ export default ManufacturingOrderHeader;
@@ -0,0 +1,68 @@
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 React from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { Badge, LabelText, Text, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { useTranslator } from '@axelor/aos-mobile-core';
22
+ import ManufacturingOrder from '../../../types/manufacturing-order';
23
+ const ManufacturingOrderHeader = ({ reference, status, priority, parentMO = null, }) => {
24
+ const Colors = useThemeColor();
25
+ const I18n = useTranslator();
26
+ return (<View style={styles.infoContainer}>
27
+ <View style={styles.refContainer}>
28
+ {reference != null && (<Text style={styles.text_important}>{reference}</Text>)}
29
+ {parentMO != null && (<LabelText iconName="sitemap" title={parentMO.manufOrderSeq}/>)}
30
+ </View>
31
+ <View style={styles.badgeContainer}>
32
+ {status == null ? (<View style={styles.refContainer}/>) : (<Badge color={ManufacturingOrder.getStatusColor(status, Colors)} title={ManufacturingOrder.getStatus(status, I18n)}/>)}
33
+ {priority == null ? (<View style={styles.refContainer}/>) : (<Badge color={ManufacturingOrder.getPriorityColor(priority, Colors)} title={ManufacturingOrder.getPriority(priority, I18n)}/>)}
34
+ </View>
35
+ </View>);
36
+ };
37
+ const styles = StyleSheet.create({
38
+ infoContainer: {
39
+ flexDirection: 'row',
40
+ justifyContent: 'space-around',
41
+ alignItems: 'center',
42
+ marginBottom: '2%',
43
+ },
44
+ refContainer: {
45
+ flex: 1,
46
+ flexDirection: 'row',
47
+ alignItems: 'center',
48
+ marginLeft: 24,
49
+ },
50
+ badgeContainer: {
51
+ flex: 1,
52
+ justifyContent: 'center',
53
+ alignItems: 'center',
54
+ marginTop: '2%',
55
+ marginHorizontal: 32,
56
+ flexDirection: 'row-reverse',
57
+ },
58
+ text_important: {
59
+ marginRight: 8,
60
+ fontSize: 16,
61
+ fontWeight: 'bold',
62
+ },
63
+ text_secondary: {
64
+ fontSize: 14,
65
+ },
66
+ });
67
+ export default ManufacturingOrderHeader;
68
+ //# sourceMappingURL=ManufacturingOrderHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManufacturingOrderHeader.js","sourceRoot":"","sources":["../../../../src/components/organisms/ManufacturingOrderHeader/ManufacturingOrderHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AASpE,MAAM,wBAAwB,GAAG,CAAC,EAChC,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,GAAG,IAAI,GACe,EAAE,EAAE;IAClC,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAChC;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAC/B;QAAA,CAAC,SAAS,IAAI,IAAI,IAAI,CACpB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CACvD,CACD;QAAA,CAAC,QAAQ,IAAI,IAAI,IAAI,CACnB,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAG,CAChE,CACH;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAA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IACD,cAAc,EAAE;QACd,WAAW,EAAE,CAAC;QACd,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface OperationOrderCardProps {
2
+ style?: any;
3
+ status: number;
4
+ operationName: string;
5
+ workcenter: string;
6
+ plannedDuration?: string;
7
+ priority: number;
8
+ onPress: (any?: any) => void;
9
+ }
10
+ declare const OperationOrderCard: ({ style, status, operationName, workcenter, plannedDuration, priority, onPress, }: OperationOrderCardProps) => JSX.Element;
11
+ export default OperationOrderCard;
@@ -0,0 +1,76 @@
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 React, { useMemo } from 'react';
19
+ import { StyleSheet, View, TouchableOpacity } from 'react-native';
20
+ import { Badge, Card, Icon, LabelText, Text, useThemeColor, } from '@axelor/aos-mobile-ui';
21
+ import { formatDuration } from '@axelor/aos-mobile-core';
22
+ import ManufacturingOrder from '../../../types/manufacturing-order';
23
+ const OperationOrderCard = ({ style, status, operationName, workcenter, plannedDuration, priority, onPress, }) => {
24
+ const Colors = useThemeColor();
25
+ const borderStyle = useMemo(() => {
26
+ return getStyles(ManufacturingOrder.getStatusColor(status, Colors).background)?.border;
27
+ }, [Colors, status]);
28
+ return (<TouchableOpacity onPress={onPress} activeOpacity={0.9}>
29
+ <Card style={[styles.container, borderStyle, style]}>
30
+ <View style={styles.textContainer}>
31
+ <Text style={styles.txtImportant}>{operationName}</Text>
32
+ <Text style={styles.txtDetails}>{workcenter}</Text>
33
+ {plannedDuration != null && (<LabelText iconName="stopwatch" title={formatDuration(plannedDuration)}/>)}
34
+ </View>
35
+ <View style={styles.rightContainer}>
36
+ {priority == null ? null : (<Badge color={Colors.priorityColor} title={priority.toString()} style={styles.badge}/>)}
37
+ <Icon name="chevron-right" color={Colors.secondaryColor.background_light} size={20}/>
38
+ </View>
39
+ </Card>
40
+ </TouchableOpacity>);
41
+ };
42
+ const getStyles = color => StyleSheet.create({
43
+ border: { borderLeftWidth: 7, borderLeftColor: color },
44
+ });
45
+ const styles = StyleSheet.create({
46
+ rightContainer: {
47
+ width: '10%',
48
+ flexDirection: 'column',
49
+ justifyContent: 'space-evenly',
50
+ alignItems: 'center',
51
+ },
52
+ container: {
53
+ flexDirection: 'row',
54
+ },
55
+ textContainer: {
56
+ width: '90%',
57
+ flexDirection: 'column',
58
+ justifyContent: 'space-between',
59
+ marginRight: 5,
60
+ },
61
+ txtImportant: {
62
+ fontSize: 18,
63
+ fontWeight: 'bold',
64
+ },
65
+ txtDetails: {
66
+ fontSize: 14,
67
+ },
68
+ badge: {
69
+ borderRadius: 50,
70
+ width: 35,
71
+ height: 35,
72
+ marginBottom: 10,
73
+ },
74
+ });
75
+ export default OperationOrderCard;
76
+ //# sourceMappingURL=OperationOrderCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationOrderCard.js","sourceRoot":"","sources":["../../../../src/components/organisms/OperationOrderCard/OperationOrderCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAChE,OA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;IACD,KAAK,EAAE;QACL,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,17 @@
1
+ interface OperationOrderCardProps {
2
+ style?: any;
3
+ status: number;
4
+ manufOrder: string;
5
+ operationName: string;
6
+ workcenter?: string;
7
+ machine?: string;
8
+ plannedStartDate?: string;
9
+ plannedEndDate?: string;
10
+ realStartDate?: string;
11
+ realEndDate?: string;
12
+ plannedDuration?: string;
13
+ priority: number;
14
+ onPress: (any?: any) => void;
15
+ }
16
+ declare const OperationOrderDetailsCard: ({ style, status, manufOrder, operationName, workcenter, machine, plannedStartDate, plannedEndDate, realStartDate, realEndDate, plannedDuration, priority, onPress, }: OperationOrderCardProps) => JSX.Element;
17
+ export default OperationOrderDetailsCard;
@@ -0,0 +1,86 @@
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 React, { useMemo } from 'react';
19
+ import { StyleSheet, View, TouchableOpacity } from 'react-native';
20
+ import { Badge, Card, Icon, Text, LabelText, useThemeColor, } from '@axelor/aos-mobile-ui';
21
+ import { formatDuration, useTranslator } from '@axelor/aos-mobile-core';
22
+ import OperationOrder from '../../../types/operation-order';
23
+ const OperationOrderDetailsCard = ({ style, status, manufOrder, operationName, workcenter, machine, plannedStartDate, plannedEndDate, realStartDate, realEndDate, plannedDuration, priority, onPress, }) => {
24
+ const Colors = useThemeColor();
25
+ const I18n = useTranslator();
26
+ const borderStyle = useMemo(() => {
27
+ return getStyles(OperationOrder.getStatusColor(status, Colors).background)
28
+ ?.border;
29
+ }, [Colors, status]);
30
+ const [startDate, endDate] = OperationOrder.getDates(status, plannedStartDate, plannedEndDate, realStartDate, realEndDate, I18n);
31
+ return (<TouchableOpacity onPress={onPress} activeOpacity={0.9}>
32
+ <Card style={[styles.container, borderStyle, style]}>
33
+ <View style={styles.textContainer}>
34
+ <Text style={styles.txtImportant}>{manufOrder}</Text>
35
+ <Text style={styles.txtDetails}>{operationName}</Text>
36
+ <LabelText iconName="pallet" title={workcenter + ' ' + (machine ? `- ${machine}` : '')}/>
37
+ {startDate && (<Text style={styles.txtDetails}>{`${startDate.title} ${startDate.value}`}</Text>)}
38
+ {status !== OperationOrder.status.InProgress &&
39
+ status !== OperationOrder.status.StandBy &&
40
+ endDate && (<Text style={styles.txtDetails}>{`${endDate.title} ${endDate.value}`}</Text>)}
41
+ {(status === OperationOrder.status.InProgress ||
42
+ status === OperationOrder.status.StandBy) && (<LabelText iconName="stopwatch" title={`${plannedDuration ? formatDuration(plannedDuration) : ''}`}/>)}
43
+ </View>
44
+ <View style={styles.rightContainer}>
45
+ {priority == null ? null : (<Badge color={Colors.priorityColor} title={priority.toString()} style={styles.badge}/>)}
46
+ <Icon name="chevron-right" color={Colors.secondaryColor.background_light} size={20}/>
47
+ </View>
48
+ </Card>
49
+ </TouchableOpacity>);
50
+ };
51
+ const getStyles = color => StyleSheet.create({
52
+ border: { borderLeftWidth: 7, borderLeftColor: color },
53
+ });
54
+ const styles = StyleSheet.create({
55
+ rightContainer: {
56
+ width: '10%',
57
+ flexDirection: 'column',
58
+ justifyContent: 'space-evenly',
59
+ alignItems: 'center',
60
+ },
61
+ container: {
62
+ flexDirection: 'row',
63
+ },
64
+ textContainer: {
65
+ width: '90%',
66
+ flexDirection: 'column',
67
+ justifyContent: 'space-between',
68
+ marginRight: 5,
69
+ },
70
+ txtImportant: {
71
+ fontSize: 18,
72
+ fontWeight: 'bold',
73
+ },
74
+ txtDetails: {
75
+ fontSize: 14,
76
+ justifyContent: 'center',
77
+ },
78
+ badge: {
79
+ borderRadius: 50,
80
+ width: 35,
81
+ height: 35,
82
+ marginBottom: 10,
83
+ },
84
+ });
85
+ export default OperationOrderDetailsCard;
86
+ //# sourceMappingURL=OperationOrderDetailsCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationOrderDetailsCard.js","sourceRoot":"","sources":["../../../../src/components/organisms/OperationOrderDetailsCard/OperationOrderDetailsCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtE,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAkB5D,MAAM,yBAAyB,GAAG,CAAC,EACjC,KAAK,EACL,MAAM,EACN,UAAU,EACV,aAAa,EACb,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,EACR,OAAO,GACiB,EAAE,EAAE;IAC5B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;QAC/B,OAAO,SAAS,CAAC,cAAc,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,UA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AC;AAEL,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,KAAK,EAAE,KAAK;QACZ,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,QAAQ;KACrB;IACD,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;KACrB;IACD,aAAa,EAAE;QACb,KAAK,EAAE,KAAK;QACZ,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,eAAe;QAC/B,WAAW,EAAE,CAAC;KACf;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,cAAc,EAAE,QAAQ;KACzB;IACD,KAAK,EAAE;QACL,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC;AAEH,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface OperationOrderHeaderProps {
2
+ manufOrderRef: string;
3
+ name: string;
4
+ status: number;
5
+ priority: number;
6
+ }
7
+ declare function OperationOrderHeader({ manufOrderRef, name, status, priority, }: OperationOrderHeaderProps): JSX.Element;
8
+ export default OperationOrderHeader;
@@ -0,0 +1,72 @@
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 React from 'react';
19
+ import { StyleSheet, View } from 'react-native';
20
+ import { Text, Badge, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { useTranslator } from '@axelor/aos-mobile-core';
22
+ import OperationOrder from '../../../types/operation-order';
23
+ function OperationOrderHeader({ manufOrderRef, name, status, priority, }) {
24
+ const Colors = useThemeColor();
25
+ const I18n = useTranslator();
26
+ return (<View style={styles.infoContainer}>
27
+ <View style={styles.refContainer}>
28
+ {manufOrderRef && (<Text style={styles.textImportant}>{manufOrderRef}</Text>)}
29
+ {name && <Text style={styles.textSecondary}>{name}</Text>}
30
+ </View>
31
+ <View style={styles.badgeContainer}>
32
+ {status && (<Badge color={OperationOrder.getStatusColor(status, Colors)} title={OperationOrder.getStatus(status, I18n)}/>)}
33
+ {priority && (<Badge color={Colors.priorityColor} title={priority.toString()} style={styles.badge}/>)}
34
+ </View>
35
+ </View>);
36
+ }
37
+ const styles = StyleSheet.create({
38
+ badge: {
39
+ borderRadius: 50,
40
+ width: 35,
41
+ height: 35,
42
+ marginRight: 10,
43
+ },
44
+ badgeContainer: {
45
+ flex: 1,
46
+ alignItems: 'center',
47
+ marginTop: '2%',
48
+ marginHorizontal: 20,
49
+ flexDirection: 'row-reverse',
50
+ },
51
+ infoContainer: {
52
+ flexDirection: 'row',
53
+ justifyContent: 'space-around',
54
+ alignItems: 'center',
55
+ marginBottom: '2%',
56
+ },
57
+ refContainer: {
58
+ flex: 1,
59
+ alignItems: 'flex-start',
60
+ marginLeft: 24,
61
+ },
62
+ textImportant: {
63
+ marginRight: 8,
64
+ fontSize: 16,
65
+ fontWeight: 'bold',
66
+ },
67
+ textSecondary: {
68
+ fontSize: 14,
69
+ },
70
+ });
71
+ export default OperationOrderHeader;
72
+ //# sourceMappingURL=OperationOrderHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationOrderHeader.js","sourceRoot":"","sources":["../../../../src/components/organisms/OperationOrderHeader/OperationOrderHeader.ts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AC,QAAQ,IAAI,CACX,CAAC,KAAK,CACJ,KAAK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAC5B,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAC3B,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACpB,CACH,CACH;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,EAAE;KAChB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,EAAE;QACpB,aAAa,EAAE,aAAa;KAC7B;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,IAAI;KACnB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,EAAE;KACf;IACD,aAAa,EAAE;QACb,WAAW,EAAE,CAAC;QACd,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface ProducedProductCardProps {
2
+ style?: any;
3
+ productName: string;
4
+ plannedQty: number;
5
+ producedQty?: number;
6
+ unitName?: string;
7
+ trackingNumberSeq?: string;
8
+ onPress: () => void;
9
+ }
10
+ declare const ProducedProductCard: ({ style, productName, plannedQty, producedQty, unitName, trackingNumberSeq, onPress, }: ProducedProductCardProps) => JSX.Element;
11
+ export default ProducedProductCard;
@@ -0,0 +1,61 @@
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 React, { useMemo } from 'react';
19
+ import { StyleSheet, TouchableOpacity } from 'react-native';
20
+ import { Card, LabelText, Text, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { useTranslator } from '@axelor/aos-mobile-core';
22
+ const ProducedProductCard = ({ style, productName, plannedQty, producedQty, unitName, trackingNumberSeq = null, onPress, }) => {
23
+ const Colors = useThemeColor();
24
+ const I18n = useTranslator();
25
+ const borderStyles = useMemo(() => {
26
+ if (plannedQty > producedQty) {
27
+ return getStyles(Colors.plannedColor.background)?.border;
28
+ }
29
+ return getStyles(Colors.primaryColor.background)?.border;
30
+ }, [Colors, plannedQty, producedQty]);
31
+ return (<TouchableOpacity onPress={onPress} activeOpacity={0.9}>
32
+ <Card style={[styles.cardContainer, borderStyles, style]}>
33
+ <Text style={styles.txtImportant}>{productName}</Text>
34
+ <LabelText title={`${I18n.t('Manufacturing_PlannedQty')}:`} value={`${parseFloat(plannedQty.toString()).toFixed(2)} ${unitName != null ? unitName : ''}`}/>
35
+ <LabelText title={`${I18n.t('Manufacturing_ProducedQty')}:`} value={`${producedQty == null
36
+ ? parseFloat('0').toFixed(2)
37
+ : parseFloat(producedQty.toString()).toFixed(2)} ${unitName != null ? unitName : ''}`}/>
38
+ {trackingNumberSeq != null && (<LabelText iconName="qrcode" title={`${I18n.t('Manufacturing_TrackingNumber')}:`} value={trackingNumberSeq}/>)}
39
+ </Card>
40
+ </TouchableOpacity>);
41
+ };
42
+ const getStyles = color => StyleSheet.create({
43
+ border: { borderLeftWidth: 7, borderLeftColor: color },
44
+ });
45
+ const styles = StyleSheet.create({
46
+ cardContainer: {
47
+ marginHorizontal: 12,
48
+ flexDirection: 'column',
49
+ paddingLeft: 10,
50
+ paddingRight: 15,
51
+ },
52
+ txtImportant: {
53
+ fontSize: 18,
54
+ fontWeight: 'bold',
55
+ },
56
+ txtDetails: {
57
+ fontSize: 14,
58
+ },
59
+ });
60
+ export default ProducedProductCard;
61
+ //# sourceMappingURL=ProducedProductCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProducedProductCard.js","sourceRoot":"","sources":["../../../../src/components/organisms/ProducedProductCard/ProducedProductCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAYtD,MAAM,mBAAmB,GAAG,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,iBAAiB,GAAG,IAAI,EACxB,OAAO,GACkB,EAAE,EAAE;IAC7B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,IAAI,UAAU,GAAG,WAAW,EAAE;YAC5B,OAAO,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,MAA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5B,CAAC,SAAS,CACR,QAAQ,CAAC,QAAQ,CACjB,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,8BAA8B,CAAC,GAAG,CAAC,CACpD,KAAK,CAAC,CAAC,iBAAiB,CAAC,EACzB,CACH,CACH;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,gBAAgB,CAAC,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,KAAK,CAAC,EAAE,CACxB,UAAU,CAAC,MAAM,CAAC;IAChB,MAAM,EAAE,EAAC,eAAe,EAAE,CAAC,EAAE,eAAe,EAAE,KAAK,EAAC;CACrD,CAAC,CAAC;AAEL,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,gBAAgB,EAAE,EAAE;QACpB,aAAa,EAAE,QAAQ;QACvB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;KACjB;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,10 @@
1
+ interface MetaFileProps {
2
+ id: number;
3
+ fileName: string;
4
+ }
5
+ interface ProductionFileLargeCardProps {
6
+ image?: MetaFileProps;
7
+ description: string;
8
+ }
9
+ declare function ProductionFileLargeCard({ image, description, }: ProductionFileLargeCardProps): JSX.Element;
10
+ export default ProductionFileLargeCard;
@@ -0,0 +1,62 @@
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 React from 'react';
19
+ import { Dimensions, StyleSheet, View } from 'react-native';
20
+ import RenderHTML from 'react-native-render-html';
21
+ import { AOSImage, useTranslator } from '@axelor/aos-mobile-core';
22
+ import { Text, useThemeColor } from '@axelor/aos-mobile-ui';
23
+ function ProductionFileLargeCard({ image, description, }) {
24
+ const I18n = useTranslator();
25
+ const Colors = useThemeColor();
26
+ const source = {
27
+ html: `${description}`,
28
+ };
29
+ return (<View style={styles.container}>
30
+ <View style={styles.imageContainer}>
31
+ <AOSImage metaFile={image} defaultIconSize={Dimensions.get('window').width * 0.4} imageSize={styles.imageStyle} resizeMode="contain" enableImageViewer={true}/>
32
+ </View>
33
+ <View style={styles.descriptionContainer}>
34
+ <Text style={styles.text}>{I18n.t('Base_Description')}</Text>
35
+ <RenderHTML source={source} contentWidth={Dimensions.get('window').width * 0.9} baseStyle={{ color: Colors.text }}/>
36
+ </View>
37
+ </View>);
38
+ }
39
+ const styles = StyleSheet.create({
40
+ container: {
41
+ marginVertical: 10,
42
+ marginHorizontal: 20,
43
+ },
44
+ descriptionContainer: {
45
+ padding: 10,
46
+ maxHeight: Dimensions.get('window').width * 0.4,
47
+ },
48
+ imageContainer: {
49
+ width: '100%',
50
+ justifyContent: 'center',
51
+ alignItems: 'center',
52
+ },
53
+ imageStyle: {
54
+ width: Dimensions.get('window').width * 0.4,
55
+ height: Dimensions.get('window').width * 0.4,
56
+ },
57
+ text: {
58
+ textTransform: 'uppercase',
59
+ },
60
+ });
61
+ export default ProductionFileLargeCard;
62
+ //# sourceMappingURL=ProductionFileLargeCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductionFileLargeCard.js","sourceRoot":"","sources":["../../../../src/components/organisms/ProductionFileLargeCard/ProductionFileLargeCard.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