浏览代码

Update UI

master
cyril.tsui 1年前
父节点
当前提交
796f195ba1
共有 26 个文件被更改,包括 344 次插入232 次删除
  1. +1
    -1
      src/components/MainCard.js
  2. +5
    -5
      src/pages/OrganizationDetailPage/OrganizationCard.js
  3. +2
    -2
      src/pages/OrganizationDetailPage/index.js
  4. +14
    -4
      src/pages/OrganizationSearchPage/OrganizationSearchForm.js
  5. +1
    -1
      src/pages/OrganizationSearchPage/index.js
  6. +12
    -13
      src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js
  7. +14
    -12
      src/pages/User/DetailsPage_Individual/index.js
  8. +23
    -22
      src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js
  9. +7
    -7
      src/pages/User/DetailsPage_Organization/index.js
  10. +3
    -0
      src/pages/User/SearchPage/UserTable.js
  11. +50
    -34
      src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js
  12. +31
    -31
      src/pages/User/SearchPage_Individual/index.js
  13. +27
    -5
      src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js
  14. +1
    -2
      src/pages/User/SearchPage_Organization/index.js
  15. +1
    -1
      src/pages/pnspsUserGroupDetailPage/GroupAuthCard.js
  16. +4
    -4
      src/pages/pnspsUserGroupDetailPage/UserAddCard.js
  17. +6
    -6
      src/pages/pnspsUserGroupDetailPage/UserGroupInfoCard.js
  18. +6
    -6
      src/pages/pnspsUserGroupDetailPage/index.js
  19. +30
    -20
      src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js
  20. +1
    -1
      src/pages/pnspsUserGroupSearchPage/index.js
  21. +8
    -1
      src/themes/overrides/Checkbox.js
  22. +9
    -1
      src/themes/overrides/DataGrid.js
  23. +19
    -0
      src/themes/overrides/FormControlLabel.js
  24. +2
    -0
      src/themes/overrides/index.js
  25. +12
    -0
      src/utils/CommonFunction.js
  26. +55
    -53
      src/utils/FieldUtils.js

+ 1
- 1
src/components/MainCard.js 查看文件

@@ -62,7 +62,7 @@ const MainCard = forwardRef(
fontFamily: theme.typography.fontFamily, fontFamily: theme.typography.fontFamily,
fontSize: '0.75rem' fontSize: '0.75rem'
}, },
maxWidth: { xs: 700, sm: 900, md: 1000, lg: 1300, xl: 1900 },
maxWidth: { xs: 700, sm: 900, md: 1000, lg: 1300, xl: 1850 },
// minWidth: { xs: 600, sm: 800, md: 900, lg: 1000, xl: 1000 }, // minWidth: { xs: 600, sm: 800, md: 900, lg: 1000, xl: 1000 },
margin: { xs: 2.5, md: 3 }, margin: { xs: 2.5, md: 3 },
// '& > *': { // '& > *': {


+ 5
- 5
src/pages/OrganizationDetailPage/OrganizationCard.js 查看文件

@@ -139,7 +139,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => {
alignItems: 'end' alignItems: 'end'
}} }}
> >
Create
<Typography variant="h5">Create</Typography>
</Button> </Button>
</Grid> </Grid>
</> : </> :
@@ -154,7 +154,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => {
alignItems: 'end' alignItems: 'end'
}} }}
> >
Reset & Back
<Typography variant="h5">Reset & Back</Typography>
</Button> </Button>
</Grid> </Grid>
<Grid item sx={{ ml: 3, mr: 3 }}> <Grid item sx={{ ml: 3, mr: 3 }}>
@@ -168,7 +168,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => {
alignItems: 'end' alignItems: 'end'
}} }}
> >
Save
<Typography variant="h5">Save</Typography>
</Button> </Button>
</Grid> </Grid>
</> </>
@@ -186,7 +186,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => {
}} }}
onClick={onEditClick} onClick={onEditClick}
> >
Edit
<Typography variant="h5">Edit</Typography>
</Button> </Button>
</Grid> </Grid>
</> </>
@@ -200,7 +200,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => {
: :
<Grid container spacing={1}> <Grid container spacing={1}>
<Grid item xs={12}> <Grid item xs={12}>
<Typography variant="h5" sx={{mb: 2, mr: 3, borderBottom: "1px solid black" }}>
<Typography variant="h4" sx={{mb: 2, mr: 3, borderBottom: "1px solid black" }}>
Organization Details Organization Details
</Typography> </Typography>
</Grid> </Grid>


+ 2
- 2
src/pages/OrganizationDetailPage/index.js 查看文件

@@ -73,7 +73,7 @@ const OrganizationDetailPage = () => {
isLoading ? isLoading ?
<LoadingComponent /> <LoadingComponent />
: :
<Grid container>
<Grid container sx={{backgroundColor:"backgroundColor.default"}}>
<Grid item xs={12}> <Grid item xs={12}>
<div style={BackgroundHead}> <div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
@@ -91,7 +91,7 @@ const OrganizationDetailPage = () => {
<Grid item xs={12} > <Grid item xs={12} >
<Grid container> <Grid container>
<Grid item xs={12} md={12} lg={12}> <Grid item xs={12} md={12} lg={12}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<Box xs={12} ml={0} mt={-1} mr={0} sx={{ p: 1, borderRadius: '10px' }}>
<InfoCard <InfoCard
userData={formData} userData={formData}
loadDataFun={loadData} loadDataFun={loadData}


+ 14
- 4
src/pages/OrganizationSearchPage/OrganizationSearchForm.js 查看文件

@@ -2,7 +2,8 @@
import { import {
Button, Button,
CardContent, CardContent,
Grid, TextField
Grid, TextField,
Typography
} from '@mui/material'; } from '@mui/material';
import MainCard from "../../components/MainCard"; import MainCard from "../../components/MainCard";
import {useForm} from "react-hook-form"; import {useForm} from "react-hook-form";
@@ -47,7 +48,7 @@ const OrganizationSearchForm = ({applySearch}) => {
{/*row 1*/} {/*row 1*/}
<CardContent sx={{ px: 2.5, pt: 3 }}> <CardContent sx={{ px: 2.5, pt: 3 }}>
<Grid item justifyContent="space-between" alignItems="center"> <Grid item justifyContent="space-between" alignItems="center">
Search Form
<Typography variant="h4">Search Form</Typography>
</Grid> </Grid>
</CardContent> </CardContent>


@@ -59,6 +60,9 @@ const OrganizationSearchForm = ({applySearch}) => {
{...register("brNo")} {...register("brNo")}
id='brNo' id='brNo'
label="BR No." label="BR No."
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -68,6 +72,9 @@ const OrganizationSearchForm = ({applySearch}) => {
{...register("enCompanyName")} {...register("enCompanyName")}
id="enCompanyName" id="enCompanyName"
label="Name (English)" label="Name (English)"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -77,6 +84,9 @@ const OrganizationSearchForm = ({applySearch}) => {
{...register("chCompanyName")} {...register("chCompanyName")}
id="chCompanyName" id="chCompanyName"
label="Name (Chinese)" label="Name (Chinese)"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -95,7 +105,7 @@ const OrganizationSearchForm = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Clear
<Typography variant="h5">Clear</Typography>
</Button> </Button>
</Grid> </Grid>


@@ -108,7 +118,7 @@ const OrganizationSearchForm = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Submit
<Typography variant="h5">Submit</Typography>
</Button> </Button>
</Grid> </Grid>
</Grid> </Grid>


+ 1
- 1
src/pages/OrganizationSearchPage/index.js 查看文件

@@ -66,7 +66,7 @@ const OrganizationSearchPage = () => {
!onReady ? !onReady ?
<LoadingComponent /> <LoadingComponent />
: :
<Grid container>
<Grid container sx={{backgroundColor:"backgroundColor.default"}}>
<Grid item xs={12}> <Grid item xs={12}>
<div style={BackgroundHead}> <div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">


+ 12
- 13
src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js 查看文件

@@ -159,7 +159,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
alignItems: 'end' alignItems: 'end'
}} }}
> >
Reset & Back
<Typography variant="h5">Reset & Back</Typography>
</Button> </Button>
</Grid> </Grid>


@@ -174,7 +174,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
alignItems: 'end' alignItems: 'end'
}} }}
> >
Save
<Typography variant="h5">Save</Typography>
</Button> </Button>
</Grid> </Grid>
</> </>
@@ -190,7 +190,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
}} }}
onClick={onEditClick} onClick={onEditClick}
> >
Edit
<Typography variant="h5">Edit</Typography>
</Button> </Button>
</Grid> </Grid>
</> </>
@@ -199,7 +199,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
</Grid> </Grid>
</Grid> </Grid>
{/*end top button*/} {/*end top button*/}
<Typography variant="h5" sx={{ mt: 3, ml: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
<Typography variant="h4" sx={{ mt: 3, ml: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
Individual User Details Individual User Details
</Typography> </Typography>
<Grid container spacing={1} sx={{ mt: 3, ml: 3, mb: 2, mr: 3}}> <Grid container spacing={1} sx={{ mt: 3, ml: 3, mb: 2, mr: 3}}>
@@ -299,10 +299,9 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
<Grid item lg={4}> <Grid item lg={4}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
Verified:
<Typography variant="h5">Verified:</Typography>
</Grid> </Grid>



{ {
currentUserData.verifiedBy || editMode ? currentUserData.verifiedBy || editMode ?
<Grid item xs={12} md={6} lg={6}> <Grid item xs={12} md={6} lg={6}>
@@ -331,7 +330,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
}} }}
onClick={onVerifiedClick} onClick={onVerifiedClick}
> >
Verify
<Typography variant="h5">Verify</Typography>
</Button> </Button>
</Grid> </Grid>
</> </>
@@ -343,7 +342,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
<Grid item lg={4}> <Grid item lg={4}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
ID No.:
<Typography variant="h5">ID No.:</Typography>
</Grid> </Grid>


<Grid item xs={12} md={6} lg={6}> <Grid item xs={12} md={6} lg={6}>
@@ -432,7 +431,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
<Grid item lg={4}> <Grid item lg={4}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
Status:
<Typography variant="h5">Status:</Typography>
</Grid> </Grid>


{ {
@@ -454,7 +453,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
})} })}
</Grid> </Grid>
{locked ? {locked ?
<Grid item lg={1}>
<Grid item lg={1} sx={{ml:1}}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
@@ -465,11 +464,11 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
}} }}
onClick={doUnlock} onClick={doUnlock}
> >
Active
<Typography variant="h5">Active</Typography>
</Button> </Button>
</Grid> </Grid>
: :
<Grid item lg={1}>
<Grid item lg={1} sx={{ml:1}}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
@@ -480,7 +479,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => {
}} }}
onClick={doLock} onClick={doLock}
> >
Lock
<Typography variant="h5">Lock</Typography>
</Button> </Button>
</Grid> </Grid>
} }


