# Conflicts: # src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.jsmaster
| @@ -55,10 +55,10 @@ const MainLayout = () => { | |||||
| }, [drawerOpen]); | }, [drawerOpen]); | ||||
| return ( | return ( | ||||
| <Box sx={{ display: 'flex', width: '100%', flexDirection: "column", paddingTop: { xs: "5px", sm: "43px" }}}> | |||||
| <Box sx={{backgroundColor:'#ffffff', display: 'flex', width: '100%', flexDirection: "column", paddingTop: { xs: "5px", sm: "43px" }}}> | |||||
| <Header/> | <Header/> | ||||
| {/* <Drawer open={open} handleDrawerToggle={handleDrawerToggle} /> */} | {/* <Drawer open={open} handleDrawerToggle={handleDrawerToggle} /> */} | ||||
| <Box style={{ width: '100%', flexGrow: 1 } } sx={{ paddingTop: "43px" }}> | |||||
| <Box style={{ width: '100%', flexGrow: 1 } } sx={{ paddingTop: "50px" }}> | |||||
| {/* <Toolbar /> */} | {/* <Toolbar /> */} | ||||
| {/* <Breadcrumbs navigation={navigation} title /> */} | {/* <Breadcrumbs navigation={navigation} title /> */} | ||||
| <Outlet /> | <Outlet /> | ||||
| @@ -4,7 +4,8 @@ import { | |||||
| Typography, | Typography, | ||||
| Button, | Button, | ||||
| RadioGroup, | RadioGroup, | ||||
| Dialog, DialogTitle, DialogContent, DialogActions | |||||
| Dialog, DialogTitle, DialogContent, DialogActions, | |||||
| Stack | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import { useFormik } from 'formik'; | import { useFormik } from 'formik'; | ||||
| import * as yup from 'yup'; | import * as yup from 'yup'; | ||||
| @@ -12,6 +13,7 @@ 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"; | ||||
| import * as FieldUtils from "utils/FieldUtils"; | import * as FieldUtils from "utils/FieldUtils"; | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||||
| import {useNavigate} from "react-router-dom"; | import {useNavigate} from "react-router-dom"; | ||||
| @@ -24,6 +26,12 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => { | |||||
| const [attachment, setAttachment] = React.useState({}); | const [attachment, setAttachment] = React.useState({}); | ||||
| const navigate=useNavigate(); | const navigate=useNavigate(); | ||||
| const BackgroundHead = { | |||||
| backgroundImage: `url(${titleBackgroundImg})`, | |||||
| width: '100%', | |||||
| height: '100%', | |||||
| backgroundSize:'cover' | |||||
| } | |||||
| // React.useEffect(()=>{ | // React.useEffect(()=>{ | ||||
| // setFormData(loadedData); | // setFormData(loadedData); | ||||
| // },[]); | // },[]); | ||||
| @@ -85,13 +93,20 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => { | |||||
| return ( | return ( | ||||
| <Grid container style={{ padding: 24}} rowSpacing={16} columnSpacing={2.75}> | |||||
| <Grid item xs={12}> | |||||
| <Typography variant="h5">申請公共啟事</Typography> | |||||
| <Grid container> | |||||
| <Grid item xs={12} mb={3}> | |||||
| <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> | ||||
| <form style={{ width: "100%"}} onSubmit={formik.handleSubmit} > | |||||
| {/* <Grid item xs={12}> | |||||
| <Typography variant="h5">申請公共啟事</Typography> | |||||
| </Grid> */} | |||||
| <form style={{ width: "100%"}} onSubmit={formik.handleSubmit}> | |||||
| <Grid container spacing={1}> | |||||
| <Grid container spacing={1} sx={{minHeight: '80vh'}}> | |||||
| <Grid item lg={4}></Grid> | <Grid item lg={4}></Grid> | ||||
| {FieldUtils.getTextField({ | {FieldUtils.getTextField({ | ||||
| label:"聯絡人:", | label:"聯絡人:", | ||||
| @@ -195,7 +210,7 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => { | |||||
| </form> | </form> | ||||
| <div> | <div> | ||||
| <Dialog open={isWarningPopUp} onClose={() => setIsWarningPopUp(false)} > | <Dialog open={isWarningPopUp} onClose={() => setIsWarningPopUp(false)} > | ||||
| <DialogTitle>Warning</DialogTitle> | |||||
| <DialogTitle>注意</DialogTitle> | |||||
| <DialogContent style={{ display: 'flex', }}> | <DialogContent style={{ display: 'flex', }}> | ||||
| <Typography variant="h3" style={{ padding: '16px' }}>{warningText}</Typography> | <Typography variant="h3" style={{ padding: '16px' }}>{warningText}</Typography> | ||||
| </DialogContent> | </DialogContent> | ||||
| @@ -4,7 +4,8 @@ import { | |||||
| Typography, | Typography, | ||||
| Tab, | Tab, | ||||
| Box, | Box, | ||||
| Button | |||||
| Button, | |||||
| Stack | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import { TabPanel, TabContext, TabList } from '@mui/lab'; | import { TabPanel, TabContext, TabList } from '@mui/lab'; | ||||
| @@ -20,6 +21,7 @@ const BaseGrid = Loadable(lazy(() => import('./BaseGrid'))); | |||||
| const PendingPaymentTab = Loadable(lazy(() => import('./PendingPaymentTab'))); | const PendingPaymentTab = Loadable(lazy(() => import('./PendingPaymentTab'))); | ||||
| const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); | const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); | ||||
| const SearchTab = Loadable(lazy(() => import('./SearchPublicNoticeTab'))); | const SearchTab = Loadable(lazy(() => import('./SearchPublicNoticeTab'))); | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| @@ -33,6 +35,12 @@ const PublicNotice = () => { | |||||
| const [selectedTab, setSelectedTab] = useState("1"); | const [selectedTab, setSelectedTab] = useState("1"); | ||||
| const navigate = useNavigate(); | const navigate = useNavigate(); | ||||
| const BackgroundHead = { | |||||
| backgroundImage: `url(${titleBackgroundImg})`, | |||||
| width: '100%', | |||||
| height: '100%', | |||||
| backgroundSize:'cover' | |||||
| } | |||||
| useEffect(() => { | useEffect(() => { | ||||
| loadData(); | loadData(); | ||||
| @@ -71,15 +79,23 @@ const PublicNotice = () => { | |||||
| isLoading ? | isLoading ? | ||||
| <LoadingComponent /> | <LoadingComponent /> | ||||
| : | : | ||||
| <Grid container rowSpacing={4.5} columnSpacing={2.75}> | |||||
| <Grid item xs={12} sx={{ mb: -2.25 }}> | |||||
| <Typography variant="h5">我的公共啟事</Typography> | |||||
| <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> | ||||
| <Grid item xs={12} sx={{ mb: -2.25 }}> | |||||
| <Button variant="contained" onClick={() => { onBtnClick() }}>申請公共啟事</Button> | |||||
| <Grid item xs={12} mt={1} > | |||||
| <Stack direction="row" justifyContent="flex-end" alignItems="center"> | |||||
| <Box sx={{mr:{md:"47px"}}}> | |||||
| <Button variant="contained" onClick={() => { onBtnClick() }}>申請公共啟事</Button> | |||||
| </Box> | |||||
| </Stack> | |||||
| </Grid> | </Grid> | ||||
| {/*col 2*/} | {/*col 2*/} | ||||
| <Grid item xs={12}> | |||||
| <Grid item xs={12} sx={{minHeight: '75vh'}}> | |||||
| <TabContext value={selectedTab}> | <TabContext value={selectedTab}> | ||||
| <Box sx={{ borderBottom: 1, borderColor: 'divider' }}> | <Box sx={{ borderBottom: 1, borderColor: 'divider' }}> | ||||
| <TabList onChange={handleChange} aria-label="lab API tabs example"> | <TabList onChange={handleChange} aria-label="lab API tabs example"> | ||||