@@ -1,7 +1,6 @@ | |||||
// material-ui | // material-ui | ||||
import { | import { | ||||
Button, | Button, | ||||
CardContent, | |||||
Grid, TextField, | Grid, TextField, | ||||
Autocomplete, | Autocomplete, | ||||
Typography | Typography | ||||
@@ -14,6 +13,8 @@ import * as DateUtils from "utils/DateUtils"; | |||||
import { | import { | ||||
isORGLoggedIn, | isORGLoggedIn, | ||||
} from "utils/Utils"; | } from "utils/Utils"; | ||||
import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | |||||
import {ThemeProvider} from "@emotion/react"; | |||||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
@@ -27,6 +28,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
const [selectedLabelsString, setSelectedLabelsString] = React.useState(''); | const [selectedLabelsString, setSelectedLabelsString] = React.useState(''); | ||||
const { reset, register, handleSubmit } = useForm() | const { reset, register, handleSubmit } = useForm() | ||||
const marginBottom = 2.5; | |||||
const onSubmit = (data) => { | const onSubmit = (data) => { | ||||
data.status = selectedLabelsString | data.status = selectedLabelsString | ||||
let typeArray = []; | let typeArray = []; | ||||
@@ -59,12 +62,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
<form onSubmit={handleSubmit(onSubmit)}> | <form onSubmit={handleSubmit(onSubmit)}> | ||||
{/*row 1*/} | {/*row 1*/} | ||||
<CardContent sx={{ px: 2.5, pt: 3 }}> | |||||
<Grid item justifyContent="space-between" alignItems="center"> | |||||
<Typography variant="h4">搜尋</Typography> | |||||
</Grid> | |||||
</CardContent> | |||||
<Grid item justifyContent="space-between" alignItems="center" sx={{mt:1,ml:3,mb:marginBottom}}> | |||||
<Typography variant="pnspsFormTitle" > | |||||
搜尋 | |||||
</Typography> | |||||
</Grid> | |||||
{/*row 2*/} | {/*row 2*/} | ||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}> | <Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}> | ||||
@@ -148,6 +150,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
multiple | multiple | ||||
{...register("status")} | {...register("status")} | ||||
id="status" | id="status" | ||||
size="small" | |||||
// filterOptions={(options)=>options} | // filterOptions={(options)=>options} | ||||
options={ | options={ | ||||
localStorage.getItem('userData').creditor ? | localStorage.getItem('userData').creditor ? | ||||
@@ -203,32 +206,25 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
{/*last row*/} | {/*last row*/} | ||||
<Grid container maxWidth justifyContent="flex-end"> | <Grid container maxWidth justifyContent="flex-end"> | ||||
<Grid item sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}> | |||||
<ThemeProvider theme={PNSPS_BUTTON_THEME}> | |||||
<Grid item sx={{ ml: 3, mr: 3 }}> | |||||
<Button | <Button | ||||
size="large" | |||||
variant="contained" | variant="contained" | ||||
onClick={resetForm} | onClick={resetForm} | ||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end' | |||||
}}> | |||||
<Typography variant="h5">重置</Typography> | |||||
> | |||||
<Typography variant="pnspsButtonText">重置</Typography> | |||||
</Button> | </Button> | ||||
</Grid> | </Grid> | ||||
<Grid item sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}> | |||||
<Grid item sx={{ ml: 3, mr: 3}}> | |||||
<Button | <Button | ||||
size="large" | |||||
variant="contained" | variant="contained" | ||||
type="submit" | type="submit" | ||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end' | |||||
}}> | |||||
<Typography variant="h5">搜尋</Typography> | |||||
> | |||||
<Typography variant="pnspsButtonText">搜尋</Typography> | |||||
</Button> | </Button> | ||||
</Grid> | </Grid> | ||||
</ThemeProvider> | |||||
</Grid> | </Grid> | ||||
</form> | </form> | ||||
</MainCard> | </MainCard> | ||||
@@ -45,9 +45,9 @@ const UserSearchPage_Individual = () => { | |||||
} | } | ||||
return ( | return ( | ||||
<Grid container rowSpacing={4.5} columnSpacing={2.75}> | |||||
<Grid container> | |||||
{/*row 1*/} | {/*row 1*/} | ||||
<Grid item xs={12} md={12} lg={12}> | |||||
<Grid item xs={12} md={12} lg={12} sx={{mb:-4}}> | |||||
<SearchForm | <SearchForm | ||||
applySearch={applySearch} | applySearch={applySearch} | ||||
searchCriteria={searchCriteria} | searchCriteria={searchCriteria} | ||||
@@ -2,7 +2,7 @@ | |||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { | import { | ||||
Button, | Button, | ||||
Typography | |||||
Typography, useMediaQuery | |||||
} from '@mui/material'; | } from '@mui/material'; | ||||
import * as DateUtils from "utils/DateUtils"; | import * as DateUtils from "utils/DateUtils"; | ||||
import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils"; | import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils"; | ||||
@@ -11,11 +11,14 @@ import {FiDataGrid} from "components/FiDataGrid"; | |||||
import { | import { | ||||
isORGLoggedIn, | isORGLoggedIn, | ||||
} from "utils/Utils"; | } from "utils/Utils"; | ||||
import {useTheme} from "@emotion/react"; | |||||
// ==============================|| EVENT TABLE ||============================== // | // ==============================|| EVENT TABLE ||============================== // | ||||
export default function SearchPublicNoticeTable({ recordList }) { | export default function SearchPublicNoticeTable({ recordList }) { | ||||
const [rows, setRows] = React.useState([]); | const [rows, setRows] = React.useState([]); | ||||
const navigate = useNavigate() | const navigate = useNavigate() | ||||
const theme = useTheme(); | |||||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||||
const handleDetailClick = (params) => () => { | const handleDetailClick = (params) => () => { | ||||
navigate('/publicNotice/'+ params.id); | navigate('/publicNotice/'+ params.id); | ||||
@@ -30,13 +33,15 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
id: 'appNo', | id: 'appNo', | ||||
field: 'appNo', | field: 'appNo', | ||||
headerName: '申請編號', | headerName: '申請編號', | ||||
flex: 1, | |||||
width: isMdOrLg ? 'auto' : 160, | |||||
flex: isMdOrLg ? 1 : undefined, | |||||
}, | }, | ||||
{ | { | ||||
id: 'created', | id: 'created', | ||||
field: 'created', | field: 'created', | ||||
headerName: '提交日期', | headerName: '提交日期', | ||||
flex: 1, | |||||
width: isMdOrLg ? 'auto' : 160, | |||||
flex: isMdOrLg ? 1 : undefined, | |||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return DateUtils.datetimeStr(params?.value); | return DateUtils.datetimeStr(params?.value); | ||||
} | } | ||||
@@ -71,7 +76,8 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
id: 'remarks', | id: 'remarks', | ||||
field: 'remarks', | field: 'remarks', | ||||
headerName: isORGLoggedIn()?"Care Of / 我的備註":"我的備註", | headerName: isORGLoggedIn()?"Care Of / 我的備註":"我的備註", | ||||
flex: 3, | |||||
width: isMdOrLg ? 'auto' : 400, | |||||
flex: isMdOrLg ? 3 : undefined, | |||||
renderCell: (params) => ( | renderCell: (params) => ( | ||||
isORGLoggedIn()? | isORGLoggedIn()? | ||||
<div> | <div> | ||||
@@ -23,6 +23,8 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo | |||||
const SearchTab = Loadable(lazy(() => import('./SearchPublicNoticeTab'))); | const SearchTab = Loadable(lazy(() => import('./SearchPublicNoticeTab'))); | ||||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
import {PNSPS_LONG_BUTTON_THEME} from "../../../themes/buttonConst"; | |||||
import {ThemeProvider} from "@emotion/react"; | |||||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
@@ -48,6 +50,9 @@ const PublicNotice = () => { | |||||
'& .MuiDataGrid-footerContainer': { | '& .MuiDataGrid-footerContainer': { | ||||
border: 1, | border: 1, | ||||
borderColor: "#EEE" | borderColor: "#EEE" | ||||
}, | |||||
'& .MuiTabPanel-root': { | |||||
padding: '0px', | |||||
} | } | ||||
} | } | ||||
@@ -105,21 +110,23 @@ const PublicNotice = () => { | |||||
</Stack> | </Stack> | ||||
</div> | </div> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} mt={1} sx={{ mt: 3 }} > | |||||
<Grid item xs={12} mt={1} sx={{ mt: 3}} > | |||||
<Stack direction="row" justifyContent="flex-end" alignItems="center"> | <Stack direction="row" justifyContent="flex-end" alignItems="center"> | ||||
<ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | |||||
<Box sx={{ mr: { md: "47px" } }}> | <Box sx={{ mr: { md: "47px" } }}> | ||||
<Button variant="contained" onClick={() => { onBtnClick() }}><Typography variant="h5">申請公共啟事</Typography></Button> | |||||
<Button variant="contained" onClick={() => { onBtnClick() }}><Typography variant="pnspsButtonText">申請公共啟事</Typography></Button> | |||||
</Box> | </Box> | ||||
</ThemeProvider> | |||||
</Stack> | </Stack> | ||||
</Grid> | </Grid> | ||||
{/*col 2*/} | {/*col 2*/} | ||||
{ | { | ||||
JSON.parse(localStorage.getItem('userData')).creditor ? ( | JSON.parse(localStorage.getItem('userData')).creditor ? ( | ||||
<Grid item xs={12} sx={{ minHeight: '75vh', maxWidth: '95%', backgroundColor: "#fff", mt: 3, mr: 3, ml: 3, mb: 3, ..._sx }}> | |||||
<Grid item xs={12} sx={{ minHeight: '75vh', maxWidth: '1%', backgroundColor: "#fff", mt: 3, mr: 3, ml: 3, mb: 3, ..._sx }}> | |||||
<TabContext value={selectedTab}> | <TabContext value={selectedTab}> | ||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}> | |||||
<TabList onChange={handleChange} aria-label="lab API tabs example"> | |||||
<Box sx={{ borderBottom: 1, borderColor: 'divider', overflowX: 'auto' }}> | |||||
<TabList onChange={handleChange} aria-label="lab API tabs example" sx={{ display: 'flex', flexDirection: 'row' }}> | |||||
<Tab label={"處理中 (" + submittedList?.length + ")"} value="1" /> | <Tab label={"處理中 (" + submittedList?.length + ")"} value="1" /> | ||||
<Tab label={"待發布 (" + pendingPublishList?.length + ")"} value="3" /> | <Tab label={"待發布 (" + pendingPublishList?.length + ")"} value="3" /> | ||||
<Tab label={"待付款 (" + pendingPaymentList?.length + ")"} value="4" /> | <Tab label={"待付款 (" + pendingPaymentList?.length + ")"} value="4" /> | ||||
@@ -153,7 +160,7 @@ const PublicNotice = () => { | |||||
</TabContext> | </TabContext> | ||||
</Grid> | </Grid> | ||||
) : ( | ) : ( | ||||
<Grid item xs={12} sx={{ minHeight: '75vh', backgroundColor: "#fff", mt: 3, mr: 3, ml: 3, mb: 3, ..._sx }}> | |||||
<Grid item xs={12} sx={{ minHeight: '75vh', maxWidth: '95%',backgroundColor: "#fff", mt: 3, mr: 3, ml: 3, mb: 3, ..._sx }}> | |||||
<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"> | ||||
@@ -304,10 +304,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
<Button | <Button | ||||
variant="contained" | variant="contained" | ||||
onClick={resetForm} | onClick={resetForm} | ||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end' | |||||
}}> | |||||
> | |||||
Clear | Clear | ||||
</Button> | </Button> | ||||
</Grid> | </Grid> | ||||
@@ -316,10 +313,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
<Button | <Button | ||||
variant="contained" | variant="contained" | ||||
type="submit" | type="submit" | ||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end' | |||||
}}> | |||||
> | |||||
Submit | Submit | ||||
</Button> | </Button> | ||||
</Grid> | </Grid> | ||||
@@ -53,7 +53,8 @@ export const PNSPS_BUTTON_THEME = createTheme({ | |||||
MuiButton: { | MuiButton: { | ||||
styleOverrides: { | styleOverrides: { | ||||
root: { | root: { | ||||
fontSize: '1.0rem', | |||||
fontSize: '1.2rem', | |||||
fontWeight: '600', | |||||
height: '40px', | height: '40px', | ||||
width: '40vw', // Default width for xs screen sizes | width: '40vw', // Default width for xs screen sizes | ||||
'@media (min-width: 600px)': { // sm breakpoint | '@media (min-width: 600px)': { // sm breakpoint | ||||
@@ -126,17 +127,18 @@ export const PNSPS_LONG_BUTTON_THEME = createTheme({ | |||||
MuiButton: { | MuiButton: { | ||||
styleOverrides: { | styleOverrides: { | ||||
root: { | root: { | ||||
fontSize: '1.0rem', | |||||
fontSize: '1.2rem', | |||||
fontWeight: '600', | |||||
height: '40px', | height: '40px', | ||||
width: '70vw', // Default width for xs screen sizes | |||||
width: '60vw', // Default width for xs screen sizes | |||||
'@media (min-width: 600px)': { // sm breakpoint | '@media (min-width: 600px)': { // sm breakpoint | ||||
width: '30vw', | |||||
width: '33vw', | |||||
}, | }, | ||||
'@media (min-width: 960px)': { // md breakpoint | '@media (min-width: 960px)': { // md breakpoint | ||||
width: '25vw', | width: '25vw', | ||||
}, | }, | ||||
'@media (min-width: 1280px)': { // lg breakpoint | '@media (min-width: 1280px)': { // lg breakpoint | ||||
width: '19vw', | |||||
width: '16vw', | |||||
}, | }, | ||||
textTransform: "none", | textTransform: "none", | ||||
alignItems: 'center' | alignItems: 'center' | ||||
@@ -158,15 +158,16 @@ export const PNSPS_THEME = createTheme({ | |||||
fontSize: '1.25rem' | fontSize: '1.25rem' | ||||
}, | }, | ||||
sizeMedium: { | sizeMedium: { | ||||
width: theme.spacing(4.5), | |||||
height: theme.spacing(4.5), | |||||
width: theme.spacing(3.75), | |||||
height: theme.spacing(3.75), | |||||
fontSize: '1rem' | fontSize: '1rem' | ||||
}, | }, | ||||
sizeSmall: { | sizeSmall: { | ||||
width: theme.spacing(3.75), | width: theme.spacing(3.75), | ||||
height: theme.spacing(3.75), | height: theme.spacing(3.75), | ||||
fontSize: '0.75rem' | fontSize: '0.75rem' | ||||
} | |||||
}, | |||||
top: "auto" | |||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
@@ -8,7 +8,7 @@ const Typography = (fontFamily) => ({ | |||||
fontWeightMedium: 500, | fontWeightMedium: 500, | ||||
fontWeightBold: 600, | fontWeightBold: 600, | ||||
pnspsFormTitle: { | pnspsFormTitle: { | ||||
fontWeight: 600, | |||||
fontWeight: 500, | |||||
fontSize: '1.175rem', | fontSize: '1.175rem', | ||||
lineHeight: 1.4 | lineHeight: 1.4 | ||||
}, | }, | ||||
@@ -23,7 +23,7 @@ const Typography = (fontFamily) => ({ | |||||
lineHeight: 1.5 | lineHeight: 1.5 | ||||
}, | }, | ||||
pnspsFormParagraph: { | pnspsFormParagraph: { | ||||
fontWeight: 600, | |||||
fontWeight: 400, | |||||
fontSize: '1.1rem', | fontSize: '1.1rem', | ||||
lineHeight: 0.8 | lineHeight: 0.8 | ||||
}, | }, | ||||