+ 14
- 12
src/pages/User/DetailsPage_Individual/index.js 查看文件

@@ -36,9 +36,10 @@ const UserMaintainPage_Individual = () => {
const [isLoading, setLoding] = React.useState(true); const [isLoading, setLoding] = React.useState(true);


const _sx = { const _sx = {
ml: 3,
ml: 6,
mr: 6,
mb: 3, mb: 3,
mr: 3,
mt: 3,
padding: "4 2 4 2", padding: "4 2 4 2",
boxShadow: 1, boxShadow: 1,
border: 1, border: 1,
@@ -101,7 +102,7 @@ const UserMaintainPage_Individual = () => {
isLoading ? isLoading ?
<LoadingComponent /> <LoadingComponent />
: :
<Grid container>
<Grid container sx={{ minHeight: '90vh', backgroundColor: 'backgroundColor.default' }}>
<Grid item xs={12}> <Grid item xs={12}>
<div style={BackgroundHead}> <div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
@@ -116,10 +117,10 @@ const UserMaintainPage_Individual = () => {
</Button> </Button>
</Grid> </Grid>
{/*col 1*/} {/*col 1*/}
<Grid item xs={12} >
<Grid item xs={12}>
<Grid container> <Grid container>
<Grid item xs={12} md={12} lg={12}> <Grid item xs={12} md={12} lg={12}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<Box xs={12} ml={0} mt={-1} mr={0} sx={{ p: 1, borderRadius: '10px' }}>
<UserInformationCard <UserInformationCard
formData={formData} formData={formData}
loadDataFun={loadData} loadDataFun={loadData}
@@ -127,18 +128,19 @@ const UserMaintainPage_Individual = () => {
</Box> </Box>
</Grid> </Grid>
<Grid item xs={12} md={12} lg={12}> <Grid item xs={12} md={12} lg={12}>
<MainCard elevation={0} border={false} content={false}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }} style={{ padding: 12 }}>
<Typography variant="h5" sx={{ mt: 3, ml: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
<Box xs={12} ml={0} mt={-3} mr={11.5} sx={{ p: 1, borderRadius: '10px' }}>
<MainCard elevation={0} border={false} content={false}>
<Typography variant="h4" sx={{ mt: 4, ml: 6, mb: 2, mr: 6, borderBottom: "1px solid black" }}>
Files Files
</Typography> </Typography>
<FileList sx={_sx}
<FileList
sx={_sx}
refId={params.id} refId={params.id}
refType={"identification"} refType={"identification"}
/> />
</Box>
</MainCard>
<br/>
</MainCard>
</Box>
<br />
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>


+ 23
- 22
src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js 查看文件

@@ -191,7 +191,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
alignItems: 'end' alignItems: 'end'
}} }}
> >
Reset & Back
<Typography variant="h5">Reset & Back</Typography>
</Button> </Button>
</Grid> </Grid>
<Grid item sx={{ ml: 3, mr: 3 }}> <Grid item sx={{ ml: 3, mr: 3 }}>
@@ -205,7 +205,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
alignItems: 'end' alignItems: 'end'
}} }}
> >
Save
<Typography variant="h5">Save</Typography>
</Button> </Button>
</Grid> </Grid>


