From 92e9afe34acbb783b165f635797a24831acb2178 Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 22 Sep 2023 12:12:00 +0800 Subject: [PATCH] creditor --- .../ApplyForm/PublicNoticeApplyForm.js | 3 +- src/pages/PublicNotice/ListPanel/index.js | 149 ++++++++++++------ src/pages/_Test/Mail/index.js | 5 +- .../auth-forms/AuthLoginCustom.js | 1 + 4 files changed, 107 insertions(+), 51 deletions(-) diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js index 9297ae5..1a73e06 100644 --- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js +++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js @@ -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) diff --git a/src/pages/PublicNotice/ListPanel/index.js b/src/pages/PublicNotice/ListPanel/index.js index 1171814..b059e10 100644 --- a/src/pages/PublicNotice/ListPanel/index.js +++ b/src/pages/PublicNotice/ListPanel/index.js @@ -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 = () => {
- - 我的公共啟事 - + + 我的公共啟事 +
- + {/*col 2*/} - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + { + JSON.parse(localStorage.getItem('userData')).creditor ? ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) : ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) + } +
); }; diff --git a/src/pages/_Test/Mail/index.js b/src/pages/_Test/Mail/index.js index 806df59..9c9c472 100644 --- a/src/pages/_Test/Mail/index.js +++ b/src/pages/_Test/Mail/index.js @@ -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 = () => { Test Send e-Mail - {/*col 2*/} @@ -76,6 +76,9 @@ const Mail = () => { Test Send e-Mail + + + ); }; diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js index 57e478f..a4c56ff 100644 --- a/src/pages/authentication/auth-forms/AuthLoginCustom.js +++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js @@ -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}