@axelor/aos-mobile-manufacturing 6.4.1 → 6.4.2

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 (95) hide show
  1. package/README.md +2 -2
  2. package/lib/api/operation-order-api.js +3 -0
  3. package/lib/api/operation-order-api.js.map +1 -1
  4. package/lib/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.d.ts +1 -6
  5. package/lib/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.js +14 -7
  6. package/lib/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.js.map +1 -1
  7. package/lib/components/organisms/LinkedManufacturingOrderCard/LinkedManufacturingOrderCard.d.ts +5 -0
  8. package/lib/components/organisms/LinkedManufacturingOrderCard/LinkedManufacturingOrderCard.js +45 -0
  9. package/lib/components/organisms/LinkedManufacturingOrderCard/LinkedManufacturingOrderCard.js.map +1 -0
  10. package/lib/components/organisms/ManufacturingOrderHalfLabelCardList/ManufacturingOrderHalfLabelCardList.d.ts +6 -0
  11. package/lib/components/organisms/ManufacturingOrderHalfLabelCardList/ManufacturingOrderHalfLabelCardList.js +35 -0
  12. package/lib/components/organisms/ManufacturingOrderHalfLabelCardList/ManufacturingOrderHalfLabelCardList.js.map +1 -0
  13. package/lib/components/organisms/ManufacturingOrderIconButtonList/ManufacturingOrderIconButtonList.d.ts +2 -0
  14. package/lib/components/organisms/ManufacturingOrderIconButtonList/ManufacturingOrderIconButtonList.js +50 -0
  15. package/lib/components/organisms/ManufacturingOrderIconButtonList/ManufacturingOrderIconButtonList.js.map +1 -0
  16. package/lib/components/organisms/ManufacturingOrderNotesCardList/ManufacturingOrderNotesCardList.d.ts +5 -0
  17. package/lib/components/organisms/ManufacturingOrderNotesCardList/ManufacturingOrderNotesCardList.js +30 -0
  18. package/lib/components/organisms/ManufacturingOrderNotesCardList/ManufacturingOrderNotesCardList.js.map +1 -0
  19. package/lib/components/organisms/ManufacturingOrderProductionOrderSetView/ManufacturingOrderProductionOrderSetView.d.ts +4 -0
  20. package/lib/components/organisms/ManufacturingOrderProductionOrderSetView/ManufacturingOrderProductionOrderSetView.js +65 -0
  21. package/lib/components/organisms/ManufacturingOrderProductionOrderSetView/ManufacturingOrderProductionOrderSetView.js.map +1 -0
  22. package/lib/components/organisms/ManufacturingOrderSaleOrderSetView/ManufacturingOrderSaleOrderSetView.d.ts +5 -0
  23. package/lib/components/organisms/ManufacturingOrderSaleOrderSetView/ManufacturingOrderSaleOrderSetView.js +54 -0
  24. package/lib/components/organisms/ManufacturingOrderSaleOrderSetView/ManufacturingOrderSaleOrderSetView.js.map +1 -0
  25. package/lib/components/organisms/OperationOrderLabelTextList/OperationOrderLabelTextList.d.ts +9 -0
  26. package/lib/components/organisms/OperationOrderLabelTextList/OperationOrderLabelTextList.js +39 -0
  27. package/lib/components/organisms/OperationOrderLabelTextList/OperationOrderLabelTextList.js.map +1 -0
  28. package/lib/components/organisms/OperationOrderStopwatch/OperationOrderStopwatch.d.ts +2 -0
  29. package/lib/components/organisms/OperationOrderStopwatch/OperationOrderStopwatch.js +42 -0
  30. package/lib/components/organisms/OperationOrderStopwatch/OperationOrderStopwatch.js.map +1 -0
  31. package/lib/components/organisms/ProdProductFixedItems/ProdProductFixedItems.d.ts +8 -0
  32. package/lib/components/organisms/ProdProductFixedItems/ProdProductFixedItems.js +29 -0
  33. package/lib/components/organisms/ProdProductFixedItems/ProdProductFixedItems.js.map +1 -0
  34. package/lib/components/organisms/ProductionFileLargeCard/ProductionFileLargeCard.js +2 -6
  35. package/lib/components/organisms/ProductionFileLargeCard/ProductionFileLargeCard.js.map +1 -1
  36. package/lib/components/organisms/ProductionFileSmallCard/ProductionFileSmallCard.js +3 -7
  37. package/lib/components/organisms/ProductionFileSmallCard/ProductionFileSmallCard.js.map +1 -1
  38. package/lib/components/organisms/index.d.ts +9 -0
  39. package/lib/components/organisms/index.js +9 -0
  40. package/lib/components/organisms/index.js.map +1 -1
  41. package/lib/features/machinesSlice.js +1 -1
  42. package/lib/features/machinesSlice.js.map +1 -1
  43. package/lib/features/manufacturingOrderSlice.js +6 -6
  44. package/lib/features/manufacturingOrderSlice.js.map +1 -1
  45. package/lib/features/operationOrderSlice.js +5 -5
  46. package/lib/features/operationOrderSlice.js.map +1 -1
  47. package/lib/features/prodProductSlice.js +6 -6
  48. package/lib/features/prodProductSlice.js.map +1 -1
  49. package/lib/features/productionFileSlice.js +1 -1
  50. package/lib/features/productionFileSlice.js.map +1 -1
  51. package/lib/features/wasteProductsSlice.js +5 -5
  52. package/lib/features/wasteProductsSlice.js.map +1 -1
  53. package/lib/features/workCentersSlice.js +1 -1
  54. package/lib/features/workCentersSlice.js.map +1 -1
  55. package/lib/i18n/en.json +22 -1
  56. package/lib/i18n/fr.json +22 -1
  57. package/lib/screens/manufactoringOrder/ManufacturingOrderDetailsScreen.js +12 -75
  58. package/lib/screens/manufactoringOrder/ManufacturingOrderDetailsScreen.js.map +1 -1
  59. package/lib/screens/manufactoringOrder/ManufacturingOrderListProductionOrderScreen.d.ts +1 -2
  60. package/lib/screens/manufactoringOrder/ManufacturingOrderListProductionOrderScreen.js +5 -23
  61. package/lib/screens/manufactoringOrder/ManufacturingOrderListProductionOrderScreen.js.map +1 -1
  62. package/lib/screens/manufactoringOrder/ManufacturingOrderListSaleOrderScreen.js +1 -1
  63. package/lib/screens/manufactoringOrder/ManufacturingOrderListSaleOrderScreen.js.map +1 -1
  64. package/lib/screens/manufactoringOrder/ManufacturingOrderListScreen.js +29 -96
  65. package/lib/screens/manufactoringOrder/ManufacturingOrderListScreen.js.map +1 -1
  66. package/lib/screens/manufactoringOrder/ManufacturingOrderOperationListScreen.js +28 -95
  67. package/lib/screens/manufactoringOrder/ManufacturingOrderOperationListScreen.js.map +1 -1
  68. package/lib/screens/manufactoringOrder/consumedProduct/ChildrenManufOrderListScreen.js +33 -116
  69. package/lib/screens/manufactoringOrder/consumedProduct/ChildrenManufOrderListScreen.js.map +1 -1
  70. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductDetailsScreen.js +7 -8
  71. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductDetailsScreen.js.map +1 -1
  72. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductListScreen.js +38 -44
  73. package/lib/screens/manufactoringOrder/consumedProduct/ConsumedProductListScreen.js.map +1 -1
  74. package/lib/screens/manufactoringOrder/index.d.ts +1 -2
  75. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductDetailsScreen.js +4 -5
  76. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductDetailsScreen.js.map +1 -1
  77. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductListScreen.js +30 -30
  78. package/lib/screens/manufactoringOrder/producedProduct/ProducedProductListScreen.js.map +1 -1
  79. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductDetailsScreen.js +6 -18
  80. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductDetailsScreen.js.map +1 -1
  81. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductListScreen.js +1 -1
  82. package/lib/screens/manufactoringOrder/wasteProduct/WasteProductListScreen.js.map +1 -1
  83. package/lib/screens/operationOrder/OperationOrderDetailsScreen.js +8 -36
  84. package/lib/screens/operationOrder/OperationOrderDetailsScreen.js.map +1 -1
  85. package/lib/screens/operationOrder/OperationOrderListScreen.js +29 -96
  86. package/lib/screens/operationOrder/OperationOrderListScreen.js.map +1 -1
  87. package/lib/screens/operationOrder/OperationOrderPlanningScreen.d.ts +3 -1
  88. package/lib/screens/operationOrder/OperationOrderPlanningScreen.js +43 -77
  89. package/lib/screens/operationOrder/OperationOrderPlanningScreen.js.map +1 -1
  90. package/lib/screens/operationOrder/ProductionFileScreen.js +1 -1
  91. package/lib/screens/operationOrder/ProductionFileScreen.js.map +1 -1
  92. package/lib/types/operation-order.d.ts +1 -0
  93. package/lib/types/operation-order.js +18 -0
  94. package/lib/types/operation-order.js.map +1 -1
  95. package/package.json +8 -8
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Presentation
8
8
 
