|
|
@@ -21,6 +21,7 @@ const BaseGrid = Loadable(lazy(() => import('./BaseGrid'))); |
|
|
|
const PendingPaymentTab = Loadable(lazy(() => import('./PendingPaymentTab'))); |
|
|
|
const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); |
|
|
|
const SearchTab = Loadable(lazy(() => import('./SearchPublicNoticeTab'))); |
|
|
|
|
|
|
|
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' |
|
|
|
|
|
|
|
|
|
|
@@ -39,8 +40,8 @@ const PublicNotice = () => { |
|
|
|
backgroundImage: `url(${titleBackgroundImg})`, |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
backgroundSize:'cover' |
|
|
|
} |
|
|
|
backgroundSize: 'cover' |
|
|
|
} |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
loadData(); |
|
|
@@ -82,62 +83,112 @@ const PublicNotice = () => { |
|
|
|
<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> |
|
|
|
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> |
|
|
|
<Typography ml={15} color='#FFF' variant="h4">我的公共啟事</Typography> |
|
|
|
</Stack> |
|
|
|
</div> |
|
|
|
</Grid> |
|
|
|
<Grid item xs={12} mt={1} > |
|
|
|
<Stack direction="row" justifyContent="flex-end" alignItems="center"> |
|
|
|
<Box sx={{mr:{md:"47px"}}}> |
|
|
|
<Box sx={{ mr: { md: "47px" } }}> |
|
|
|
<Button variant="contained" onClick={() => { onBtnClick() }}>申請公共啟事</Button> |
|
|
|
</Box> |
|
|
|
</Stack> |
|
|
|
</Grid> |
|
|
|
{/*col 2*/} |
|
|
|
<Grid item xs={12} sx={{minHeight: '75vh'}}> |
|
|
|
<TabContext value={selectedTab}> |
|
|
|
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}> |
|
|
|
<TabList onChange={handleChange} aria-label="lab API tabs example"> |
|
|
|
<Tab label={"已提交(" + submittedList.length + ")"} value="1" /> |
|
|
|
<Tab label={"處理中(" + inProgressList.length + ")"} value="2" /> |
|
|
|
<Tab label={"待付款(" + pendingPaymentList.length + ")"} value="3" /> |
|
|
|
<Tab label={"待發佈(" + pendingPublishList.length + ")"} value="4" /> |
|
|
|
<Tab label="搜尋申請記錄" value="5" /> |
|
|
|
</TabList> |
|
|
|
</Box> |
|
|
|
<TabPanel value="1"> |
|
|
|
<BaseGrid |
|
|
|
rows={submittedList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="2"> |
|
|
|
<BaseGrid |
|
|
|
rows={inProgressList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="3"> |
|
|
|
<PendingPaymentTab |
|
|
|
rows={pendingPaymentList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="4"> |
|
|
|
<BaseGrid |
|
|
|
rows={pendingPublishList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="5"> |
|
|
|
<SearchTab |
|
|
|
rows={pendingPublishList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
</TabContext> |
|
|
|
</Grid> |
|
|
|
|
|
|
|
{ |
|
|
|
JSON.parse(localStorage.getItem('userData')).creditor ? ( |
|
|
|
<Grid item xs={12} sx={{ minHeight: '75vh' }}> |
|
|
|
<TabContext value={selectedTab}> |
|
|
|
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}> |
|
|
|
<TabList onChange={handleChange} aria-label="lab API tabs example"> |
|
|
|
<Tab label={"已提交(" + submittedList?.length + ")"} value="1" /> |
|
|
|
<Tab label={"處理中(" + inProgressList?.length + ")"} value="2" /> |
|
|
|
<Tab label={"待發佈(" + pendingPublishList?.length + ")"} value="3" /> |
|
|
|
<Tab label={"待付款(" + pendingPaymentList?.length + ")"} value="4" /> |
|
|
|
<Tab label="搜尋申請記錄" value="5" /> |
|
|
|
</TabList> |
|
|
|
</Box> |
|
|
|
<TabPanel value="1"> |
|
|
|
<BaseGrid |
|
|
|
rows={submittedList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="2"> |
|
|
|
<BaseGrid |
|
|
|
rows={inProgressList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="3"> |
|
|
|
<BaseGrid |
|
|
|
rows={pendingPublishList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="4"> |
|
|
|
<BaseGrid |
|
|
|
rows={pendingPaymentList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="5"> |
|
|
|
<SearchTab |
|
|
|
rows={pendingPublishList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
</TabContext> |
|
|
|
</Grid> |
|
|
|
) : ( |
|
|
|
<Grid item xs={12} sx={{ minHeight: '75vh' }}> |
|
|
|
<TabContext value={selectedTab}> |
|
|
|
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}> |
|
|
|
<TabList onChange={handleChange} aria-label="lab API tabs example"> |
|
|
|
<Tab label={"已提交(" + submittedList.length + ")"} value="1" /> |
|
|
|
<Tab label={"處理中(" + inProgressList.length + ")"} value="2" /> |
|
|
|
<Tab label={"待付款(" + pendingPaymentList.length + ")"} value="3" /> |
|
|
|
<Tab label={"待發佈(" + pendingPublishList.length + ")"} value="4" /> |
|
|
|
<Tab label="搜尋申請記錄" value="5" /> |
|
|
|
</TabList> |
|
|
|
</Box> |
|
|
|
<TabPanel value="1"> |
|
|
|
<BaseGrid |
|
|
|
rows={submittedList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="2"> |
|
|
|
<BaseGrid |
|
|
|
rows={inProgressList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="3"> |
|
|
|
<PendingPaymentTab |
|
|
|
rows={pendingPaymentList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="4"> |
|
|
|
<BaseGrid |
|
|
|
rows={pendingPublishList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
<TabPanel value="5"> |
|
|
|
<SearchTab |
|
|
|
rows={pendingPublishList} |
|
|
|
reloadFunction={reloadPage} |
|
|
|
/> |
|
|
|
</TabPanel> |
|
|
|
</TabContext> |
|
|
|
</Grid> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
</Grid> |
|
|
|
); |
|
|
|
}; |
|
|
|