@@ -223,7 +223,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
}} }}
onClick={onEditClick} onClick={onEditClick}
> >
Edit
<Typography variant="h5">Edit</Typography>
</Button> </Button>
</Grid> </Grid>
</> </>
@@ -234,7 +234,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
</Grid> </Grid>
{/*end top button*/} {/*end top button*/}
<div style={{ paddingLeft: 24, paddingRight: 24 }}> <div style={{ paddingLeft: 24, paddingRight: 24 }}>
<Typography variant="h5" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
<Typography variant="h4" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
Organization User Details Organization User Details
</Typography> </Typography>
<Grid container spacing={1}> <Grid container spacing={1}>
@@ -343,7 +343,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
<Grid item lg={4}> <Grid item lg={4}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
Verified:
<Typography variant="h5">Verified:</Typography>
</Grid> </Grid>


{ {
@@ -374,7 +374,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
}} }}
onClick={() => { onVerifiedClick() }} onClick={() => { onVerifiedClick() }}
> >
Verify
<Typography variant="h5">Verify</Typography>
</Button> </Button>
</Grid> </Grid>
</> </>
@@ -397,7 +397,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
<Grid item lg={4}> <Grid item lg={4}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
Status:
<Typography variant="h5">Status:</Typography>
</Grid> </Grid>
{ {
editMode ? editMode ?
@@ -420,7 +420,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
</Grid> </Grid>


{formik.values.locked ? {formik.values.locked ?
<Grid item xs={1} md={1} lg={1}>
<Grid item xs={1} md={1} lg={1} sx={{ ml: 1 }}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
@@ -431,22 +431,22 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
}} }}
onClick={doUnlock} onClick={doUnlock}
> >
Active
<Typography variant="h5">Active</Typography>
</Button> </Button>
</Grid> </Grid>
: :
<Grid item xs={1} md={1} lg={1}>
<Grid item xs={1} md={1} lg={1} sx={{ ml: 1 }}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
color="error" color="error"
sx={{ sx={{
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end'
alignItems: 'end',
}} }}
onClick={doLock} onClick={doLock}
> >
Lock
<Typography variant="h5">Lock</Typography>
</Button> </Button>
</Grid> </Grid>
} }
@@ -456,7 +456,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
</Grid> </Grid>
</Grid> </Grid>
</div> </div>
<br/>
<br />
<div style={{ paddingLeft: 24, paddingRight: 24 }}> <div style={{ paddingLeft: 24, paddingRight: 24 }}>
<Grid container spacing={1} > <Grid container spacing={1} >
<Grid item lg={12}> <Grid item lg={12}>
@@ -466,7 +466,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
<Button variant="contained" <Button variant="contained"
onClick={createOrgClick} onClick={createOrgClick}
> >
Create Organization
<Typography variant="h5">Create Organization</Typography>
</Button> </Button>
</Grid> </Grid>
: null : null
@@ -474,7 +474,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
</Grid> </Grid>
</Grid> </Grid>
<Grid item lg={12} > <Grid item lg={12} >
<Typography variant="h5" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
<Typography variant="h4" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
Organization Organization
</Typography> </Typography>
</Grid> </Grid>
@@ -556,28 +556,29 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
</Grid> </Grid>
</Grid> </Grid>
</div> </div>
<br />
</form> </form>
} }
<div> <div>
<Dialog open={isWarningPopUp} onClose={() => setIsWarningPopUp(false)} > <Dialog open={isWarningPopUp} onClose={() => setIsWarningPopUp(false)} >
<DialogTitle>Warning</DialogTitle>
<DialogTitle><Typography variant="h3">Warning</Typography></DialogTitle>
<DialogContent style={{ display: 'flex', }}> <DialogContent style={{ display: 'flex', }}>
<Typography variant="h3" style={{ padding: '16px' }}>{warningText}</Typography>
<Typography variant="h4" style={{ padding: '16px' }}>{warningText}</Typography>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={() => setIsWarningPopUp(false)}>Close</Button>
<Button onClick={() => setIsWarningPopUp(false)}><Typography variant="h5">Close</Typography></Button>
</DialogActions> </DialogActions>
</Dialog> </Dialog>
</div> </div>
<div> <div>
<Dialog open={isConfirmPopUp} onClose={() => setIsConfirmPopUp(false)} > <Dialog open={isConfirmPopUp} onClose={() => setIsConfirmPopUp(false)} >
<DialogTitle>Confirm</DialogTitle>
<DialogTitle><Typography variant="h3">Confirm</Typography></DialogTitle>
<DialogContent style={{ display: 'flex', }}> <DialogContent style={{ display: 'flex', }}>
<Typography variant="h3" style={{ padding: '16px' }}>{confirmText}</Typography>
<Typography variant="h4" style={{ padding: '16px' }}>{confirmText}</Typography>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={() => { setIsConfirmPopUp(false) }}>Close</Button>
<Button onClick={() => { confirmAction?.function(); }}>Confirm</Button>
<Button onClick={() => { setIsConfirmPopUp(false) }}><Typography variant="h5">Close</Typography></Button>
<Button onClick={() => { confirmAction?.function(); }}><Typography variant="h5">Confirm</Typography></Button>
</DialogActions> </DialogActions>
</Dialog> </Dialog>
</div> </div>


+ 7
- 7
src/pages/User/DetailsPage_Organization/index.js 查看文件