9
- This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
9
+ This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
10
10
 
11
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
12
 
@@ -20,7 +20,7 @@ yarn add @axelor/aos-mobile-manufacturing
20
20
 
21
21
  Compatibility with React v18.2.x and React Native v0.68.x.
22
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.
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
24
 
25
25
  ```typescript
26
26
  import React from 'react';
@@ -138,6 +138,9 @@ export async function getPlannedOperationOrder(date) {
138
138
  },
139
139
  ],
140
140
  },
141
+ fields: operationOrderListFields,
142
+ sortBy: ['plannedStartDateT', 'manufOrder.manufOrderSeq', 'statusSelect'],
143
+ limit: null,
141
144
  },
142
145
  });
143
146
  }
@@ -1 +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;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K,UAAU,mBAAmB,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"}
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,4BAA4B,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE;IACjE,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,SAAS,CAAC,IAAI,CAAC;QACb,QAA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AAE,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"}
@@ -1,7 +1,2 @@
1
- interface OperationOrderDatesCardProps {
2
- status: number;
3
- startDate: string;
4
- endDate: string;
5
- }
6
- declare function OperationOrderDatesCard({ status, startDate, endDate, }: OperationOrderDatesCardProps): JSX.Element;
1
+ declare function OperationOrderDatesCard({}: {}): JSX.Element;
7
2
  export default OperationOrderDatesCard;
@@ -15,18 +15,25 @@
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 React from 'react';
18
+ import React, { useMemo } from 'react';
19
19
  import { FromTo, TitledValue } from '@axelor/aos-mobile-ui';
20
- import { useTranslator } from '@axelor/aos-mobile-core';
20
+ import { isEmpty, useSelector, useTranslator } from '@axelor/aos-mobile-core';
21
21
  import OperationOrder from '../../../types/operation-order';
22
- function OperationOrderDatesCard({ status, startDate, endDate, }) {
22
+ function OperationOrderDatesCard({}) {
23
23
  const I18n = useTranslator();
24
- return (<FromTo fromComponent={<TitledValue title={status === OperationOrder.status.Draft ||
25
- status === OperationOrder.status.Planned
24
+ const { operationOrder } = useSelector((state) => state.operationOrder);
25
+ const [startDate, endDate] = useMemo(() => {
26
+ if (!isEmpty(operationOrder)) {
27
+ return OperationOrder.getDates(operationOrder?.statusSelect, operationOrder?.plannedStartDateT, operationOrder?.plannedEndDateT, operationOrder?.realStartDateT, operationOrder?.realEndDateT, I18n);
28
+ }
29
+ return [];
30
+ }, [I18n, operationOrder]);
31
+ return (<FromTo fromComponent={<TitledValue title={operationOrder?.statusSelect === OperationOrder.status.Draft ||
32
+ operationOrder?.statusSelect === OperationOrder.status.Planned
26
33
  ? I18n.t('Base_Estimated')
27
- : I18n.t('Base_Real')} value={startDate}/>} toComponent={<TitledValue title={status === OperationOrder.status.Finished
34
+ : I18n.t('Base_Real')} value={startDate?.value}/>} toComponent={<TitledValue title={operationOrder?.statusSelect === OperationOrder.status.Finished
28
35
  ? I18n.t('Base_Real')
29
- : I18n.t('Base_Estimated')} value={endDate}/>}/>);
36
+ : I18n.t('Base_Estimated')} value={endDate?.value}/>}/>);
30
37
  }
31
38
  export default OperationOrderDatesCard;
32
39
  //# sourceMappingURL=OperationOrderDatesCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OperationOrderDatesCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAQ5D,SAAS,uBAAuB,CAAC,EAC/B,MAAM,EACN,SAAS,EACT,OAAO,GACsB;IAC7B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,OAAO,CACL,CAAC,MAAM,CACL,aAAa,CAAC,CACZ,CAAC,WAAW,CACV,KAAK,CAAC,CACJ,MAAM,KAAK,cAAc,CAAC,MAAM,CAAC,KAAK;gBACtC,MAAM,KAAK,cAAc,CAAC,MAAM,CAAC,OAAO;gBACtC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC;gBAC1B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CACxB,CACD,KAAK,CAAC,CAAC,SAAS,CAAC,EACjB,CACH,CACD,WAAW,CAAC,CACV,CAAC,WAAW,CACV,KAAK,CAAC,CACJ,MAAM,KAAK,cAAc,CAAC,MAAM,CAAC,QAAQ;gBACvC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;gBACrB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAC7B,CACD,KAAK,CAAC,CAAC,OAAO,CAAC,EACf,CACH,EACD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"OperationOrderDatesCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/OperationOrderDatesCard/OperationOrderDatesCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAC5E,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,SAAS,uBAAuB,CAAC,EAAE;IACjC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAE3E,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE;QACxC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;YAC5B,OAAO,cAAc,CAAC,QAAQ,CAC5B,cAAc,EAAE,YAAY,EAC5B,cAAc,EAAE,iBAAiB,EACjC,cAAc,EAAE,eAAe,EAC/B,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,YAAY,EAC5B,IAAI,CACL,CAAC;SACH;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;IAE3B,OAAO,CACL,CAAC,MAAM,CACL,aAAa,CAAC,CACZ,CAAC,WAAW,CACV,KAAK,CAAC,CACJ,cAAc,EAAE,YAAY,KAAK,cAAc,CAAC,MAAM,CAAC,KAAK;gBAC5D,cAAc,EAAE,YAAY,KAAK,cAAc,CAAC,MAAM,CAAC,OAAO;gBAC5D,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC;gBAC1B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CACxB,CACD,KAAK,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EACxB,CACH,CACD,WAAW,CAAC,CACV,CAAC,WAAW,CACV,KAAK,CAAC,CACJ,cAAc,EAAE,YAAY,KAAK,cAAc,CAAC,MAAM,CAAC,QAAQ;gBAC7D,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;gBACrB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAC7B,CACD,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,EACtB,CACH,EACD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ declare const LinkedManufacturingOrderCard: ({ manufOrderSeq, statusSelect, }: {
2
+ manufOrderSeq: string;
3
+ statusSelect: number;
4
+ }) => JSX.Element;
5
+ export default LinkedManufacturingOrderCard;
@@ -0,0 +1,45 @@
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, TouchableOpacity } from 'react-native';
20
+ import { Badge, Card, LabelText, useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { clipboardProvider, useTranslator } from '@axelor/aos-mobile-core';
22
+ import ManufacturingOrder from '../../../types/manufacturing-order';
23
+ const LinkedManufacturingOrderCard = ({ manufOrderSeq, statusSelect, }) => {
24
+ const Colors = useThemeColor();
25
+ const I18n = useTranslator();
26
+ return (<TouchableOpacity activeOpacity={0.9} onPress={() => clipboardProvider.copyToClipboard(manufOrderSeq)}>
27
+ <Card style={styles.itemContainer}>
28
+ <LabelText title={manufOrderSeq} iconName="tag"/>
29
+ <Badge title={ManufacturingOrder.getStatus(statusSelect, I18n)} color={ManufacturingOrder.getStatusColor(statusSelect, Colors)}/>
30
+ </Card>
31
+ </TouchableOpacity>);
32
+ };
33
+ const styles = StyleSheet.create({
34
+ itemContainer: {
35
+ marginHorizontal: 12,
36
+ marginVertical: 4,
37
+ paddingHorizontal: 20,
38
+ paddingVertical: 10,
39
+ flexDirection: 'row',
40
+ justifyContent: 'space-between',
41
+ alignItems: 'center',
42
+ },
43
+ });
44
+ export default LinkedManufacturingOrderCard;
45
+ //# sourceMappingURL=LinkedManufacturingOrderCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkedManufacturingOrderCard.js","sourceRoot":"","sources":["../../../../src/components/organisms/LinkedManufacturingOrderCard/LinkedManufacturingOrderCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KA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,eAAe;QAC/B,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface ManufacturingOrderHalfLabelCardListProps {
2
+ onPressConsumedProduct: () => void;
3
+ onPressProducedProduct: () => void;
4
+ }
5
+ declare const ManufacturingOrderHalfLabelCardList: ({ onPressConsumedProduct, onPressProducedProduct, }: ManufacturingOrderHalfLabelCardListProps) => JSX.Element;
6
+ export default ManufacturingOrderHalfLabelCardList;
@@ -0,0 +1,35 @@
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 { HalfLabelCard } from '@axelor/aos-mobile-ui';
20
+ import { useTranslator } from '@axelor/aos-mobile-core';
21
+ import { View, StyleSheet } from 'react-native';
22
+ const ManufacturingOrderHalfLabelCardList = ({ onPressConsumedProduct, onPressProducedProduct, }) => {
23
+ const I18n = useTranslator();
24
+ return (<View style={styles.cardsContainer}>
25
+ <HalfLabelCard iconName="dolly" title={I18n.t('Manufacturing_ConsumedProduct')} onPress={onPressConsumedProduct}/>
26
+ <HalfLabelCard iconName="cogs" title={I18n.t('Manufacturing_ProducedProduct')} onPress={onPressProducedProduct}/>
27
+ </View>);
28
+ };
29
+ const styles = StyleSheet.create({
30
+ cardsContainer: {
31
+ flexDirection: 'row',
32
+ },
33
+ });
34
+ export default ManufacturingOrderHalfLabelCardList;
35
+ //# sourceMappingURL=ManufacturingOrderHalfLabelCardList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManufacturingOrderHalfLabelCardList.js","sourceRoot":"","sources":["../../../../src/components/organisms/ManufacturingOrderHalfLabelCardList/ManufacturingOrderHalfLabelCardList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAO9C,MAAM,mCAAmC,GAAG,CAAC,EAC3C,sBAAsB,EACtB,sBAAsB,GACmB,EAAE,EAAE;IAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CACjC;MAAA,CAAC,aAAa,CACZ,QAAQ,CAAC,OAAO,CAChB,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAC/C,OAAO,CAAC,CAAC,sBAAsB,CAAC,EAElC;MAAA,CAAC,aAAa,CACZ,QAAQ,CAAC,MAAM,CACf,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAC/C,OAAO,CAAC,CAAC,sBAAsB,CAAC,EAEpC;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,aAAa,EAAE,KAAK;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,mCAAmC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default ManufacturingOrderIconButtonList;
2
+ declare function ManufacturingOrderIconButtonList({}: {}): JSX.Element;
@@ -0,0 +1,50 @@
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, { useCallback } from 'react';
19
+ import { IconButton, useThemeColor } from '@axelor/aos-mobile-ui';
20
+ import { useTranslator, useDispatch, useSelector } from '@axelor/aos-mobile-core';
21
+ import ManufacturingOrder from '../../../types/manufacturing-order';
22
+ import { updateStatusOfManufOrder } from '../../../features/manufacturingOrderSlice';
23
+ const ManufacturingOrderIconButtonList = ({}) => {
24
+ const Colors = useThemeColor();
25
+ const I18n = useTranslator();
26
+ const dispatch = useDispatch();
27
+ const { manufOrder } = useSelector(state => state.manufacturingOrder);
28
+ const handleUpdateStatus = useCallback(targetStatus => {
29
+ dispatch(updateStatusOfManufOrder({
30
+ manufOrderId: manufOrder.id,
31
+ manufOrderVersion: manufOrder.version,
32
+ targetStatus,
33
+ }));
34
+ }, [dispatch, manufOrder]);
35
+ if (manufOrder.statusSelect === ManufacturingOrder.status.Planned) {
36
+ return (<IconButton title={I18n.t('Base_Start')} onPress={() => handleUpdateStatus(ManufacturingOrder.status.InProgress)} iconName="play"/>);
37
+ }
38
+ if (manufOrder.statusSelect === ManufacturingOrder.status.InProgress) {
39
+ return (<>
40
+ <IconButton title={I18n.t('Base_Pause')} onPress={() => handleUpdateStatus(ManufacturingOrder.status.StandBy)} iconName="pause" color={Colors.secondaryColor}/>
41
+ <IconButton title={I18n.t('Base_Finish')} onPress={() => handleUpdateStatus(ManufacturingOrder.status.Finished)} iconName="power-off"/>
42
+ </>);
43
+ }
44
+ if (manufOrder.statusSelect === ManufacturingOrder.status.StandBy) {
45
+ return (<IconButton title={I18n.t('Base_Continue')} onPress={() => handleUpdateStatus(ManufacturingOrder.status.InProgress)} iconName="step-forward"/>);
46
+ }
47
+ return null;
48
+ };
49
+ export default ManufacturingOrderIconButtonList;
50
+ //# sourceMappingURL=ManufacturingOrderIconButtonList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManufacturingOrderIconButtonList.js","sourceRoot":"","sources":["../../../../src/components/organisms/ManufacturingOrderIconButtonList/ManufacturingOrderIconButtonList.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAC,aAAa,EAAE,WAAW,EAAE,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAChF,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAC,wBAAwB,EAAC,MAAM,2CAA2C,CAAC;AAEnF,MAAM,gCAAgC,GAAG,CAAC,EAAE,EAAE,EAAE;IAC9C,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,EAAC,UAAU,EAAC,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAEpE,MAAM,kBAAkB,GAAG,WAAW,CACpC,YAAY,CAAC,EAAE;QACb,QAAQ,CACN,wBAAwB,CAAC;YACvB,YAAY,EAAE,UAAU,CAAC,EAAE;YAC3B,iBAAiB,EAAE,UAAU,CAAC,OAAO;YACrC,YAAY;SACb,C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,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CACxE,QAAQ,CAAC,cAAc,EACvB,CACH,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,gCAAgC,CAAC"}
@@ -0,0 +1,5 @@
1
+ interface ManufacturingOrderNotesCardListProps {
2
+ manufOrder: any;
3
+ }
4
+ declare const ManufacturingOrderNotesCardList: ({ manufOrder, }: ManufacturingOrderNotesCardListProps) => JSX.Element;
5
+ export default ManufacturingOrderNotesCardList;
@@ -0,0 +1,30 @@
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 { NotesCard } from '@axelor/aos-mobile-ui';
20
+ import { useTranslator } from '@axelor/aos-mobile-core';
21
+ const ManufacturingOrderNotesCardList = ({ manufOrder, }) => {
22
+ const I18n = useTranslator();
23
+ return (<>
24
+ <NotesCard title={I18n.t('Manufacturing_Notes')} data={manufOrder.note}/>
25
+ <NotesCard title={I18n.t('Manufacturing_Notes')} data={manufOrder.moCommentFromSaleOrder}/>
26
+ <NotesCard title={I18n.t('Manufacturing_Notes')} data={manufOrder.moCommentFromSaleOrderLine}/>
27
+ </>);
28
+ };
29
+ export default ManufacturingOrderNotesCardList;
30
+ //# sourceMappingURL=ManufacturingOrderNotesCardList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManufacturingOrderNotesCardList.js","sourceRoot":"","sources":["../../../../src/components/organisms/ManufacturingOrderNotesCardList/ManufacturingOrderNotesCardList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAMtD,MAAM,+BAA+B,GAAG,CAAC,EACvC,UAAU,GAC2B,EAAE,EAAE;IACzC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,OAAO,CACL,EACE;MAAA,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EACvE;MAAA,CAAC,SAAS,CACR,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CACrC,IAAI,CAAC,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAE1C;MAAA,CAAC,SAAS,CACR,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CACrC,IAAI,CAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAEhD;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default ManufacturingOrderProductionOrderSetView;
2
+ declare function ManufacturingOrderProductionOrderSetView({ onPressViewProduction }: {
3
+ onPressViewProduction: any;
4
+ }): JSX.Element;
@@ -0,0 +1,65 @@
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, { useEffect } from 'react';
19
+ import { View, StyleSheet } from 'react-native';
20
+ import { useThemeColor, ViewAllContainer, Text, Badge, } from '@axelor/aos-mobile-ui';
21
+ import { useDispatch, useSelector, useTranslator } from '@axelor/aos-mobile-core';
22
+ import { fetchLinkedManufOrders } from '../../../features/manufacturingOrderSlice';
23
+ const ManufacturingOrderProductionOrderSetView = ({ onPressViewProduction }) => {
24
+ const Colors = useThemeColor();
25
+ const I18n = useTranslator();
26
+ const dispatch = useDispatch();
27
+ const { manufOrder, linkedManufOrders } = useSelector(state => state.manufacturingOrder);
28
+ useEffect(() => {
29
+ if (manufOrder != null) {
30
+ dispatch(fetchLinkedManufOrders({
31
+ productionOrderList: manufOrder.productionOrderSet,
32
+ }));
33
+ }
34
+ }, [dispatch, manufOrder]);
35
+ if (!Array.isArray(manufOrder.productionOrderSet) ||
36
+ manufOrder.productionOrderSet.length === 0 ||
37
+ !Array.isArray(linkedManufOrders) ||
38
+ linkedManufOrders.length === 0) {
39
+ return null;
40
+ }
41
+ return (<ViewAllContainer onViewPress={onPressViewProduction} disabled={linkedManufOrders.length === 0} translator={I18n.t}>
42
+ <View style={styles.orderTitle}>
43
+ <Text>{I18n.t('Manufacturing_RefOP')}</Text>
44
+ </View>
45
+ <View style={styles.orderSetContainer}>
46
+ {linkedManufOrders.slice(0, 3).map(item => (<Badge style={styles.orderBadge} title={item.manufOrderSeq} key={item.id} color={Colors.priorityColor} numberOfLines={null}/>))}
47
+ </View>
48
+ </ViewAllContainer>);
49
+ };
50
+ const styles = StyleSheet.create({
51
+ orderTitle: {
52
+ marginHorizontal: 8,
53
+ },
54
+ orderSetContainer: {
55
+ flexDirection: 'row',
56
+ flexWrap: 'wrap',
57
+ width: '100%',
58
+ },
59
+ orderBadge: {
60
+ paddingHorizontal: 10,
61
+ width: null,
62
+ },
63
+ });
64
+ export default ManufacturingOrderProductionOrderSetView;
65
+ //# sourceMappingURL=ManufacturingOrderProductionOrderSetView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManufacturingOrderProductionOrderSetView.js","sourceRoot":"","sources":["../../../../src/components/organisms/ManufacturingOrderProductionOrderSetView/ManufacturingOrderProductionOrderSetView.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,IAAI,EACJ,KAAK,GACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAC,sBAAsB,EAAC,MAAM,2CAA2C,CAAC;AAEjF,MAAM,wCAAwC,GAAG,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE;IAC3E,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,EAAC,UAAU,EAAE,iBAAiB,EAAC,GAAG,WAAW,CACjD,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAClC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,IAAI,IAAI,EAAE;YACtB,QAAQ,CACN,sBAAsB,CAAC;gBACrB,mBAAmB,EAAE,UAAU,CAAC,kBAAkB;aACnD,CAAC,CACH,CAAC;SACH;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAA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ACV,gBAAgB,EAAE,CAAC;KACpB;IACD,iBAAiB,EAAE;QACjB,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,MAAM;KACd;IACD,UAAU,EAAE;QACV,iBAAiB,EAAE,EAAE;QACrB,KAAK,EAAE,IAAI;KACZ;CACF,CAAC,CAAC;AAEH,eAAe,wCAAwC,CAAC"}
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ onPressSaleOrder: () => void;
3
+ }
4
+ declare const ManufacturingOrderSaleOrderSetView: ({ onPressSaleOrder }: Props) => JSX.Element;
5
+ export default ManufacturingOrderSaleOrderSetView;
@@ -0,0 +1,54 @@
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 { useThemeColor, ViewAllContainer, Text, Badge, } from '@axelor/aos-mobile-ui';
20
+ import { useSelector, useTranslator } from '@axelor/aos-mobile-core';
21
+ import { View, StyleSheet } from 'react-native';
22
+ const ManufacturingOrderSaleOrderSetView = ({ onPressSaleOrder }) => {
23
+ const Colors = useThemeColor();
24
+ const I18n = useTranslator();
25
+ const { manufOrder } = useSelector((state) => state.manufacturingOrder);
26
+ if (!Array.isArray(manufOrder.saleOrderSet) ||
27
+ manufOrder.saleOrderSet.length === 0) {
28
+ return null;
29
+ }
30
+ return (<ViewAllContainer onViewPress={onPressSaleOrder} disabled={manufOrder.saleOrderSet.length < 3} translator={I18n.t}>
31
+ <View style={styles.orderTitle}>
32
+ <Text>{I18n.t('Manufacturing_RefClient')}</Text>
33
+ </View>
34
+ <View style={styles.orderSetContainer}>
35
+ {manufOrder.saleOrderSet.slice(0, 3).map(item => (<Badge style={styles.orderBadge} title={item.fullName} key={item.id} color={Colors.priorityColor} numberOfLines={null}/>))}
36
+ </View>
37
+ </ViewAllContainer>);
38
+ };
39
+ const styles = StyleSheet.create({
40
+ orderBadge: {
41
+ paddingHorizontal: 10,
42
+ width: null,
43
+ },
44
+ orderTitle: {
45
+ marginHorizontal: 8,
46
+ },
47
+ orderSetContainer: {
48
+ flexDirection: 'row',
49
+ flexWrap: 'wrap',
50
+ width: '100%',
51
+ },
52
+ });
53
+ export default ManufacturingOrderSaleOrderSetView;
54
+ //# sourceMappingURL=ManufacturingOrderSaleOrderSetView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManufacturingOrderSaleOrderSetView.js","sourceRoot":"","sources":["../../../../src/components/organisms/ManufacturingOrderSaleOrderSetView/ManufacturingOrderSaleOrderSetView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,IAAI,EACJ,KAAK,GACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAM9C,MAAM,kCAAkC,GAAG,CAAC,EAAC,gBAAgB,EAAQ,EAAE,EAAE;IACvE,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAC,UAAU,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAE3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;KACpB;IACD,iBAAiB,EAAE;QACjB,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC;AAEH,eAAe,kCAAkC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ interface OperationOrderLabelTextListProps {
3
+ showDuration?: boolean;
4
+ showWorkCenter?: boolean;
5
+ showMachine?: boolean;
6
+ children: ReactNode;
7
+ }
8
+ declare const OperationOrderLabelTextList: ({ showDuration, showWorkCenter, showMachine, children, }: OperationOrderLabelTextListProps) => JSX.Element;
9
+ export default OperationOrderLabelTextList;
@@ -0,0 +1,39 @@
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 { LabelText } from '@axelor/aos-mobile-ui';
20
+ import { useTranslator, formatDuration, useSelector, } from '@axelor/aos-mobile-core';
21
+ import { View, StyleSheet } from 'react-native';
22
+ const OperationOrderLabelTextList = ({ showDuration = true, showWorkCenter = true, showMachine = true, children, }) => {
23
+ const I18n = useTranslator();
24
+ const { operationOrder } = useSelector((state) => state.operationOrder);
25
+ return (<View style={styles.detailsContainer}>
26
+ {showDuration && (<LabelText iconName="stopwatch" size={20} title={I18n.t('Manufacturing_PlannedDuration') + ':'} value={formatDuration(operationOrder?.plannedDuration)}/>)}
27
+ {showWorkCenter && operationOrder?.workCenter && (<LabelText iconName="warehouse" size={15} title={I18n.t('Manufacturing_WorkCenter') + ':'} value={operationOrder?.workCenter?.name}/>)}
28
+ {showMachine && operationOrder?.machine && (<LabelText iconName="tools" size={18} title={I18n.t('Manufacturing_Machine') + ':'} value={operationOrder?.machine?.name}/>)}
29
+ {children}
30
+ </View>);
31
+ };
32
+ const styles = StyleSheet.create({
33
+ detailsContainer: {
34
+ marginHorizontal: 20,
35
+ marginVertical: 15,
36
+ },
37
+ });
38
+ export default OperationOrderLabelTextList;
39
+ //# sourceMappingURL=OperationOrderLabelTextList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationOrderLabelTextList.js","sourceRoot":"","sources":["../../../../src/components/organisms/OperationOrderLabelTextList/OperationOrderLabelTextList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAS9C,MAAM,2BAA2B,GAAG,CAAC,EACnC,YAAY,GAAG,IAAI,EACnB,cAAc,GAAG,IAAI,EACrB,WAAW,GAAG,IAAI,EAClB,QAAQ,GACyB,EAAE,EAAE;IACrC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAE3E,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CACnC;MAAA,CAAC,YAAY,IAAI,CACf,CAAC,SAAS,CACR,QAAQ,CAAC,WAAW,CACpB,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,+BAA+B,CAAC,GAAG,GAAG,CAAC,CACrD,KAAK,CAAC,CAAC,cAAc,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,EACvD,CACH,CACD;MAAA,CAAC,cAAc,IAAI,cAAc,EAAE,UAAU,IAAI,CAC/C,CAAC,SAAS,CACR,QAAQ,CAAC,WAAW,CACpB,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,GAAG,GAAG,CAAC,CAChD,KAAK,CAAC,CAAC,cAAc,EAAE,UAAU,EAAE,IAAI,CAAC,EACxC,CACH,CACD;MAAA,CAAC,WAAW,IAAI,cAAc,EAAE,OAAO,IAAI,CACzC,CAAC,SAAS,CACR,QAAQ,CAAC,OAAO,CAChB,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,GAAG,GAAG,CAAC,CAC7C,KAAK,CAAC,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EACrC,CACH,CACD;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,gBAAgB,EAAE;QAChB,gBAAgB,EAAE,EAAE;QACpB,cAAc,EAAE,EAAE;KACnB;CACF,CAAC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default OperationOrderStopwatch;
2
+ declare function OperationOrderStopwatch({}: {}): JSX.Element;
@@ -0,0 +1,42 @@
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, { useCallback, useMemo } from 'react';
19
+ import { useTranslator, Stopwatch, isEmpty, StopwatchType, useDispatch, useSelector, } from '@axelor/aos-mobile-core';
20
+ import { OperationOrder } from '../../../types';
21
+ import { updateOperationOrder } from '../../../features/operationOrderSlice';
22
+ const OperationOrderStopwatch = ({}) => {
23
+ const I18n = useTranslator();
24
+ const dispatch = useDispatch();
25
+ const { operationOrder } = useSelector(state => state.operationOrder);
26
+ const { status: timerStatus, time } = useMemo(() => {
27
+ if (!isEmpty(operationOrder)) {
28
+ return OperationOrder.getTimerState(operationOrder);
29
+ }
30
+ return { status: StopwatchType.status.Ready, time: 0 };
31
+ }, [operationOrder]);
32
+ const updateStatus = useCallback(status => {
33
+ dispatch(updateOperationOrder({
34
+ operationOrderId: operationOrder?.id,
35
+ version: operationOrder?.version,
36
+ status,
37
+ }));
38
+ }, [dispatch, operationOrder]);
39
+ return (<Stopwatch startTime={time} status={timerStatus} timerFormat={I18n.t('Stopwatch_TimerFormat')} onPlay={() => updateStatus(OperationOrder.status.InProgress)} onPause={() => updateStatus(OperationOrder.status.StandBy)} onStop={() => updateStatus(OperationOrder.status.Finished)} disableStop={operationOrder?.statusSelect === OperationOrder.status.StandBy} disableCancel={operationOrder?.statusSelect === OperationOrder.status.Finished} hideCancel={true}/>);
40
+ };
41
+ export default OperationOrderStopwatch;
42
+ //# sourceMappingURL=OperationOrderStopwatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationOrderStopwatch.js","sourceRoot":"","sources":["../../../../src/components/organisms/OperationOrderStopwatch/OperationOrderStopwatch.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;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ACpB,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAC7C,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAC7D,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAC3D,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAC3D,WAAW,CAAC,CACV,cAAc,EAAE,YAAY,KAAK,cAAc,CAAC,MAAM,CAAC,OAAO,CAC/D,CACD,aAAa,CAAC,CACZ,cAAc,EAAE,YAAY,KAAK,cAAc,CAAC,MAAM,CAAC,QAAQ,CAChE,CACD,UAAU,CAAC,CAAC,IAAI,CAAC,EACjB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface ProdProductFixedItemsProps {
2
+ show?: boolean;
3
+ prodProduct: any;
4
+ onPressUpdate: () => void;
5
+ onPressCreate: () => void;
6
+ }
7
+ declare const ProdProductFixedItems: ({ show, prodProduct, onPressUpdate, onPressCreate, }: ProdProductFixedItemsProps) => JSX.Element;
8
+ export default ProdProductFixedItems;
@@ -0,0 +1,29 @@
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 { useTranslator } from '@axelor/aos-mobile-core';
20
+ import { Button } from '@axelor/aos-mobile-ui';
21
+ const ProdProductFixedItems = ({ show = false, prodProduct, onPressUpdate, onPressCreate, }) => {
22
+ const I18n = useTranslator();
23
+ if (show) {
24
+ return (<Button title={I18n.t('Base_Save')} onPress={prodProduct != null ? onPressUpdate : onPressCreate}/>);
25
+ }
26
+ return null;
27
+ };
28
+ export default ProdProductFixedItems;
29
+ //# sourceMappingURL=ProdProductFixedItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProdProductFixedItems.js","sourceRoot":"","sources":["../../../../src/components/organisms/ProdProductFixedItems/ProdProductFixedItems.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAS7C,MAAM,qBAAqB,GAAG,CAAC,EAC7B,IAAI,GAAG,KAAK,EACZ,WAAW,EACX,aAAa,EACb,aAAa,GACc,EAAE,EAAE;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,IAAI,IAAI,EAAE;QACR,OAAO,CACL,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAC3B,OAAO,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,EAC7D,CACH,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}