From 27c410ed7bbf44d6031c8cc62095a64a1f6bdad2 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 20 九月 2024 09:58:14 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/agv/AgvList.jsx |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/zy-acs-flow/src/page/agv/AgvList.jsx b/zy-acs-flow/src/page/agv/AgvList.jsx
index 4f03c6c..d4ec3f7 100644
--- a/zy-acs-flow/src/page/agv/AgvList.jsx
+++ b/zy-acs-flow/src/page/agv/AgvList.jsx
@@ -34,6 +34,7 @@
     ListBase,
     Title,
     Pagination,
+    ListToolbar,
 } from 'react-admin';
 import { Box, Typography, Card, Stack } from '@mui/material';
 import { styled } from '@mui/material/styles';
@@ -51,8 +52,9 @@
 
 export const AgvGrid = () => {
     const { identity } = useGetIdentity();
-    if (!identity) return null;
     const [createDialog, setCreateDialog] = useState(false);
+
+    if (!identity) return null;
 
     return (
         <>
@@ -69,21 +71,20 @@
     )
 }
 
-const AgvGridLayout = (props) => {
+const AgvGridLayout = ({ setCreateDialog }) => {
     const { data, isPending, filterValues } = useListContext();
     const hasFilters = filterValues && Object.keys(filterValues).length > 0;
 
     if (isPending) return null;
-    if (!data?.length && !hasFilters) return <EmptyData onClick={() => { props.setCreateDialog(true) }} />;
+    if (!data?.length && !hasFilters) return <EmptyData onClick={() => { setCreateDialog(true) }} />;
 
     return (
         <Stack direction="row" component="div">
             <Stack sx={{ width: '100%' }}>
-                <Title title={'Companies'} />
+                <Title title={"menu.agv"} />
                 <ListToolbar actions={(
                     <TopToolbar>
-                        <FilterButton />
-                        <MyCreateButton onClick={() => { setCreateDialog(true) }} />
+                        <MyCreateButton onClick={() => { setCreateDialog(true) }} variant="contained" />
                         <MyExportButton />
                     </TopToolbar>
                 )} />
@@ -93,7 +94,6 @@
         </Stack>
     );
 }
-
 
 
 

--
Gitblit v1.9.1