Przeglądaj źródła

creditor

master
Anna Ho 1 rok temu
rodzic
commit
92e9afe34a
4 zmienionych plików z 107 dodań i 51 usunięć
  1. +2
    -1
      src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
  2. +100
    -49
      src/pages/PublicNotice/ListPanel/index.js
  3. +4
    -1
      src/pages/_Test/Mail/index.js
  4. +1
    -0
      src/pages/authentication/auth-forms/AuthLoginCustom.js

+ 2
- 1
src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js Wyświetl plik

@@ -93,6 +93,7 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => {

const readFile=(event)=>{
if(event.target.files[0]){
if(event.target.files[0])
setAttachment(event.target.files[0]);
}
}
@@ -177,7 +178,7 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => {
id="uploadFileBtn"
name="file"
type="file"
accept="image/png, image/jpeg.doc,.pdf,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
accept=".doc,.docx,.xml,.xlsx"
style={{ display: 'none' }}
onChange={(event)=> {
readFile(event)


+ 100
- 49
src/pages/PublicNotice/ListPanel/index.js Wyświetl plik

@@ -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>
);
};


+ 4
- 1
src/pages/_Test/Mail/index.js Wyświetl plik

@@ -27,6 +27,7 @@ const Mail = () => {
email: yup.string().max(255).required('請輸入e-Mail')
}),
onSubmit:values=>{
console.log(values);
HttpUtils.post({
url: apiPath+"/test/send-mail",
params: {
@@ -48,7 +49,6 @@ const Mail = () => {
<Grid container spacing={1}>
<Grid item xs={12}>
<Typography variant="h3" style={{ padding: 8}}>Test Send e-Mail</Typography>
</Grid>
{/*col 2*/}
@@ -76,6 +76,9 @@ const Mail = () => {
Test Send e-Mail
</Button>
</form>


</Grid>
);
};


+ 1
- 0
src/pages/authentication/auth-forms/AuthLoginCustom.js Wyświetl plik

@@ -79,6 +79,7 @@ const AuthLoginCustom = () => {
type: response.data.type,
role: response.data.role,
abilities: response.data.abilities,
creditor: response.data.creditor,
//avatar: require('src/assets/images/users/avatar-3.png').default,
}
const data = {...userData, accessToken: response.data.accessToken, refreshToken: response.data.refreshToken}


Ładowanie…
Anuluj
Zapisz