@@ -41,7 +41,8 @@ const UserMaintainPage_Organization = () => {
const _sx = { const _sx = {
ml: 3, ml: 3,
mb: 3, mb: 3,
mr: 3,
mt: 3,
mr: 6,
padding: "4 2 4 2", padding: "4 2 4 2",
boxShadow: 1, boxShadow: 1,
border: 1, border: 1,
@@ -128,7 +129,7 @@ const UserMaintainPage_Organization = () => {
isLoading ? isLoading ?
<LoadingComponent /> <LoadingComponent />
: :
<Grid container>
<Grid container sx={{ backgroundColor: "backgroundColor.default" }}>
<Grid item xs={12}> <Grid item xs={12}>
<div style={BackgroundHead}> <div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
@@ -146,19 +147,18 @@ const UserMaintainPage_Organization = () => {
<Grid item xs={12} > <Grid item xs={12} >
<Grid container> <Grid container>
<Grid item xs={12} md={12} lg={12}> <Grid item xs={12} md={12} lg={12}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<Box xs={12} ml={0} mt={-1} mr={0} sx={{ p: 1, borderRadius: '10px' }}>
<UserInformationCard <UserInformationCard
userData={userData} userData={userData}
loadDataFun={loadData} loadDataFun={loadData}
orgData={orgData} orgData={orgData}
/> />
<br/>
</Box> </Box>
</Grid> </Grid>
<Grid item xs={12} md={12} lg={12}> <Grid item xs={12} md={12} lg={12}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<Box xs={12} ml={0} mt={-3} mr={11.5} sx={{ p: 1, borderRadius: '10px' }}>
<MainCard elevation={0} border={false} content={false}> <MainCard elevation={0} border={false} content={false}>
<Typography variant="h5" sx={{ mt: 3, ml: 3, mb: 1 }}>
<Typography variant="h4" sx={{ ml: 3, mt: 3, mb: 2, mr: 6, borderBottom: "1px solid black" }}>
Files Files
</Typography> </Typography>
<FileList sx={_sx} <FileList sx={_sx}
@@ -167,7 +167,7 @@ const UserMaintainPage_Organization = () => {
/> />
</MainCard> </MainCard>
</Box> </Box>
<br/>
<br />
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>


+ 3
- 0
src/pages/User/SearchPage/UserTable.js 查看文件

@@ -9,6 +9,7 @@ import { useTheme } from '@mui/material/styles';
import Checkbox from '@mui/material/Checkbox'; import Checkbox from '@mui/material/Checkbox';
import * as UrlUtils from "../../../utils/ApiPathConst"; import * as UrlUtils from "../../../utils/ApiPathConst";
import * as HttpUtils from '../../../utils/HttpUtils'; import * as HttpUtils from '../../../utils/HttpUtils';
import { notifyLockSuccess, notifyUnlockSuccess } from 'utils/CommonFunction';


// ==============================|| EVENT TABLE ||============================== // // ==============================|| EVENT TABLE ||============================== //


@@ -42,6 +43,7 @@ export default function UserTable({recordList,setChangeLocked}) {
onSuccess: function(){ onSuccess: function(){
setRows(recordList); setRows(recordList);
setChangeLocked(true) setChangeLocked(true)
notifyLockSuccess()
} }
}); });
}; };
@@ -52,6 +54,7 @@ export default function UserTable({recordList,setChangeLocked}) {
onSuccess: function(){ onSuccess: function(){
setRows(recordList); setRows(recordList);
setChangeLocked(true) setChangeLocked(true)
notifyUnlockSuccess()
} }
}); });
}; };


+ 50
- 34
src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js 查看文件

@@ -3,16 +3,17 @@ import {
Button, Button,
CardContent, CardContent,
Grid, TextField, Grid, TextField,
Autocomplete
Autocomplete,
Typography
} from '@mui/material'; } from '@mui/material';
import MainCard from "../../../components/MainCard"; import MainCard from "../../../components/MainCard";
import {useForm} from "react-hook-form";
import { useState} from "react";
import { useForm } from "react-hook-form";
import { useState } from "react";
import * as React from "react"; import * as React from "react";
// ==============================|| DASHBOARD - DEFAULT ||============================== // // ==============================|| DASHBOARD - DEFAULT ||============================== //




