| @@ -13,6 +13,22 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| const [rows, setRows] = React.useState(recordList); | const [rows, setRows] = React.useState(recordList); | ||||
| const navigate = useNavigate() | const navigate = useNavigate() | ||||
| const _sx = { | |||||
| padding: "4 2 4 2", | |||||
| boxShadow: 1, | |||||
| border: 1, | |||||
| borderColor: '#DDD', | |||||
| '& .MuiDataGrid-cell': { | |||||
| borderTop: 1, | |||||
| borderBottom: 1, | |||||
| borderColor: "#EEE" | |||||
| }, | |||||
| '& .MuiDataGrid-footerContainer': { | |||||
| border: 1, | |||||
| borderColor: "#EEE" | |||||
| } | |||||
| } | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| setRows(recordList); | setRows(recordList); | ||||
| }, [recordList]); | }, [recordList]); | ||||
| @@ -21,7 +37,6 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| navigate('/proof/reply/' + params.row.id); | navigate('/proof/reply/' + params.row.id); | ||||
| }; | }; | ||||
| const columns = [ | const columns = [ | ||||
| { | { | ||||
| field: 'actions', | field: 'actions', | ||||
| @@ -79,6 +94,7 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| <div style={{ height: 400, width: '100%' }}> | <div style={{ height: 400, width: '100%' }}> | ||||
| <FiDataGrid | <FiDataGrid | ||||
| sx={_sx} | |||||
| rowHeight={80} | rowHeight={80} | ||||
| rows={rows} | rows={rows} | ||||
| columns={columns} | columns={columns} | ||||
| @@ -2,7 +2,8 @@ | |||||
| import { | import { | ||||
| Button, | Button, | ||||
| CardContent, | CardContent, | ||||
| Grid, TextField | |||||
| Grid, TextField, | |||||
| Typography | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import MainCard from "components/MainCard"; | import MainCard from "components/MainCard"; | ||||
| import { useForm } from "react-hook-form"; | import { useForm } from "react-hook-form"; | ||||
| @@ -11,11 +12,26 @@ import * as DateUtils from "utils/DateUtils"; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | ||||
| const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); | const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); | ||||
| const _sx = { | |||||
| padding: "4 2 4 2", | |||||
| boxShadow: 1, | |||||
| border: 1, | |||||
| borderColor: '#DDD', | |||||
| '& .MuiDataGrid-cell': { | |||||
| borderTop: 1, | |||||
| borderBottom: 1, | |||||
| borderColor: "#EEE" | |||||
| }, | |||||
| '& .MuiDataGrid-footerContainer': { | |||||
| border: 1, | |||||
| borderColor: "#EEE" | |||||
| } | |||||
| } | |||||
| const { reset, register, handleSubmit } = useForm() | const { reset, register, handleSubmit } = useForm() | ||||
| @@ -40,19 +56,21 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| return ( | return ( | ||||
| <MainCard xs={12} md={12} lg={12} | <MainCard xs={12} md={12} lg={12} | ||||
| border={false} | border={false} | ||||
| content={false}> | |||||
| content={false} | |||||
| sx={_sx} | |||||
| > | |||||
| <form onSubmit={handleSubmit(onSubmit)}> | <form onSubmit={handleSubmit(onSubmit)}> | ||||
| {/*row 1*/} | {/*row 1*/} | ||||
| <CardContent sx={{ px: 2.5, pt: 3 }}> | <CardContent sx={{ px: 2.5, pt: 3 }}> | ||||
| <Grid item justifyContent="space-between" alignItems="center"> | |||||
| 搜尋 | |||||
| <Grid item justifyContent="space-between" alignItems="center" > | |||||
| <Typography variant="h4">搜尋</Typography> | |||||
| </Grid> | </Grid> | ||||
| </CardContent> | </CardContent> | ||||
| {/*row 2*/} | {/*row 2*/} | ||||
| <Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
| <Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}> | <Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}> | ||||
| <TextField | <TextField | ||||
| fullWidth | fullWidth | ||||
| @@ -101,7 +119,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -117,7 +135,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| textTransform: 'capitalize', | textTransform: 'capitalize', | ||||
| alignItems: 'end' | alignItems: 'end' | ||||
| }}> | }}> | ||||
| 重置 | |||||
| <Typography variant="h5">重置</Typography> | |||||
| </Button> | </Button> | ||||
| </Grid> | </Grid> | ||||
| @@ -130,7 +148,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| textTransform: 'capitalize', | textTransform: 'capitalize', | ||||
| alignItems: 'end' | alignItems: 'end' | ||||
| }}> | }}> | ||||
| 提交 | |||||
| <Typography variant="h5">提交</Typography> | |||||
| </Button> | </Button> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -1,5 +1,5 @@ | |||||
| // material-ui | // material-ui | ||||
| import {FiDataGrid} from "components/FiDataGrid"; | |||||
| import { FiDataGrid } from "components/FiDataGrid"; | |||||
| import { | import { | ||||
| Typography, Button, Grid, Stack | Typography, Button, Grid, Stack | ||||
| @@ -8,8 +8,6 @@ import { | |||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
| import Checkbox from '@mui/material/Checkbox'; | import Checkbox from '@mui/material/Checkbox'; | ||||
| import MainCard from "components/MainCard"; | |||||
| import * as React from "react"; | import * as React from "react"; | ||||
| import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
| import * as UrlUtils from "utils/ApiPathConst"; | import * as UrlUtils from "utils/ApiPathConst"; | ||||
| @@ -32,6 +30,22 @@ const BackgroundHead = { | |||||
| const ManageOrgUserPage = () => { | const ManageOrgUserPage = () => { | ||||
| const [rows, setRows] = React.useState([]); | const [rows, setRows] = React.useState([]); | ||||
| const _sx = { | |||||
| padding: "4 2 4 2", | |||||
| boxShadow: 1, | |||||
| border: 1, | |||||
| borderColor: '#DDD', | |||||
| '& .MuiDataGrid-cell': { | |||||
| borderTop: 1, | |||||
| borderBottom: 1, | |||||
| borderColor: "#EEE" | |||||
| }, | |||||
| '& .MuiDataGrid-footerContainer': { | |||||
| border: 1, | |||||
| borderColor: "#EEE" | |||||
| } | |||||
| } | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| loadData(); | loadData(); | ||||
| }, []); | }, []); | ||||
| @@ -175,29 +189,28 @@ const ManageOrgUserPage = () => { | |||||
| ]; | ]; | ||||
| return ( | return ( | ||||
| <MainCard elevation={0} border={false} content={false} > | |||||
| <Grid container> | |||||
| <Grid item xs={12}> | |||||
| <div style={BackgroundHead}> | |||||
| <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||||
| <Typography ml={15} color='#FFF' variant="h4">公司/機構用戶記錄</Typography> | |||||
| </Stack> | |||||
| </div> | |||||
| </Grid> | |||||
| <Grid item lg={12} sx={{padding:2}}> | |||||
| <FiDataGrid | |||||
| rows={rows} | |||||
| columns={columns} | |||||
| initialState={{ | |||||
| pagination: { | |||||
| paginationModel: { page: 0, pageSize: 10 }, | |||||
| }, | |||||
| }} | |||||
| /> | |||||
| </Grid> | |||||
| <Grid container> | |||||
| <Grid item xs={12}> | |||||
| <div style={BackgroundHead}> | |||||
| <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||||
| <Typography ml={15} color='#FFF' variant="h4">公司/機構用戶記錄</Typography> | |||||
| </Stack> | |||||
| </div> | |||||
| </Grid> | |||||
| <Grid item lg={12} sx={{ padding: 2 }}> | |||||
| <FiDataGrid | |||||
| sx={_sx} | |||||
| rows={rows} | |||||
| columns={columns} | |||||
| initialState={{ | |||||
| pagination: { | |||||
| paginationModel: { page: 0, pageSize: 10 }, | |||||
| }, | |||||
| }} | |||||
| /> | |||||
| </Grid> | </Grid> | ||||
| </MainCard> | |||||
| </Grid> | |||||
| ); | ); | ||||
| }; | }; | ||||