@@ -11,7 +11,7 @@ import Loadable from 'components/Loadable'; | |||
import { lazy } from 'react'; | |||
const InfoCard = Loadable(lazy(() => import('./OrganizationCard'))); | |||
const LoadingComponent = Loadable(lazy(() => import('../extra-pages/LoadingComponent'))); | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import { useNavigate } from 'react-router-dom'; | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
@@ -73,7 +73,7 @@ const OrganizationDetailPage = () => { | |||
isLoading ? | |||
<LoadingComponent /> | |||
: | |||
<Grid container sx={{backgroundColor:"backgroundColor.default"}}> | |||
<Grid container sx={{ backgroundColor: "backgroundColor.default" }}> | |||
<Grid item xs={12}> | |||
<div style={BackgroundHead}> | |||
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||
@@ -83,8 +83,7 @@ const OrganizationDetailPage = () => { | |||
</Grid> | |||
<Grid item xs={12}> | |||
<Button sx={{ ml: 3.5, mt: 2 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/org") }}> | |||
<KeyboardBackspaceOutlinedIcon /> | |||
<Typography variant="h4">Back</Typography> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
</Grid> | |||
{/*col 1*/} | |||
@@ -95,7 +95,7 @@ const Index = () => { | |||
variant="contained" | |||
size="large" | |||
sx={{ m: 4}} | |||
>即時網上繳費</Button> | |||
><Typography variant="h5">即時網上繳費</Typography></Button> | |||
或 | |||
@@ -107,7 +107,7 @@ const Index = () => { | |||
onClick={()=>{ | |||
navigate("/publicNotice"); | |||
}} | |||
>稍後繳費 - 返回「我的公共啟事」</Button> | |||
><Typography variant="h5">稍後繳費 - 返回「我的公共啟事」</Typography></Button> | |||
</Typography> | |||
</Grid> | |||
</center> | |||
@@ -13,7 +13,7 @@ import * as DateUtils from "utils/DateUtils"; | |||
import * as FormatUtils from "utils/FormatUtils" | |||
import { useParams } from "react-router-dom"; | |||
import { useNavigate } from "react-router-dom"; | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import Loadable from 'components/Loadable'; | |||
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | |||
@@ -54,7 +54,7 @@ const Index = () => { | |||
HttpUtils.get({ | |||
url: UrlUtils.GET_PROOF + "/" + params.id, | |||
onSuccess: (responseData) => { | |||
if(!responseData.data?.id){ | |||
if (!responseData.data?.id) { | |||
navigate("/proof/search"); | |||
} | |||
responseData.data["phoneNumber"] = JSON.parse(responseData.data.contactTelNo).phoneNumber; | |||
@@ -90,7 +90,7 @@ const Index = () => { | |||
// const [backButtonPos, setBackButtonPos] = React.useState() | |||
// const backButtonRef = React.useRef() | |||
// React.useLayoutEffect(()=>{ | |||
// console.log(applicationDetailsRef.current?.getBoundingClientRect()) | |||
// console.log(applicationDetailsRef.current?.getBoundingClientRect()) | |||
// if (backButtonRef.current) backButtonRef.current.style.marginLeft = `${backButtonPos}` | |||
// },[backButtonPos]) | |||
@@ -103,51 +103,50 @@ const Index = () => { | |||
<LoadingComponent /> | |||
: | |||
( | |||
<Grid container sx={{ minHeight: '110vh', backgroundColor: 'backgroundColor.default' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||
<Grid item xs={12} width="100%"> | |||
<div style={BackgroundHead} width="100%"> | |||
<Stack direction="row" height='70px'> | |||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>Proof Record</Typography> | |||
</Stack> | |||
</div> | |||
<Grid container sx={{ minHeight: '110vh', backgroundColor: 'backgroundColor.default' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||
<Grid item xs={12} width="100%"> | |||
<div style={BackgroundHead} width="100%"> | |||
<Stack direction="row" height='70px'> | |||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>Proof Record</Typography> | |||
</Stack> | |||
</div> | |||
</Grid> | |||
<Grid item xs={12} width="100%"> | |||
<Button sx={{ ml: 6, mt: 2.5 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/proof/search") }}> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
</Grid> | |||
{/*row 1*/} | |||
<Grid item xs={12} md={12} > | |||
<Grid container justifyContent="flex-start" alignItems="center" direction="column"> | |||
<center> | |||
<Grid item xs={12} md={12} sx={{ pt: 2, ml: 6, mr: 6, }}> | |||
<Box xs={12} md={12} sx={{ p: 4, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
<ApplicationDetails | |||
// setBackButtonPos={setBackButtonPos} | |||
formData={record} | |||
style={{ | |||
display: "flex", | |||
height: "100%", | |||
flex: 1 | |||
}} | |||
/> | |||
</Box> | |||
</Grid> | |||
<Grid item xs={12} md={12} sx={{ pt: 3, pb: 2, ml: 6, mr: 6, }}> | |||
<Box xs={12} md={12} sx={{ p: 4, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
<ProofForm | |||
formData={record} | |||
/> | |||
</Box> | |||
</Grid> | |||
</center> | |||
</Grid> | |||
<Grid item xs={12} width="100%"> | |||
<Button sx={{ml: 6, mt:2}} style={{ border: '2px solid' }} variant="outlined" onClick={()=>{navigate("/proof/search")}}> | |||
<KeyboardBackspaceOutlinedIcon/> | |||
<Typography variant="h4">Back</Typography> | |||
</Button> | |||
</Grid> | |||
{/*row 1*/} | |||
<Grid item xs={12} md={12} > | |||
<Grid container justifyContent="flex-start" alignItems="center" direction="column"> | |||
<center> | |||
<Grid item xs={12} md={12} sx={{ pt: 2, ml: 6, mr: 6, }}> | |||
<Box xs={12} md={12} sx={{ p: 4, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
<ApplicationDetails | |||
// setBackButtonPos={setBackButtonPos} | |||
formData={record} | |||
style={{ | |||
display: "flex", | |||
height: "100%", | |||
flex: 1 | |||
}} | |||
/> | |||
</Box> | |||
</Grid> | |||
<Grid item xs={12} md={12} sx={{ pt: 3, pb: 2, ml: 6, mr: 6, }}> | |||
<Box xs={12} md={12} sx={{ p: 4, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
<ProofForm | |||
formData={record} | |||
/> | |||
</Box> | |||
</Grid> | |||
</center> | |||
</Grid> | |||
</Grid> | |||
{/*row 2*/} | |||
</Grid > | |||
</Grid> | |||
{/*row 2*/} | |||
</Grid > | |||
) | |||
@@ -64,7 +64,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
border={false} | |||
content={false} | |||
> | |||
<Typography variant="h5" sx={{ textAlign: "left", mb: 2, borderBottom: "1px solid black" }}> | |||
<Typography variant="h4" sx={{ textAlign: "left", mb: 2, borderBottom: "1px solid black" }}> | |||
公共啟事:校對資料 | |||
</Typography> | |||
<form> | |||
@@ -76,7 +76,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>申請編號:</FormLabel> | |||
<FormLabel><Typography variant="h5">申請編號:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -88,7 +88,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems={"left"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>申請狀態:</FormLabel> | |||
<FormLabel><Typography variant="h5">申請狀態:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9} sx={{ display: 'flex', alignItems: 'center' }}> | |||
@@ -105,7 +105,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>申請人:</FormLabel> | |||
<FormLabel><Typography variant="h5">申請人:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -123,7 +123,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>憲報期數:</FormLabel> | |||
<FormLabel><Typography variant="h5">憲報期數:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -138,7 +138,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>聯絡人:</FormLabel> | |||
<FormLabel><Typography variant="h5">聯絡人:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -151,7 +151,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>刊出日期:</FormLabel> | |||
<FormLabel><Typography variant="h5">刊出日期:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -166,7 +166,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems="left"> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>我的備注:</FormLabel> | |||
<FormLabel><Typography variant="h5">我的備注:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -184,7 +184,7 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid item xs={12} md={6} lg={6} sx={{ mb: 1, }}> | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={12} lg={12} sx={{ display: 'flex', alignItems: 'center' }}> | |||
<Typography>請下載下列印刷稿檔案,並仔細校對:</Typography> | |||
<Typography><Typography variant="h5">請下載下列印刷稿檔案,並仔細校對:</Typography></Typography> | |||
</Grid> | |||
</Grid> | |||
<FileList | |||
@@ -204,25 +204,25 @@ const ApplicationDetailCard = ({ formData, }) => { | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={12} lg={12} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<Typography>繳費及返稿最後限期:</Typography> | |||
<Typography variant="h5">繳費及返稿最後限期:</Typography> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | |||
<Typography>{DateUtils.dateStr_Cht(data.returnBeforeDate)} 下午 2:00前</Typography> | |||
<Typography variant="h5">{DateUtils.dateStr_Cht(data.returnBeforeDate)} 下午 2:00前</Typography> | |||
</Grid> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | |||
<Typography>應繳費用:</Typography> | |||
<Typography variant="h5">應繳費用:</Typography> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9} sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | |||
<Typography style={{ color: "blue", fontWeight: "bold", }}>{FormatUtils.currencyFormat(data.fee)}</Typography> | |||
<Typography variant="h5" style={{ color: "blue", fontWeight: "bold", }}>{FormatUtils.currencyFormat(data.fee)}</Typography> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | |||
{ | |||
formik.values.groupType == "A" | |||
? | |||
<Typography>( {data.noOfPages} 頁 x $6,552 )</Typography> | |||
<Typography variant="h5">( {data.noOfPages} 頁 x $6,552 )</Typography> | |||
: | |||
<Typography>( {data.length} cm x {data.colCount == 2 ? "$364 二格位" : "$182 一格位"} )</Typography> | |||
<Typography variant="h5">( {data.length} cm x {data.colCount == 2 ? "$364 二格位" : "$182 一格位"} )</Typography> | |||
} | |||
</Grid> | |||
</Grid> | |||
@@ -78,7 +78,7 @@ const FormPanel = ({ formData }) => { | |||
onSuccess: function () { | |||
if (actionValue) { | |||
notifyActionSuccess("提交成功!") | |||
navigate("/proof/pay/"+params.id); | |||
navigate("/proof/pay/" + params.id); | |||
} else { | |||
notifyActionSuccess("提交成功!") | |||
navigate("/proof/search"); | |||
@@ -138,7 +138,7 @@ const FormPanel = ({ formData }) => { | |||
border={false} | |||
content={false}> | |||
<Typography variant="h5" sx={{ textAlign: "left", mb: 2, borderBottom: "1px solid black" }}> | |||
<Typography variant="h4" sx={{ textAlign: "left", mb: 2, borderBottom: "1px solid black" }}> | |||
公共啟事:校對回覆 | |||
</Typography> | |||
@@ -148,10 +148,10 @@ const FormPanel = ({ formData }) => { | |||
formik.values.replyDate ? | |||
<Grid container direction="column" sx={{ paddingLeft: 4, paddingRight: 4 }} spacing={1}> | |||
<Grid item xs={12} md={12} textAlign="left"> | |||
校對回覆日期: {DateUtils.datetimeStr_Cht(formik.values.replyDate)} | |||
<Typography variant="h5">校對回覆日期: {DateUtils.datetimeStr_Cht(formik.values.replyDate)}</Typography> | |||
</Grid> | |||
<Grid item xs={12} md={12} textAlign="left"> | |||
校對回覆: {formik.values.action ? (<span style={{color:'green'}}>可以付印(稿件正確)</span>): (<span style={{color:'red'}}>未能付印(需要修改)</span>)} | |||
<Typography variant="h5">校對回覆: {formik.values.action ? (<span style={{ color: 'green' }}>可以付印(稿件正確)</span>) : (<span style={{ color: 'red' }}>未能付印(需要修改)</span>)}</Typography> | |||
</Grid> | |||
{ | |||
formik.values.action ? | |||
@@ -178,7 +178,7 @@ const FormPanel = ({ formData }) => { | |||
isOverTime() ? | |||
<Grid container direction="column" sx={{ paddingLeft: 4, paddingRight: 4 }} spacing={1}> | |||
<Grid item xs={12} md={12} textAlign="left"> | |||
回覆逾時,請重新申請。 | |||
<Typography variant="h5">回覆逾時,請重新申請。</Typography> | |||
</Grid> | |||
</Grid> | |||
: | |||
@@ -206,7 +206,7 @@ const FormPanel = ({ formData }) => { | |||
: | |||
<> | |||
<Grid item xs={12} md={12} textAlign="left"> | |||
請上載稿件修改的檔案: | |||
<Typography variant="h5">請上載稿件修改的檔案:</Typography> | |||
</Grid> | |||
<Grid item xs={12} md={12} textAlign="left"> | |||
@@ -227,7 +227,9 @@ const FormPanel = ({ formData }) => { | |||
variant="contained" | |||
size="large" | |||
disabled={attachments.length >= (formik.values.groupType == "A" ? 2 : 1)} | |||
>上載</Button> | |||
> | |||
<Typography variant="h5">上載</Typography> | |||
</Button> | |||
</label> | |||
</Grid> | |||
@@ -241,7 +243,7 @@ const FormPanel = ({ formData }) => { | |||
<Grid item xs={12} md={12} lg={12}> | |||
<Stack direction="row" alignItems="center"> | |||
<FormLabel sx={{ paddingRight: 2, paddingBottom: 3, textAlign: "center" }}> | |||
簽署: | |||
<Typography variant="h5">簽署:</Typography> | |||
</FormLabel> | |||
<TextField | |||
fullWidth | |||
@@ -277,7 +279,7 @@ const FormPanel = ({ formData }) => { | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
提交回覆 | |||
<Typography variant="h5">提交回覆</Typography> | |||
</Button> | |||
</Grid> | |||
@@ -3,7 +3,8 @@ import { | |||
Grid, | |||
Typography, | |||
Stack, | |||
Box | |||
Box, | |||
Button | |||
} from '@mui/material'; | |||
import * as UrlUtils from "utils/ApiPathConst"; | |||
import * as React from "react"; | |||
@@ -12,6 +13,7 @@ import * as DateUtils from "utils/DateUtils"; | |||
import * as FormatUtils from "utils/FormatUtils"; | |||
import { useParams } from "react-router-dom"; | |||
import { useNavigate } from "react-router-dom"; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import Loadable from 'components/Loadable'; | |||
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | |||
@@ -37,6 +39,22 @@ const Index = () => { | |||
const [record, setRecord] = React.useState(); | |||
const [onReady, setOnReady] = React.useState(false); | |||
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(() => { | |||
loadForm(); | |||
}, []); | |||
@@ -52,7 +70,7 @@ const Index = () => { | |||
HttpUtils.get({ | |||
url: UrlUtils.GET_PROOF + "/" + params.id, | |||
onSuccess: (responseData) => { | |||
if(!responseData.data?.id){ | |||
if (!responseData.data?.id) { | |||
navigate("/proof/search"); | |||
} | |||
responseData.data["phoneNumber"] = JSON.parse(responseData.data.contactTelNo).phoneNumber; | |||
@@ -80,44 +98,49 @@ const Index = () => { | |||
<LoadingComponent /> | |||
: | |||
( | |||
<Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||
<Grid item xs={12} width="100%"> | |||
<div style={BackgroundHead} width="100%"> | |||
<Stack direction="row" height='70px'> | |||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>校對記錄</Typography> | |||
</Stack> | |||
</div> | |||
<Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||
<Grid item xs={12} width="100%"> | |||
<div style={BackgroundHead} width="100%"> | |||
<Stack direction="row" height='70px'> | |||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>校對記錄</Typography> | |||
</Stack> | |||
</div> | |||
</Grid> | |||
<Grid item xs={12} width="95%"> | |||
<Button sx={{ ml: 1.5, mt: 2.5 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/proof/search") }}> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
</Grid> | |||
{/*row 1*/} | |||
<Grid item xs={12} md={12} > | |||
<Grid container justifyContent="flex-start" alignItems="center" > | |||
<center> | |||
<Grid item xs={12} md={12} sx={{ pt: 2 }}> | |||
<Box xs={12} md={12} sx={{ p: 4, border: '0px groove grey', borderRadius: '10px', ..._sx }}> | |||
<ApplicationDetails | |||
formData={record} | |||
style={{ | |||
display: "flex", | |||
height: "100%", | |||
flex: 1 | |||
}} | |||
/> | |||
</Box> | |||
</Grid> | |||
<Grid item xs={12} md={12} sx={{ pt: 1, pb: 2 }}> | |||
<Box xs={12} md={12} sx={{ p: 4, border: '0px groove grey', borderRadius: '10px', ..._sx }}> | |||
<ProofForm | |||
formData={record} | |||
/> | |||
</Box> | |||
</Grid> | |||
</center> | |||
</Grid> | |||
{/*row 1*/} | |||
<Grid item xs={12} md={12} > | |||
<Grid container justifyContent="flex-start" alignItems="center" > | |||
<center> | |||
<Grid item xs={12} md={12} sx={{ pt: 2 }}> | |||
<Box xs={12} md={12} sx={{ p: 4, border: '3px groove grey', borderRadius: '10px' }}> | |||
<ApplicationDetails | |||
formData={record} | |||
style={{ | |||
display: "flex", | |||
height: "100%", | |||
flex: 1 | |||
}} | |||
/> | |||
</Box> | |||
</Grid> | |||
<Grid item xs={12} md={12} sx={{ pt: 1, pb: 2 }}> | |||
<Box xs={12} md={12} sx={{ p: 4, border: '3px groove grey', borderRadius: '10px' }}> | |||
<ProofForm | |||
formData={record} | |||
/> | |||
</Box> | |||
</Grid> | |||
</center> | |||
</Grid> | |||
</Grid> | |||
{/*row 2*/} | |||
</Grid > | |||
</Grid> | |||
{/*row 2*/} | |||
</Grid > | |||
) | |||
@@ -13,6 +13,22 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
const [rows, setRows] = React.useState(recordList); | |||
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(() => { | |||
setRows(recordList); | |||
}, [recordList]); | |||
@@ -119,10 +135,11 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
} | |||
return ( | |||
<div style={{ height: 400, width: '100%' }}> | |||
<div style={{ height: '100%', width: '100%' }}> | |||
<FiDataGrid | |||
rowHeight={80} | |||
sx={_sx} | |||
rows={rows} | |||
columns={columns} | |||
initialState={{ | |||
@@ -130,6 +147,7 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
paginationModel: { page: 0, pageSize: 5 }, | |||
}, | |||
}} | |||
getRowHeight={()=>"auto"} | |||
onRowDoubleClick={handleRowDoubleClick} | |||
/> | |||
</div> | |||
@@ -3,7 +3,8 @@ import { | |||
Button, | |||
CardContent, | |||
Grid, TextField, | |||
Autocomplete | |||
Autocomplete, | |||
Typography | |||
} from '@mui/material'; | |||
import MainCard from "components/MainCard"; | |||
import { useForm } from "react-hook-form"; | |||
@@ -14,8 +15,8 @@ import * as FormatUtils from "utils/FormatUtils"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
}) => { | |||
const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData | |||
}) => { | |||
const [type, setType] = React.useState([]); | |||
const [status, setStatus] = React.useState(ComboData.proofStatus[0]); | |||
@@ -26,6 +27,21 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | |||
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 onSubmit = (data) => { | |||
@@ -64,24 +80,26 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
reset(); | |||
} | |||
function getIssueLabel(data){ | |||
if(data=={}) return ""; | |||
return data.year | |||
+" Vol. "+FormatUtils.zeroPad(data.volume,3) | |||
+", No. "+FormatUtils.zeroPad(data.issueNo,2) | |||
+", "+DateUtils.dateFormat(data.issueDate, "D MMM YYYY (ddd)"); | |||
function getIssueLabel(data) { | |||
if (data == {}) return ""; | |||
return data.year | |||
+ " Vol. " + FormatUtils.zeroPad(data.volume, 3) | |||
+ ", No. " + FormatUtils.zeroPad(data.issueNo, 2) | |||
+ ", " + DateUtils.dateFormat(data.issueDate, "D MMM YYYY (ddd)"); | |||
} | |||
return ( | |||
<MainCard xs={12} md={12} lg={12} | |||
border={false} | |||
content={false}> | |||
content={false} | |||
sx={_sx} | |||
> | |||
<form onSubmit={handleSubmit(onSubmit)}> | |||
{/*row 1*/} | |||
<CardContent sx={{ px: 2.5, pt: 3 }}> | |||
<Grid item justifyContent="space-between" alignItems="center"> | |||
搜尋 | |||
<Typography variant="h4">搜尋</Typography> | |||
</Grid> | |||
</CardContent> | |||
@@ -121,7 +139,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
options={issueCombo} | |||
value={issueSelected} | |||
inputValue={(issueSelected?.id) ? getIssueLabel(issueSelected) : ""} | |||
getOptionLabel={(option)=>getIssueLabel(option)} | |||
getOptionLabel={(option) => getIssueLabel(option)} | |||
onChange={(event, newValue) => { | |||
setIssueSelected(newValue); | |||
}} | |||
@@ -143,8 +161,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
id="gazettGroup" | |||
options={ComboData.groupTitle} | |||
value={groupSelected} | |||
inputValue={(groupSelected?.labelCht)?groupSelected?.labelCht:""} | |||
getOptionLabel={(option)=>option.labelCht} | |||
inputValue={(groupSelected?.labelCht) ? groupSelected?.labelCht : ""} | |||
getOptionLabel={(option) => option.labelCht} | |||
onChange={(event, newValue) => { | |||
setGroupSelected(newValue); | |||
}} | |||
@@ -212,13 +230,13 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}> | |||
<Autocomplete | |||
{...register("status")} | |||
disablePortal | |||
disablePortal={false} | |||
id="status" | |||
filterOptions={(options) => options} | |||
options={ComboData.proofStatus} | |||
value={status} | |||
getOptionLabel={(option)=>option.labelCht} | |||
inputValue={status?.labelCht?status?.labelCht:""} | |||
getOptionLabel={(option) => option.labelCht} | |||
inputValue={status?.labelCht ? status?.labelCht : ""} | |||
onChange={(event, newValue) => { | |||
if (newValue !== null) { | |||
setStatus(newValue); | |||
@@ -250,7 +268,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
重置 | |||
<Typography variant="h5">重置</Typography> | |||
</Button> | |||
</Grid> | |||
@@ -263,7 +281,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
提交 | |||
<Typography variant="h5">提交</Typography> | |||
</Button> | |||
</Grid> | |||
</Grid> | |||
@@ -37,7 +37,7 @@ import { | |||
const StatusChangeDialog = Loadable(lazy(() => import('./StatusChangeDialog'))); | |||
import * as DateUtils from "utils/DateUtils"; | |||
import { notifyActionSuccess, notifySaveSuccess } from "utils/CommonFunction"; | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import { useNavigate } from "react-router-dom"; | |||
// ==============================|| Body - DEFAULT ||============================== // | |||
@@ -84,7 +84,7 @@ const PublicNoticeDetail_GLD = () => { | |||
backgroundPosition: 'right' | |||
} | |||
const title = groupNo != null ? ("Application / " + appNo + ", " + gazetteIssue + ", " + issueNum + " , " + groupNo) : ("Application / " + appNo + ", " + gazetteIssue + ", " + issueNum) | |||
const title = groupNo != null ? (appNo + ", " + gazetteIssue + ", " + issueNum + " , " + groupNo) : (appNo + ", " + gazetteIssue + ", " + issueNum) | |||
useEffect(() => { | |||
loadApplicationDetail(); | |||
@@ -322,16 +322,18 @@ const PublicNoticeDetail_GLD = () => { | |||
</div> | |||
</Grid> | |||
<Grid item xs={12}> | |||
<Button sx={{ml:3.5, mt:2}} style={{ border: '2px solid' }} variant="outlined" onClick={()=>{navigate("/application/search")}}> | |||
<KeyboardBackspaceOutlinedIcon/> | |||
<Typography variant="h4">Back</Typography> | |||
<Stack direction="row"> | |||
<Button sx={{ml:3.5, mt:2.5}} style={{ border: '2px solid' }} variant="outlined" onClick={()=>{navigate("/application/search")}}> | |||
<ForwardIcon style={{height: 30, width: 50, transform : "rotate(180deg)"}}/> | |||
</Button> | |||
<Typography ml={4} mt={3} variant="h4">{title}</Typography> | |||
</Stack> | |||
</Grid> | |||
<Grid item xs={12} > | |||
{/* <Grid item xs={12} > | |||
<Stack direction="row" height='20px' justifyContent="flex-start" alignItems="center"> | |||
<Typography ml={4} mt={3} variant="h4">{title}</Typography> | |||
</Stack> | |||
</Grid> | |||
</Grid> */} | |||
<Grid item xs={12} > | |||
<Grid container direction="row"> | |||
<Grid item xs={12} md={10} lg={10} xl={10}> | |||
@@ -128,7 +128,7 @@ const ApplicationDetailCard = ( | |||
alignItems: 'end' | |||
}}> | |||
<EditNoteIcon /> | |||
<Typography ml={1}> 支付</Typography> | |||
<Typography ml={1} variant="h5"> 支付</Typography> | |||
</Button> | |||
: null | |||
} | |||
@@ -143,12 +143,12 @@ const ApplicationDetailCard = ( | |||
backgroundColor: '#ffa733' | |||
}}> | |||
<CloseIcon /> | |||
<Typography ml={1}> 取消</Typography> | |||
<Typography ml={1} variant="h5"> 取消</Typography> | |||
</Button> | |||
</Stack> | |||
</Grid> | |||
</Grid> | |||
<Typography variant="h5" sx={{ mb: 2, borderBottom: "1px solid black" }}> | |||
<Typography variant="h4" sx={{ mb: 2, borderBottom: "1px solid black" }}> | |||
公共啟事申請資料 | |||
</Typography> | |||
<form> | |||
@@ -160,7 +160,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>申請編號:</FormLabel> | |||
<FormLabel><Typography variant="h5">申請編號:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -188,7 +188,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>申請狀態:</FormLabel> | |||
<FormLabel><Typography variant="h5">申請狀態:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={2} lg={2}> | |||
@@ -199,7 +199,7 @@ const ApplicationDetailCard = ( | |||
<Grid item xs={12} md={7} lg={7}> | |||
<Stack direction="row" justifyContent="flex-start" alignItems="center"> | |||
<FormControl variant="outlined" fullWidth disabled> | |||
<Typography id='reason'> | |||
<Typography id='reason' variant="h5"> | |||
{currentApplicationDetailData.reason} | |||
</Typography> | |||
</FormControl> | |||
@@ -214,7 +214,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>申請人:</FormLabel> | |||
<FormLabel><Typography variant="h5">申請人:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -259,7 +259,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>憲報期數:</FormLabel> | |||
<FormLabel><Typography variant="h5">憲報期數:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -291,7 +291,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>聯絡人:</FormLabel> | |||
<FormLabel><Typography variant="h5">聯絡人:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -319,7 +319,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>發布日期:</FormLabel> | |||
<FormLabel><Typography variant="h5">發布日期:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -352,7 +352,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>聯絡電話:</FormLabel> | |||
<FormLabel><Typography variant="h5">聯絡電話:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -399,11 +399,11 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>價錢:</FormLabel> | |||
<FormLabel><Typography variant="h5">價錢:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormLabel>{FormatUtils.currencyFormat(fee)}</FormLabel> | |||
<FormLabel><Typography variant="h5">{FormatUtils.currencyFormat(fee)}</Typography></FormLabel> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
@@ -416,7 +416,7 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>傳真號碼:</FormLabel> | |||
<FormLabel><Typography variant="h5">傳真號碼:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
@@ -465,7 +465,7 @@ const ApplicationDetailCard = ( | |||
<Grid container direction="row"> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>稿件檔案:</FormLabel> | |||
<FormLabel><Typography variant="h5">稿件檔案:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9} sx={{ display: 'flex', alignItems: 'center' }}> | |||
<Grid container direction="row" justifyContent="flex-start"> | |||
@@ -474,6 +474,7 @@ const ApplicationDetailCard = ( | |||
<Typography | |||
fullWidth | |||
id='fileName' | |||
variant="h5" | |||
> | |||
{fileDetail.filename} | |||
</Typography> | |||
@@ -502,10 +503,10 @@ const ApplicationDetailCard = ( | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{ display: 'flex', alignItems: 'center' }}> | |||
<FormLabel>備註:</FormLabel> | |||
<FormLabel><Typography variant="h5">備註:</Typography></FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormLabel>{currentApplicationDetailData.remarks}</FormLabel> | |||
<FormLabel><Typography variant="h5">{currentApplicationDetailData.remarks}</Typography></FormLabel> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
@@ -514,15 +515,15 @@ const ApplicationDetailCard = ( | |||
<div> | |||
<Dialog open={isPopUp} onClose={() => setIsPopUp(false)} > | |||
<DialogTitle></DialogTitle> | |||
<Typography variant="h2" style={{ padding: '16px' }}>確認付款</Typography> | |||
<Typography variant="h3" style={{ padding: '16px' }}>確認付款</Typography> | |||
<DialogContent style={{ display: 'flex', }}> | |||
<Stack direction="column" justifyContent="space-between"> | |||
總計金額: {FormatUtils.currencyFormat(fee)} | |||
<Typography variant="h4">總計金額: {FormatUtils.currencyFormat(fee)}</Typography> | |||
</Stack> | |||
</DialogContent> | |||
<DialogActions> | |||
<Button onClick={() => setIsPopUp(false)}>Close</Button> | |||
<Button onClick={() => doPayment()}>確認</Button> | |||
<Button onClick={() => setIsPopUp(false)}><Typography variant="h5">Close</Typography></Button> | |||
<Button onClick={() => doPayment()}><Typography variant="h5">確認</Typography></Button> | |||
</DialogActions> | |||
</Dialog> | |||
</div> | |||
@@ -73,9 +73,9 @@ const StatusChangeDialog = (props) => { | |||
<DialogContent> | |||
<DialogContentText> | |||
<Grid container direction="row" justifyContent="center" alignItems="center"> | |||
<Grid item xs={12} md={5} lg={5} sx={{mb: 5,}}> | |||
<Grid item xs={12} md={8} lg={8} sx={{mb: 5,}}> | |||
<FormLabel sx={{fontSize: "18px", color:"#000000",textAlign:"center"}}> | |||
確定{status}公共啟事? | |||
<Typography variant="h5">確定{status}公共啟事?</Typography> | |||
</FormLabel> | |||
</Grid> | |||
</Grid> | |||
@@ -86,12 +86,12 @@ const StatusChangeDialog = (props) => { | |||
<Stack direction="row" justifyContent="space-around"> | |||
<DialogActions> | |||
<Button variant="contained" onClick={props.handleClose} autoFocus> | |||
取消 | |||
<Typography variant="h5">取消</Typography> | |||
</Button> | |||
</DialogActions> | |||
<DialogActions> | |||
<Button variant="contained" color="error" onClick={acceptedHandle()} autoFocus > | |||
確定 | |||
<Typography variant="h5">確定</Typography> | |||
</Button> | |||
</DialogActions> | |||
</Stack> | |||
@@ -28,7 +28,8 @@ import { | |||
} from "utils/ApiPathConst"; | |||
import { useNavigate } from "react-router-dom"; | |||
const StatusChangeDialog = Loadable(lazy(() => import('./StatusChangeDialog'))); | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import { notifyActionSuccess } from "utils/CommonFunction"; | |||
// ==============================|| Body - DEFAULT ||============================== // | |||
@@ -36,6 +37,8 @@ const DashboardDefault = () => { | |||
const params = useParams(); | |||
const [applicationDetailData, setApplicationDetailData] = useState({}); | |||
const [appNo, setAapNo] = useState(""); | |||
const [gazetteIssue, setGazetteIssue] = useState(""); | |||
const [issueNum, setIssueNum] = useState(""); | |||
// const [refApplicationDetailData, setRefApplicationDetailData] = React.useState({}); | |||
const navigate = useNavigate() | |||
@@ -44,6 +47,24 @@ const DashboardDefault = () => { | |||
const [getStatus, setStatus] = useState(""); | |||
const [statusWindowAccepted, setStatusWindowAccepted] = useState(false); | |||
const title = appNo + ", " + gazetteIssue + ", " + issueNum | |||
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 BackgroundHead = { | |||
backgroundImage: `url(${titleBackgroundImg})`, | |||
width: '100%', | |||
@@ -65,7 +86,10 @@ const DashboardDefault = () => { | |||
.then((response) => { | |||
if (response.status === 200) { | |||
setApplicationDetailData(response.data); | |||
const gazetteIssueDetail = response.data.gazetteIssueDetail; | |||
setAapNo(response.data.data.appNo); | |||
setGazetteIssue(gazetteIssueDetail.year + " Vol " + gazetteIssueDetail.volume); | |||
setIssueNum(" No. " + gazetteIssueDetail.issueNo); | |||
} | |||
}) | |||
.catch(error => { | |||
@@ -107,6 +131,7 @@ const DashboardDefault = () => { | |||
axios.get(`${SET_PUBLIC_NOTICE_STATUS_CANCELLED}/${params.id}`) | |||
.then((response) => { | |||
if (response.status === 204) { | |||
notifyActionSuccess("取消成功!") | |||
setOpen(false); | |||
handleClose(); | |||
loadApplicationDetail() | |||
@@ -129,24 +154,20 @@ const DashboardDefault = () => { | |||
</Stack> | |||
</div> | |||
</Grid> | |||
<Grid item xs={12} > | |||
<Stack direction="row" height='20px' justifyContent="flex-start" alignItems="center"> | |||
<Typography ml={3} mt={3} variant="h4">我的公共啟事 / {appNo}</Typography> | |||
</Stack> | |||
</Grid> | |||
<Grid item xs={12} md={12}> | |||
<Grid container direction="column" justifyContent="flex-start" alignItems="center"> | |||
<Grid item xs={12} width="75%"> | |||
<Button sx={{ mt: 4 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/publicNotice") }}> | |||
<KeyboardBackspaceOutlinedIcon /> | |||
<Typography variant="h4">Back</Typography> | |||
</Button> | |||
<Stack direction="row"> | |||
<Button sx={{ ml: 0, mt: 2.5 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/publicNotice") }}> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
<Typography ml={3} mt={3} variant="h4">{title}</Typography> | |||
</Stack> | |||
</Grid> | |||
{/* <Grid item xs={12} md={12} > */} | |||
{/* <Grid container direction="column" alignItems="center"> */} | |||
<Grid item width="75%"> | |||
<Box xs={12} mt={3} sx={{ p: 2, border: '3px groove grey', borderRadius: '10px' }}> | |||
<Box xs={12} mt={3} sx={{ p: 2, border: '0px groove grey', borderRadius: '10px', ..._sx }}> | |||
<ApplicationDetailCard | |||
setStatus={setStatus} | |||
applicationDetailData={applicationDetailData} | |||
@@ -16,6 +16,7 @@ export default function BaseGrid({rows}) { | |||
const handleDetailClick = (params) => () => { | |||
navigate('/publicNotice/'+ params.id); | |||
}; | |||
const columns = [ | |||
{ | |||
id: 'appNo', | |||
@@ -76,7 +77,7 @@ export default function BaseGrid({rows}) { | |||
{ | |||
field: 'actions', | |||
headerName: '', | |||
width: 80, | |||
width: 160, | |||
cellClassName: 'actions', | |||
renderCell: (params) => { | |||
return <Button onClick={handleDetailClick(params)}>查看詳細</Button>; | |||
@@ -99,6 +100,7 @@ export default function BaseGrid({rows}) { | |||
}, | |||
}} | |||
onRowDoubleClick={handleRowDoubleClick} | |||
getRowHeight={() => 'auto'} | |||
/> | |||
</div> | |||
); | |||
@@ -117,9 +117,9 @@ export default function SubmittedTab({ rows }) { | |||
totalAmount += datas[i].fee; | |||
} | |||
content.push(<> | |||
content.push(<Typography variant="h5"> | |||
總計金額: {totalAmount} <br /><br /> | |||
</>); | |||
</Typography>); | |||
//setAmount(totalAmount); | |||
return content; | |||
} | |||
@@ -131,7 +131,7 @@ export default function SubmittedTab({ rows }) { | |||
function doPayment() { | |||
setIsPopUp(false); | |||
let totalAmount = 0; | |||
let appIdList =[]; | |||
let appIdList = []; | |||
const datas = rows?.filter((row) => | |||
selectedRowItems.includes(row.id) | |||
); | |||
@@ -139,7 +139,7 @@ export default function SubmittedTab({ rows }) { | |||
totalAmount += datas[i].fee; | |||
appIdList.push(datas[i].id); | |||
} | |||
navigate('/paymentPage', { state: { amount: totalAmount, appIdList: appIdList} }); | |||
navigate('/paymentPage', { state: { amount: totalAmount, appIdList: appIdList } }); | |||
} | |||
return ( | |||
@@ -159,8 +159,10 @@ export default function SubmittedTab({ rows }) { | |||
setSelectedRowItems(newSelection); | |||
}} | |||
onRowDoubleClick={handleRowDoubleClick} | |||
getRowHeight={() => 'auto'} | |||
/> | |||
<Button variant="contained" onClick={() => { setIsPopUp(true) }}>付款</Button> | |||
<br/> | |||
<Button variant="contained" onClick={() => { setIsPopUp(true) }}><Typography variant="h5">付款</Typography></Button> | |||
</div> | |||
<div> | |||
@@ -173,8 +175,8 @@ export default function SubmittedTab({ rows }) { | |||
</Stack> | |||
</DialogContent> | |||
<DialogActions> | |||
<Button onClick={() => setIsPopUp(false)}>Close</Button> | |||
<Button onClick={() => doPayment()}>確認</Button> | |||
<Button onClick={() => setIsPopUp(false)}><Typography variant="h5">Close</Typography></Button> | |||
<Button onClick={() => doPayment()}><Typography variant="h5">確認</Typography></Button> | |||
</DialogActions> | |||
</Dialog> | |||
</div> | |||
@@ -3,7 +3,8 @@ import { | |||
Button, | |||
CardContent, | |||
Grid, TextField, | |||
Autocomplete | |||
Autocomplete, | |||
Typography | |||
} from '@mui/material'; | |||
import MainCard from "components/MainCard"; | |||
import { useForm } from "react-hook-form"; | |||
@@ -16,7 +17,7 @@ import * as DateUtils from "utils/DateUtils"; | |||
const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
const [type, setType] = React.useState([]); | |||
const [status, setStatus] = React.useState([{ key: 0, label: 'All', labelCht: "全部", type: 'all' }]); | |||
const [status, setStatus] = React.useState([{ key: 0, label: 'All', labelCht: "全部", type: 'all' }]); | |||
const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | |||
const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); | |||
@@ -43,7 +44,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
function resetForm() { | |||
setType([]); | |||
setStatus({ key: 0, label: 'All', labelCht: "全部", type: 'all' }); | |||
setStatus({ key: 0, label: 'All', labelCht: "全部", type: 'all' }); | |||
reset(); | |||
} | |||
@@ -56,7 +57,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
{/*row 1*/} | |||
<CardContent sx={{ px: 2.5, pt: 3 }}> | |||
<Grid item justifyContent="space-between" alignItems="center"> | |||
搜尋 | |||
<Typography variant="h4">搜尋</Typography> | |||
</Grid> | |||
</CardContent> | |||
@@ -83,8 +84,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
type="date" | |||
label="提交日期(從)" | |||
defaultValue={searchCriteria.dateFrom} | |||
InputProps={{inputProps: { max: maxDate} }} | |||
onChange={(newValue)=>{ | |||
InputProps={{ inputProps: { max: maxDate } }} | |||
onChange={(newValue) => { | |||
setMinDate(DateUtils.dateStr(newValue)); | |||
}} | |||
InputLabelProps={{ | |||
@@ -104,8 +105,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
type="date" | |||
label="提交日期(到)" | |||
defaultValue={searchCriteria.dateTo} | |||
InputProps={{inputProps: { min: minDate} }} | |||
onChange={(newValue)=>{ | |||
InputProps={{ inputProps: { min: minDate } }} | |||
onChange={(newValue) => { | |||
setMaxDate(DateUtils.dateStr(newValue)); | |||
}} | |||
/> | |||
@@ -131,13 +132,13 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
id="status" | |||
// filterOptions={(options)=>options} | |||
options={ | |||
localStorage.getItem('userData').creditor? | |||
ComboData.publicNoticeStatic_Creditor: | |||
ComboData.publicNoticeStatic | |||
localStorage.getItem('userData').creditor ? | |||
ComboData.publicNoticeStatic_Creditor : | |||
ComboData.publicNoticeStatic | |||
} | |||
values={status} | |||
value={status} | |||
// inputValue={status?.labelCht} | |||
getOptionLabel={(option)=>option.labelCht} | |||
getOptionLabel={(option) => option.labelCht} | |||
onChange={(event, newValue) => { | |||
console.log(newValue) | |||
const findAllIndex = newValue.findIndex((ele) => { | |||
@@ -150,7 +151,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
} else { | |||
const selectedLabels = newValue.map(option => option.type); | |||
const selectedLabelsString = `${selectedLabels.join(',')}`; | |||
setStatus(newValue); | |||
setStatus(newValue); | |||
console.log(newValue) | |||
setSelectedLabelsString(selectedLabelsString); | |||
} | |||
@@ -160,11 +161,14 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
renderInput={(params) => ( | |||
<TextField {...params} | |||
label="狀態" | |||
InputLabelProps={{ | |||
shrink: true | |||
}} | |||
/> | |||
)} | |||
// InputLabelProps={{ | |||
// shrink: true | |||
// }} | |||
// InputLabelProps={{ | |||
// shrink: true | |||
// }} | |||
/> | |||
</Grid> | |||
{/*<Grid item xs={9} s={6} md={5} lg={3} sx={{ml:3, mr:3, mb:3}}>*/} | |||
@@ -191,7 +195,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
重置 | |||
<Typography variant="h5">重置</Typography> | |||
</Button> | |||
</Grid> | |||
@@ -204,7 +208,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
搜尋 | |||
<Typography variant="h5">搜尋</Typography> | |||
</Button> | |||
</Grid> | |||
</Grid> | |||
@@ -35,11 +35,27 @@ const PublicNotice = () => { | |||
const [selectedTab, setSelectedTab] = useState("1"); | |||
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" | |||
} | |||
} | |||
const BackgroundHead = { | |||
backgroundImage: `url(${titleBackgroundImg})`, | |||
width: '100%', | |||
height: '100%', | |||
backgroundSize:'contain', | |||
backgroundSize: 'contain', | |||
backgroundRepeat: 'no-repeat', | |||
backgroundColor: '#0C489E', | |||
backgroundPosition: 'right' | |||
@@ -81,7 +97,7 @@ const PublicNotice = () => { | |||
isLoading ? | |||
<LoadingComponent /> | |||
: | |||
<Grid container > | |||
<Grid container> | |||
<Grid item xs={12}> | |||
<div style={BackgroundHead}> | |||
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||
@@ -89,10 +105,10 @@ const PublicNotice = () => { | |||
</Stack> | |||
</div> | |||
</Grid> | |||
<Grid item xs={12} mt={1} > | |||
<Grid item xs={12} mt={1} sx={{ mt: 3 }} > | |||
<Stack direction="row" justifyContent="flex-end" alignItems="center"> | |||
<Box sx={{ mr: { md: "47px" } }}> | |||
<Button variant="contained" onClick={() => { onBtnClick() }}>申請公共啟事</Button> | |||
<Button variant="contained" onClick={() => { onBtnClick() }}><Typography variant="h5">申請公共啟事</Typography></Button> | |||
</Box> | |||
</Stack> | |||
</Grid> | |||
@@ -100,7 +116,7 @@ const PublicNotice = () => { | |||
{ | |||
JSON.parse(localStorage.getItem('userData')).creditor ? ( | |||
<Grid item xs={12} sx={{ minHeight: '75vh' }}> | |||
<Grid item xs={12} sx={{ minHeight: '75vh', backgroundColor: "#fff", mt: 3, mr: 3, ml: 3, mb: 3, ..._sx }}> | |||
<TabContext value={selectedTab}> | |||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}> | |||
<TabList onChange={handleChange} aria-label="lab API tabs example"> | |||
@@ -137,7 +153,7 @@ const PublicNotice = () => { | |||
</TabContext> | |||
</Grid> | |||
) : ( | |||
<Grid item xs={12} sx={{ minHeight: '75vh' }}> | |||
<Grid item xs={12} sx={{ minHeight: '75vh', backgroundColor: "#fff", mt: 3, mr: 3, ml: 3, mb: 3, ..._sx }}> | |||
<TabContext value={selectedTab}> | |||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}> | |||
<TabList onChange={handleChange} aria-label="lab API tabs example"> | |||
@@ -24,7 +24,7 @@ import { | |||
notifyDeleteSuccess, | |||
notifySaveSuccess, | |||
} from "../../../utils/CommonFunction"; | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
const BackgroundHead = { | |||
@@ -214,8 +214,7 @@ const UserMaintainPage = () => { | |||
</Grid> | |||
<Grid item xs={12}> | |||
<Button sx={{ ml: 3.5, mt: 2 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/userSearchview") }}> | |||
<KeyboardBackspaceOutlinedIcon /> | |||
<Typography variant="h4">Back</Typography> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
</Grid> | |||
{/*col 1*/} | |||
@@ -8,7 +8,7 @@ import * as HttpUtils from "../../../utils/HttpUtils"; | |||
import { useParams } from "react-router-dom"; | |||
import * as UrlUtils from "../../../utils/ApiPathConst"; | |||
import * as DateUtils from '../../../utils/DateUtils'; | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
const BackgroundHead = { | |||
@@ -112,8 +112,7 @@ const UserMaintainPage_Individual = () => { | |||
</Grid> | |||
<Grid item xs={12}> | |||
<Button sx={{ ml: 3.5, mt: 2 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/indUser") }}> | |||
<KeyboardBackspaceOutlinedIcon /> | |||
<Typography variant="h4">Back</Typography> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
</Grid> | |||
{/*col 1*/} | |||
@@ -14,7 +14,7 @@ import Loadable from 'components/Loadable'; | |||
import { lazy } from 'react'; | |||
const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); | |||
const UserInformationCard = Loadable(lazy(() => import('./UserInformationCard_Organization'))); | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
import { useNavigate } from 'react-router-dom'; | |||
@@ -139,8 +139,7 @@ const UserMaintainPage_Organization = () => { | |||
</Grid> | |||
<Grid item xs={12}> | |||
<Button sx={{ ml: 3.5, mt: 2 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/orgUser") }}> | |||
<KeyboardBackspaceOutlinedIcon /> | |||
<Typography variant="h4">Back</Typography> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
</Grid> | |||
{/*col 1*/} | |||
@@ -21,7 +21,7 @@ const DashboardDefault = () => { | |||
backgroundPosition: 'right' | |||
} | |||
return ( | |||
<Grid container sx={{minHeight: '90vh'}} direction="column"> | |||
<Grid container sx={{minHeight: '90vh', backgroundColor: "backgroundColor.default"}} direction="column"> | |||
<Grid item xs={12}> | |||
<div style={BackgroundHead}> | |||
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||
@@ -25,7 +25,7 @@ const GroupAuthCard = Loadable(lazy(() => import('./GroupAuthCard'))); | |||
const UserGroupInfoCard = Loadable(lazy(() => import('./UserGroupInfoCard'))); | |||
const UserAddCard = Loadable(lazy(() => import('./UserAddCard'))); | |||
import { useNavigate } from "react-router"; | |||
import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; | |||
import ForwardIcon from '@mui/icons-material/Forward'; | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
const BackgroundHead = { | |||
@@ -179,8 +179,7 @@ const UserMaintainPage = () => { | |||
</Grid> | |||
<Grid item xs={12}> | |||
<Button sx={{ ml: 3.5, mt: 2 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/usergroupSearchview") }}> | |||
<KeyboardBackspaceOutlinedIcon /> | |||
<Typography variant="h4">Back</Typography> | |||
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
</Button> | |||
</Grid> | |||
{/*col 1*/} | |||