const UserSearchForm_Individual = ({applySearch}) => {
const UserSearchForm_Individual = ({ applySearch }) => {


const [type, setType] = useState([]); const [type, setType] = useState([]);
const [accountFilter, setAccountFilter] = useState("Active"); const [accountFilter, setAccountFilter] = useState("Active");
@@ -22,7 +23,7 @@ const UserSearchForm_Individual = ({applySearch}) => {


let typeArray = []; let typeArray = [];


for(let i =0; i < type.length; i++){
for (let i = 0; i < type.length; i++) {
typeArray.push(type[i].label); typeArray.push(type[i].label);
} }


@@ -36,80 +37,95 @@ const UserSearchForm_Individual = ({applySearch}) => {
applySearch(temp); applySearch(temp);
}; };


function resetForm(){
function resetForm() {
setType([]); setType([]);
reset(); reset();
} }


return ( return (
<MainCard xs={12} md={12} lg={12} <MainCard xs={12} md={12} lg={12}
border={false}
content={false}>
border={false}
content={false}>


<form onSubmit={handleSubmit(onSubmit)}> <form onSubmit={handleSubmit(onSubmit)}>
{/*row 1*/} {/*row 1*/}
<CardContent sx={{ px: 2.5, pt: 3 }}> <CardContent sx={{ px: 2.5, pt: 3 }}>
<Grid item justifyContent="space-between" alignItems="center"> <Grid item justifyContent="space-between" alignItems="center">
Search Form
<Typography variant="h5">Search Form</Typography>
</Grid> </Grid>
</CardContent> </CardContent>


{/*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 }}>
<TextField <TextField
fullWidth fullWidth
{...register("userName")} {...register("userName")}
id='userName' id='userName'
label="Username" label="Username"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


<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 }}>
<TextField <TextField
fullWidth fullWidth
{...register("fullenName")} {...register("fullenName")}
id="fullenName" id="fullenName"
label="Full Name" label="Full Name"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


<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 }}>
<TextField <TextField
fullWidth fullWidth
{...register("email")} {...register("email")}
id="email" id="email"
label="Email" label="Email"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


<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 }}>
<TextField <TextField
fullWidth fullWidth
{...register("phone")} {...register("phone")}
id="phone" id="phone"
label="Phone" label="Phone"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


<Grid item xs={9} s={6} md={5} lg={3} sx={{ml:3, mr:3, mb:3}}>
<Autocomplete
{...register("accountFilter")}
disablePortal
id="accountFilter"
options={["Active","Locked","Not verified"]}
value={accountFilter}
onChange={(event, newValue) => {
if (newValue !== null){
setAccountFilter(newValue);
}
}}
renderInput={(params) => (
<TextField {...params}
label="Status"
/>
)}
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}>
<Autocomplete
{...register("accountFilter")}
disablePortal
id="accountFilter"
options={["Active", "Locked", "Not verified"]}
value={accountFilter}
onChange={(event, newValue) => {
if (newValue !== null) {
setAccountFilter(newValue);
}
}}
renderInput={(params) => (
<TextField {...params}
label="Status"
InputLabelProps={{
shrink: true
}}
/> />
)}
/>
</Grid> </Grid>
{/*<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}}>*/}
{/* <TextField*/} {/* <TextField*/}
@@ -126,7 +142,7 @@ const UserSearchForm_Individual = ({applySearch}) => {
{/*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}}>
<Grid item sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
@@ -135,11 +151,11 @@ const UserSearchForm_Individual = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Clear
<Typography variant="h5">Clear</Typography>
</Button> </Button>
</Grid> </Grid>


<Grid item sx={{ml:3, mr:3, mb:3, mt:3}}>
<Grid item sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
@@ -148,7 +164,7 @@ const UserSearchForm_Individual = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Submit
<Typography variant="h5">Submit</Typography>
</Button> </Button>
</Grid> </Grid>
</Grid> </Grid>


+ 31
- 31
src/pages/User/SearchPage_Individual/index.js 查看文件

@@ -3,10 +3,10 @@ import {
Grid, Typography, Stack Grid, Typography, Stack
} from '@mui/material'; } from '@mui/material';
import MainCard from "../../../components/MainCard"; import MainCard from "../../../components/MainCard";
import {useEffect, useState} from "react";
import { useEffect, useState } from "react";
//import axios from "axios"; //import axios from "axios";
//import {apiPath} from "../../auth/utils"; //import {apiPath} from "../../auth/utils";
import {GET_IND_USER_PATH} from "../../../utils/ApiPathConst";
import { GET_IND_USER_PATH } from "../../../utils/ApiPathConst";
import * as React from "react"; import * as React from "react";
import * as HttpUtils from "../../../utils/HttpUtils"; import * as HttpUtils from "../../../utils/HttpUtils";


@@ -24,7 +24,7 @@ const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`, backgroundImage: `url(${titleBackgroundImg})`,
width: '100%', width: '100%',
height: '100%', height: '100%',
backgroundSize:'contain',
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat', backgroundRepeat: 'no-repeat',
backgroundColor: '#0C489E', backgroundColor: '#0C489E',
backgroundPosition: 'right' backgroundPosition: 'right'
@@ -33,7 +33,7 @@ const BackgroundHead = {


const UserSearchPage_Individual = () => { const UserSearchPage_Individual = () => {


const [record,setRecord] = useState([]);
const [record, setRecord] = useState([]);
const [searchCriteria, setSearchCriteria] = useState({}); const [searchCriteria, setSearchCriteria] = useState({});
const [onReady, setOnReady] = useState(false); const [onReady, setOnReady] = useState(false);


@@ -49,11 +49,11 @@ const UserSearchPage_Individual = () => {
getUserList(); getUserList();
}, [searchCriteria]); }, [searchCriteria]);


function getUserList(){
function getUserList() {
HttpUtils.get({ HttpUtils.get({
url: GET_IND_USER_PATH, url: GET_IND_USER_PATH,
params: searchCriteria, params: searchCriteria,
onSuccess: function(responseData){
onSuccess: function (responseData) {
setRecord(responseData); setRecord(responseData);
} }
}); });
@@ -65,34 +65,34 @@ const UserSearchPage_Individual = () => {


return ( return (
!onReady ? !onReady ?
<LoadingComponent/>
<LoadingComponent />
: :
<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">View Individual User</Typography>
</Stack>
</div>
</Grid>
<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">
<Typography ml={15} color='#FFF' variant="h4">View Individual User</Typography>
</Stack>
</div>
</Grid>


{/*row 1*/}
<Grid item xs={12} md={12} lg={12}>
<SearchForm applySearch={applySearch}/>
</Grid>
{/*row 2*/}
<Grid item xs={12} md={12} lg={12}>
<MainCard elevation={0}
border={false}
content={false}
>
<EventTable
recordList={record}
/>
</MainCard>
</Grid>
{/*row 1*/}
<Grid item xs={12} md={12} lg={12}>
<SearchForm applySearch={applySearch} />
</Grid>
{/*row 2*/}
<Grid item xs={12} md={12} lg={12}>
<MainCard elevation={0}
border={false}
content={false}
>
<EventTable
recordList={record}
/>
</MainCard>
</Grid>


</Grid>
</Grid>


); );
}; };


+ 27
- 5
src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js 查看文件

@@ -2,7 +2,8 @@
import { import {
Button, Button,
CardContent, Autocomplete, CardContent, Autocomplete,
Grid, TextField
Grid, TextField,
Typography
} from '@mui/material'; } from '@mui/material';
import MainCard from "../../../components/MainCard"; import MainCard from "../../../components/MainCard";
import {useForm} from "react-hook-form"; import {useForm} from "react-hook-form";
@@ -54,7 +55,7 @@ const UserSearchForm_Organization = ({applySearch}) => {
{/*row 1*/} {/*row 1*/}
<CardContent sx={{ px: 2.5, pt: 3 }}> <CardContent sx={{ px: 2.5, pt: 3 }}>
<Grid item justifyContent="space-between" alignItems="center"> <Grid item justifyContent="space-between" alignItems="center">
Search Form
<Typography variant="h5">Search Form</Typography>
</Grid> </Grid>
</CardContent> </CardContent>


@@ -67,6 +68,9 @@ const UserSearchForm_Organization = ({applySearch}) => {
{...register("orgName")} {...register("orgName")}
id="orgName" id="orgName"
label="Org Name" label="Org Name"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -76,6 +80,9 @@ const UserSearchForm_Organization = ({applySearch}) => {
{...register("brNoStr")} {...register("brNoStr")}
id="brNoStr" id="brNoStr"
label="BR No." label="BR No."
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -85,6 +92,9 @@ const UserSearchForm_Organization = ({applySearch}) => {
{...register("userName")} {...register("userName")}
id='userName' id='userName'
label="Username" label="Username"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -94,6 +104,9 @@ const UserSearchForm_Organization = ({applySearch}) => {
{...register("contactPerson")} {...register("contactPerson")}
id="contactPerson" id="contactPerson"
label="Name" label="Name"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -103,6 +116,9 @@ const UserSearchForm_Organization = ({applySearch}) => {
{...register("email")} {...register("email")}
id="email" id="email"
label="Email" label="Email"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -112,6 +128,9 @@ const UserSearchForm_Organization = ({applySearch}) => {
{...register("phone")} {...register("phone")}
id="phone" id="phone"
label="Phone" label="Phone"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


@@ -129,7 +148,10 @@ const UserSearchForm_Organization = ({applySearch}) => {
}} }}
renderInput={(params) => ( renderInput={(params) => (
<TextField {...params} <TextField {...params}
label="Status"
label="Status"
InputLabelProps={{
shrink: true
}}
/> />
)} )}
/> />
@@ -158,7 +180,7 @@ const UserSearchForm_Organization = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Clear
<Typography variant="h5">Clear</Typography>
</Button> </Button>
</Grid> </Grid>


@@ -171,7 +193,7 @@ const UserSearchForm_Organization = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Submit
<Typography variant="h5">Submit</Typography>
</Button> </Button>
</Grid> </Grid>
</Grid> </Grid>


+ 1
- 2
src/pages/User/SearchPage_Organization/index.js 查看文件

@@ -68,7 +68,7 @@ const UserSearchPage_Organization = () => {
!onReady ? !onReady ?
<LoadingComponent /> <LoadingComponent />
: :
<Grid container>
<Grid container sx={{backgroundColor:"backgroundColor.default"}}>
<Grid item xs={12}> <Grid item xs={12}>
<div style={BackgroundHead}> <div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
@@ -91,7 +91,6 @@ const UserSearchPage_Organization = () => {
/> />
</MainCard> </MainCard>
</Grid> </Grid>

</Grid> </Grid>


); );


+ 1
- 1
src/pages/pnspsUserGroupDetailPage/GroupAuthCard.js 查看文件

@@ -54,7 +54,7 @@ const GroupAuthCard = ({isCollectData, updateUserAuthList,userGroupData,isNewRec
border={false} border={false}
content={false} content={false}
> >
<Typography variant="h5" sx={{ mt: 3, ml: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
<Typography variant="h4" sx={{ mt: 3, ml: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
User Authority User Authority
</Typography> </Typography>




+ 4
- 4
src/pages/pnspsUserGroupDetailPage/UserAddCard.js 查看文件

@@ -101,14 +101,14 @@ const UserAddCard = ({ isCollectData, updateGroupMember, userGroupData, isNewRec
border={false} border={false}
content={false} content={false}
> >
<Typography variant="h5" sx={{ mt: 3, ml: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
<Typography variant="h4" sx={{ mt: 3, ml: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
User(s) User(s)
</Typography> </Typography>
<Grid item xs={12} s={12} md={12} lg={12} sx={{ ml: 3, mr: 3, mt: 2 }}> <Grid item xs={12} s={12} md={12} lg={12} sx={{ ml: 3, mr: 3, mt: 2 }}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={3} s={3} md={2} lg={2} <Grid item xs={3} s={3} md={2} lg={2}
sx={{ display: 'flex', alignItems: 'center' }}> sx={{ display: 'flex', alignItems: 'center' }}>
User:
<Typography variant="h5">User:</Typography>
</Grid> </Grid>
<Grid item xs={6} s={5} md={5} lg={5}> <Grid item xs={6} s={5} md={5} lg={5}>
<Autocomplete <Autocomplete
@@ -134,13 +134,13 @@ const UserAddCard = ({ isCollectData, updateGroupMember, userGroupData, isNewRec
}} }}
onClick={updateUserList} onClick={updateUserList}
> >
Add
<Typography variant="h5">Add</Typography>
</Button> </Button>
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>
<Grid container> <Grid container>
<Grid item xs={12} sx={{mt:3}}>
<Grid item xs={12} sx={{mt:2}}>
<UserAddTable <UserAddTable
setGroupUserData={setGroupUserData} setGroupUserData={setGroupUserData}
setDeletedList={setDeletedList} setDeletedList={setDeletedList}


+ 6
- 6
src/pages/pnspsUserGroupDetailPage/UserGroupInfoCard.js 查看文件

@@ -52,17 +52,17 @@ const UserGroupInfoCard = ({ isCollectData, updateGroupObject, userGroupData })
border={false} border={false}
content={false} content={false}
> >
<Typography variant="h5" sx={{ mt: 3, ml: 3, mr: 3, borderBottom: "1px solid black" }}>
<Typography variant="h4" sx={{ mt: 3, ml: 3, mr: 3, borderBottom: "1px solid black" }}>
Information Information
</Typography> </Typography>


<form> <form>
<Grid container> <Grid container>
<Grid item xs={12} s={12} md={12} lg={12} sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}>
<Grid item xs={12} s={12} md={12} lg={12} sx={{ ml: 3, mr: 3, mb: 3, mt: 2 }}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={4} s={4} md={4} lg={4} <Grid item xs={4} s={4} md={4} lg={4}
sx={{ ml: 3, mr: 3, display: 'flex', alignItems: 'center' }}>
User Group Name:
sx={{ mr: 3, display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">User Group Name:</Typography>
</Grid> </Grid>


<Grid item xs={7} s={7} md={7} lg={6}> <Grid item xs={7} s={7} md={7} lg={6}>
@@ -82,8 +82,8 @@ const UserGroupInfoCard = ({ isCollectData, updateGroupObject, userGroupData })
<Grid item xs={12} s={12} md={12} lg={12} sx={{ ml: 3, mr: 3, mb: 3 }}> <Grid item xs={12} s={12} md={12} lg={12} sx={{ ml: 3, mr: 3, mb: 3 }}>
<Grid container alignItems={"center"}> <Grid container alignItems={"center"}>
<Grid item xs={4} s={4} md={4} lg={4} <Grid item xs={4} s={4} md={4} lg={4}
sx={{ ml: 3, mr: 3, mb: 3, display: 'flex', alignItems: 'center' }}>
User Group Description:
sx={{ mr: 3, display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">User Group Description:</Typography>
</Grid> </Grid>


<Grid item xs={7} s={7} md={7} lg={6}> <Grid item xs={7} s={7} md={7} lg={6}>


+ 6
- 6
src/pages/pnspsUserGroupDetailPage/index.js 查看文件

@@ -169,7 +169,7 @@ const UserMaintainPage = () => {
!onReady ? !onReady ?
<LoadingComponent /> <LoadingComponent />
: :
<Grid container>
<Grid container sx={{ backgroundColor: "backgroundColor.default" }}>
<Grid item xs={12}> <Grid item xs={12}>
<div style={BackgroundHead}> <div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
@@ -187,7 +187,7 @@ const UserMaintainPage = () => {
<Grid item xs={12} md={5} lg={5}> <Grid item xs={12} md={5} lg={5}>
<Grid container> <Grid container>
<Grid item xs={12} md={12} lg={12}> <Grid item xs={12} md={12} lg={12}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<Box xs={12} ml={0} mt={-1} mr={0} sx={{ p: 1, borderRadius: '10px' }}>
<UserGroupInfoCard <UserGroupInfoCard
updateGroupObject={updateGroupObject} updateGroupObject={updateGroupObject}
userGroupData={userGroupData} userGroupData={userGroupData}
@@ -198,7 +198,7 @@ const UserMaintainPage = () => {
</Grid> </Grid>


<Grid item xs={12} md={12} lg={12} sx={{ mt: 3 }}> <Grid item xs={12} md={12} lg={12} sx={{ mt: 3 }}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<Box xs={12} ml={0} mt={-5} mr={0} sx={{ p: 1, borderRadius: '10px' }}>
<UserAddCard <UserAddCard
updateGroupMember={updateGroupMember} updateGroupMember={updateGroupMember}
userGroupData={userGroupData} userGroupData={userGroupData}
@@ -211,7 +211,7 @@ const UserMaintainPage = () => {
</Grid> </Grid>
{/*col 2*/} {/*col 2*/}
<Grid item xs={12} md={7} lg={7}> <Grid item xs={12} md={7} lg={7}>
<Box xs={12} ml={4} mt={3} mr={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<Box xs={12} ml={-2} mt={-1} mr={0} sx={{ p: 1, borderRadius: '10px' }}>
<GroupAuthCard <GroupAuthCard
updateUserAuthList={updateUserAuthList} updateUserAuthList={updateUserAuthList}
userGroupData={userGroupData} userGroupData={userGroupData}
@@ -235,7 +235,7 @@ const UserMaintainPage = () => {
disabled={isNewRecord} disabled={isNewRecord}
onClick={handleDeleteClick} onClick={handleDeleteClick}
> >
Delete User Group
<Typography variant="h5">Delete User Group</Typography>
</Button> </Button>
<GeneralConfirmWindow <GeneralConfirmWindow
isWindowOpen={isWindowOpen} isWindowOpen={isWindowOpen}
@@ -257,7 +257,7 @@ const UserMaintainPage = () => {
}} }}
onClick={submitData} onClick={submitData}
> >
Save
<Typography variant="h5">Save</Typography>
</Button> </Button>
</Grid> </Grid>
</Grid> </Grid>


+ 30
- 20
src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js 查看文件

@@ -3,16 +3,17 @@ import {
Button, Button,
CardContent, CardContent,
Grid, TextField, Grid, TextField,
Typography
} from '@mui/material'; } from '@mui/material';
import MainCard from "../../components/MainCard"; import MainCard from "../../components/MainCard";
import {useForm} from "react-hook-form";
import { useForm } from "react-hook-form";
import * as React from "react"; import * as React from "react";
import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'; import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline';
import {useNavigate} from "react-router";
import { useNavigate } from "react-router";


// ==============================|| DASHBOARD - DEFAULT ||============================== // // ==============================|| DASHBOARD - DEFAULT ||============================== //


const UserGroupSearchForm = ({applySearch}) => {
const UserGroupSearchForm = ({ applySearch }) => {
const navigate = useNavigate(); const navigate = useNavigate();


const { reset, register, handleSubmit } = useForm() const { reset, register, handleSubmit } = useForm()
@@ -20,45 +21,52 @@ const UserGroupSearchForm = ({applySearch}) => {
applySearch(data); applySearch(data);
}; };


function resetForm(){
function resetForm() {
reset(); reset();
} }


const handleNewGroupClick = (id) => { const handleNewGroupClick = (id) => {
// console.log(id) // console.log(id)
navigate('/userGroup/'+ id);
navigate('/userGroup/' + id);
}; };


return ( return (
<MainCard xs={12} md={12} lg={12} <MainCard xs={12} md={12} lg={12}
border={false}
content={false}>
border={false}
content={false}
>


<form onSubmit={handleSubmit(onSubmit)}> <form onSubmit={handleSubmit(onSubmit)}>
{/*row 1*/} {/*row 1*/}
<CardContent sx={{ px: 2.5, pt: 3 }}> <CardContent sx={{ px: 2.5, pt: 3 }}>
<Grid item justifyContent="space-between" alignItems="center"> <Grid item justifyContent="space-between" alignItems="center">
Search Form
<Typography variant="h4">Search Form</Typography>
</Grid> </Grid>
</CardContent> </CardContent>


{/*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 }}>
<TextField <TextField
fullWidth fullWidth
{...register("name")} {...register("name")}
id='userGroupName' id='userGroupName'
label="User Group Name" label="User Group Name"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>


<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 }}>
<TextField <TextField
fullWidth fullWidth
{...register("description")} {...register("description")}
id="userGroupDescription" id="userGroupDescription"
label="User Group Description" label="User Group Description"
InputLabelProps={{
shrink: true
}}
/> />
</Grid> </Grid>
</Grid> </Grid>
@@ -66,23 +74,25 @@ const UserGroupSearchForm = ({applySearch}) => {
{/*last row*/} {/*last row*/}
<Grid container direction="row" <Grid container direction="row"
justifyContent="space-between" justifyContent="space-between"
alignItems="center">
<Grid item xs={3} md={3} sx={{ ml: 3, mr: 1, mb: 3, mt: 3 }}>
alignItems="center"
sx={{ mt: 3 }}
>
<Grid item xs={3} md={3} sx={{ ml: 3, mr: 1 }}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
onClick={handleNewGroupClick} onClick={handleNewGroupClick}
sx={{ sx={{
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end'
alignItems: 'end',
}}> }}>
<AddCircleOutlineIcon/>
New Group
<AddCircleOutlineIcon sx={{ mr: 1, mb: 0.5 }} />
<Typography variant="h5">New Group</Typography>
</Button> </Button>
</Grid> </Grid>
<Grid item xs={8} md={8} sx={{ml:3, mr:3, mb:3, mt:3}}>
<Grid item xs={8} md={8} sx={{ ml: 3, mr: 3 }}>
<Grid container maxWidth justifyContent="flex-end"> <Grid container maxWidth justifyContent="flex-end">
<Grid item sx={{ml:3, mr:3, mb:3, mt:3}}>
<Grid item sx={{ ml: 3, mr: 3 }}>
<Button <Button
size="large" size="large"
variant="contained" variant="contained"
@@ -91,11 +101,11 @@ const UserGroupSearchForm = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Clear
<Typography variant="h5">Clear</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" size="large"
variant="contained" variant="contained"
@@ -104,7 +114,7 @@ const UserGroupSearchForm = ({applySearch}) => {
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end' alignItems: 'end'
}}> }}>
Search
<Typography variant="h5">Search</Typography>
</Button> </Button>
</Grid> </Grid>
</Grid> </Grid>


+ 1
- 1
src/pages/pnspsUserGroupSearchPage/index.js 查看文件

@@ -75,7 +75,7 @@ const UserGroupSearchPanel = () => {
!onReady ? !onReady ?
<LoadingComponent /> <LoadingComponent />
: :
<Grid container sx={{ minHeight: '90vh'}} direction="column">
<Grid container sx={{ minHeight: '90vh', backgroundColor: "backgroundColor.default"}} direction="column">
<Grid item xs={12}> <Grid item xs={12}>
<div style={BackgroundHead}> <div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">


+ 8
- 1
src/themes/overrides/Checkbox.js 查看文件

@@ -1,11 +1,18 @@
// ==============================|| OVERRIDES - CHECKBOX ||============================== // // ==============================|| OVERRIDES - CHECKBOX ||============================== //


export default function Checkbox(theme) { export default function Checkbox(theme) {
const checkboxSize = "2rem"

return { return {
MuiCheckbox: { MuiCheckbox: {
styleOverrides: { styleOverrides: {
root: { root: {
color: theme.palette.secondary[300]
color: theme.palette.secondary[300],
svg: {
width: checkboxSize,
height: checkboxSize,
}
} }
} }
} }


+ 9
- 1
src/themes/overrides/DataGrid.js 查看文件

@@ -6,6 +6,7 @@ export default function DataGrid() {
const cellHeaderFontSize = "1.1rem" const cellHeaderFontSize = "1.1rem"
const selectedNumberFontSize = "1.2rem" const selectedNumberFontSize = "1.2rem"
const actionIconSize = "2rem" const actionIconSize = "2rem"
const actionCellIconSize = "1.7rem"


const cellFontWeight = 600 const cellFontWeight = 600
const cellFooterFontWeight = 600 const cellFooterFontWeight = 600
@@ -16,7 +17,6 @@ export default function DataGrid() {
MuiDataGrid: { MuiDataGrid: {
styleOverrides: { styleOverrides: {
root: { root: {
// fontSize: "3rem"
'& .MuiDataGrid-cell': { '& .MuiDataGrid-cell': {
fontSize: cellFontSize, fontSize: cellFontSize,
fontWeight: cellFontWeight fontWeight: cellFontWeight
@@ -50,6 +50,14 @@ export default function DataGrid() {
height: actionIconSize, height: actionIconSize,
} }
}, },
'& .MuiDataGrid-actionsCell': {
fontSize: cellFooterFontSize,
fontWeight: cellFooterFontWeight,
svg: {
width: actionCellIconSize,
height: actionCellIconSize,
},
},
'& .MuiDataGrid-rowCount': { '& .MuiDataGrid-rowCount': {
fontSize: cellFooterFontSize, fontSize: cellFooterFontSize,
fontWeight: cellFooterFontWeight fontWeight: cellFooterFontWeight


+ 19
- 0
src/themes/overrides/FormControlLabel.js 查看文件

@@ -0,0 +1,19 @@
// ==============================|| OVERRIDES - FORMCONTROLLABEL ||============================== //

export default function FormControlLabel() {
const fontSize = "1.275rem"
const fontWeight = 600

return {
MuiFormControlLabel: {
styleOverrides: {
root: {
"& .MuiFormControlLabel-label": {
fontSize: fontSize,
fontWeight: fontWeight,
},
},
}
}
};
}

+ 2
- 0
src/themes/overrides/index.js 查看文件

@@ -19,6 +19,7 @@ import Tabs from './Tabs';
import Typography from './Typography'; import Typography from './Typography';
import Textfield from './Textfield'; import Textfield from './Textfield';
import DataGrid from './DataGrid'; import DataGrid from './DataGrid';
import FormControlLabel from './FormControlLabel';


// ==============================|| OVERRIDES - MAIN ||============================== // // ==============================|| OVERRIDES - MAIN ||============================== //


@@ -30,6 +31,7 @@ export default function ComponentsOverrides(theme) {
Checkbox(theme), Checkbox(theme),
Chip(theme), Chip(theme),
DataGrid(), DataGrid(),
FormControlLabel(),
IconButton(theme), IconButton(theme),
InputLabel(theme), InputLabel(theme),
LinearProgress(), LinearProgress(),


+ 12
- 0
src/utils/CommonFunction.js 查看文件

@@ -113,6 +113,18 @@ export const notifyLockSuccess = () => {
theme: "light", theme: "light",
})}; })};


export const notifyUnlockSuccess = () => {
toast.success('Unlock success!', {
position: "bottom-right",
autoClose: 5000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
progress: undefined,
theme: "light",
})};

export const notifyActiveSuccess = () => { export const notifyActiveSuccess = () => {
toast.success('Active success!', { toast.success('Active success!', {
position: "bottom-right", position: "bottom-right",


+ 55
- 53
src/utils/FieldUtils.js 查看文件

@@ -1,6 +1,6 @@


import { import {
Grid, TextField, Stack
Grid, TextField, Stack, Typography
} from '@mui/material'; } from '@mui/material';


import Combo from "./Combo"; import Combo from "./Combo";
@@ -13,7 +13,7 @@ export const notNullFieldLabel = (label) => {
export const getDateField = ({ label, valueName, form, disabled }) => { export const getDateField = ({ label, valueName, form, disabled }) => {
return <Grid container alignItems={"center"}> return <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
{label}
<Typography variant="h5">{label}</Typography>
</Grid> </Grid>
<Grid item xs={12} md={6} lg={6}> <Grid item xs={12} md={6} lg={6}>
{initField({ {initField({
@@ -30,7 +30,7 @@ export const getTextField = ({ label, valueName, form, disabled }) => {
return <Grid container alignItems={"center"}> return <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} <Grid item xs={12} md={3} lg={3}
sx={{ display: 'flex', alignItems: 'center' }}> sx={{ display: 'flex', alignItems: 'center' }}>
{label}
<Typography variant="h5">{label}</Typography>
</Grid> </Grid>
<Grid item xs={12} md={6} lg={6}> <Grid item xs={12} md={6} lg={6}>
{initField({ {initField({
@@ -47,7 +47,7 @@ export const getTextArea = ({ label, valueName, form, disabled, inputProps, ...p
return <Grid container alignItems={"center"}> return <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} <Grid item xs={12} md={3} lg={3}
sx={{ display: 'flex', alignItems: 'center' }}> sx={{ display: 'flex', alignItems: 'center' }}>
{label}
<Typography variant="h5">{label}</Typography>
</Grid> </Grid>
<Grid item xs={12} md={6} lg={6}> <Grid item xs={12} md={6} lg={6}>
{initField({ {initField({
@@ -79,7 +79,7 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => {
return <Grid container alignItems={"center"}> return <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} <Grid item xs={12} md={3} lg={3}
sx={{ display: 'flex', alignItems: 'center' }}> sx={{ display: 'flex', alignItems: 'center' }}>
{label}
<Typography variant="h5">{label}</Typography>
</Grid> </Grid>
<Grid item xs={12} md={6} lg={6}> <Grid item xs={12} md={6} lg={6}>
<Stack direction="row"> <Stack direction="row">
@@ -88,7 +88,7 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => {
valueName: valueName.code, valueName: valueName.code,
form: form, form: form,
disabled: disabled, disabled: disabled,
width: '25%'
width: '35%'
})} })}
{initField({ {initField({
type: "tel", type: "tel",
@@ -103,59 +103,61 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => {




export const getAddressField = ({ label, valueName, form, disabled }) => { export const getAddressField = ({ label, valueName, form, disabled }) => {
return <Grid container alignItems={"top"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'top' }}>
<Grid item lg={12} sx={{ alignItems: 'center' }}>{label}</Grid>
return <Grid container alignItems={"top"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'top' }}>
<Grid item lg={12} sx={{ alignItems: 'center' }}>
<Typography variant="h5">{label}</Typography>
</Grid> </Grid>
<Grid item xs={12} md={6} lg={6}>
<Grid item lg={12}>
{initField({
type: "text",
valueName: valueName[0],
form: form,
disabled: disabled
})}
</Grid>
<Grid item lg={12}>
{initField({
type: "text",
valueName: valueName[1],
form: form,
disabled: disabled
})}
</Grid>
<Grid item lg={12}>
{initField({
type: "text",
valueName: valueName[2],
form: form,
disabled: disabled
})}
</Grid>
</Grid>
<Grid item xs={12} md={6} lg={6}>
<Grid item lg={12}>
{initField({
type: "text",
valueName: valueName[0],
form: form,
disabled: disabled
})}
</Grid>
<Grid item lg={12}>
{initField({
type: "text",
valueName: valueName[1],
form: form,
disabled: disabled
})}
</Grid>
<Grid item lg={12}>
{initField({
type: "text",
valueName: valueName[2],
form: form,
disabled: disabled
})}
</Grid> </Grid>
</Grid>;
</Grid>
</Grid>;
} }


export const getComboField = ({ label, dataList, valueName, form, disabled, getOptionLabel, onInputChange, onChange, filterOptions, ...props }) => { export const getComboField = ({ label, dataList, valueName, form, disabled, getOptionLabel, onInputChange, onChange, filterOptions, ...props }) => {
return <Grid container alignItems={"center"}> return <Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
{label}
</Grid>
<Grid item xs={12} md={6} lg={6}>
<Combo
valueName={valueName}
disabled={disabled}
dataList={dataList}
form={form}
filterOptions={filterOptions}
getOptionLabel={getOptionLabel}
onInputChange={onInputChange}
onChange={onChange}
{...props}
/>
</Grid>
</Grid>;
<Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">{label}</Typography>
</Grid>
<Grid item xs={12} md={6} lg={6}>
<Combo
valueName={valueName}
disabled={disabled}
dataList={dataList}
form={form}
filterOptions={filterOptions}
getOptionLabel={getOptionLabel}
onInputChange={onInputChange}
onChange={onChange}
{...props}
/>
</Grid>
</Grid>;
} }


export const initField = ({ type, valueName, form, disabled, multiline, placeholder, inputProps, width, ...props }) => { export const initField = ({ type, valueName, form, disabled, multiline, placeholder, inputProps, width, ...props }) => {


正在加载...
取消
保存