Yansen 2 лет назад
Родитель
Сommit
77337bd89e

+ 1
- 1
src/pages/Machinery/OperationStatistics/Detail.jsx Просмотреть файл

16
 
16
 
17
   React.useEffect(() => {
17
   React.useEffect(() => {
18
     if (machineryId) {
18
     if (machineryId) {
19
-      getMachineryDetail(machineryId).then(setCurrent);
19
+      getMachineryDetail(machineryId).then((res) => setCurrent(res || {}));
20
     }
20
     }
21
   }, [machineryId]);
21
   }, [machineryId]);
22
 
22
 

+ 1
- 1
src/pages/Machinery/OperationStatistics/components/MaJob.jsx Просмотреть файл

77
   };
77
   };
78
 
78
 
79
   React.useEffect(() => {
79
   React.useEffect(() => {
80
-    if (userId && machine) {
80
+    if (machine) {
81
       const { machineryId } = machine;
81
       const { machineryId } = machine;
82
       queryData({
82
       queryData({
83
         machineryId,
83
         machineryId,