Browse Source

Update UI

master
cyril.tsui 1 year ago
parent
commit
3e99e5cc1b
4 changed files with 62 additions and 39 deletions
  1. +6
    -3
      src/pages/Proof/Create_FromApp/ApplicationDetails.js
  2. +4
    -1
      src/pages/Proof/Create_FromApp/GazetteDetails.js
  3. +3
    -1
      src/pages/Proof/Create_FromApp/ProofForm.js
  4. +49
    -34
      src/pages/Proof/Create_FromApp/index.js

+ 6
- 3
src/pages/Proof/Create_FromApp/ApplicationDetails.js View File

@@ -5,6 +5,7 @@ import {
Stack, Stack,
TextField, TextField,
FormLabel, FormLabel,
Typography
} from '@mui/material'; } from '@mui/material';
import MainCard from "components/MainCard"; import MainCard from "components/MainCard";
import * as React from "react"; import * as React from "react";
@@ -12,12 +13,12 @@ import { useFormik } from 'formik';
// ==============================|| DASHBOARD - DEFAULT ||============================== // // ==============================|| DASHBOARD - DEFAULT ||============================== //




const SearchPublicNoticeForm = ({formData}) => {
const SearchPublicNoticeForm = ({ formData }) => {


const [data, setData] = React.useState({}); const [data, setData] = React.useState({});


React.useEffect(() => { React.useEffect(() => {
if(formData)
if (formData)
setData(formData); setData(formData);
}, [formData]); }, [formData]);


@@ -58,7 +59,9 @@ const SearchPublicNoticeForm = ({formData}) => {
{/*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">
Application Details
<Typography variant="h5" sx={{ mb: 2, borderBottom: "1px solid black" }}>
Application Details
</Typography>
</Grid> </Grid>
</CardContent> </CardContent>




+ 4
- 1
src/pages/Proof/Create_FromApp/GazetteDetails.js View File

@@ -4,6 +4,7 @@ import {
CardContent, CardContent,
FormLabel, FormLabel,
TextField, TextField,
Typography
} from '@mui/material'; } from '@mui/material';
import MainCard from "components/MainCard"; import MainCard from "components/MainCard";
import * as React from "react"; import * as React from "react";
@@ -60,7 +61,9 @@ const GazetteDetails = ({ formData }) => {
{/*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">
Gazette Details
<Typography variant="h5" sx={{ mb: 2, borderBottom: "1px solid black" }}>
Gazette Details
</Typography>
</Grid> </Grid>
</CardContent> </CardContent>




+ 3
- 1
src/pages/Proof/Create_FromApp/ProofForm.js View File

@@ -162,7 +162,9 @@ const FormPanel = ({ formData }) => {
{/*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">
Proof
<Typography variant="h5" sx={{ mb: 2, borderBottom: "1px solid black" }}>
Proof
</Typography>
</Grid> </Grid>
</CardContent> </CardContent>




+ 49
- 34
src/pages/Proof/Create_FromApp/index.js View File

@@ -1,6 +1,6 @@
// material-ui // material-ui
import { import {
Grid,
Grid, Box
} from '@mui/material'; } from '@mui/material';
import MainCard from "components/MainCard"; import MainCard from "components/MainCard";
import * as UrlUtils from "utils/ApiPathConst"; import * as UrlUtils from "utils/ApiPathConst";
@@ -44,7 +44,7 @@ const Index = () => {
responseData.data["faxNumber"] = JSON.parse(responseData.data.contactFaxNo).faxNumber; responseData.data["faxNumber"] = JSON.parse(responseData.data.contactFaxNo).faxNumber;
responseData.data["fax_countryCode"] = JSON.parse(responseData.data.contactFaxNo).countryCode; responseData.data["fax_countryCode"] = JSON.parse(responseData.data.contactFaxNo).countryCode;


responseData.data["issueNoStr"] = responseData.data.issueVolume+"/"+responseData.data.issueYear+" No. "+responseData.data.issueNo
responseData.data["issueNoStr"] = responseData.data.issueVolume + "/" + responseData.data.issueYear + " No. " + responseData.data.issueNo
responseData.data["issueDate"] = DateUtils.dateStr(responseData.data.issueDate); responseData.data["issueDate"] = DateUtils.dateStr(responseData.data.issueDate);


responseData.data["groupType"] = responseData.data.groupNo.charAt(0); responseData.data["groupType"] = responseData.data.groupNo.charAt(0);
@@ -58,44 +58,59 @@ const Index = () => {
!onReady ? !onReady ?
<LoadingComponent /> <LoadingComponent />
: :

<Grid container sx={{ minHeight: '85vh', backgroundColor: '#eee' }} direction="column" spacing={1} > <Grid container sx={{ minHeight: '85vh', backgroundColor: '#eee' }} direction="column" spacing={1} >
{/*row 1*/}
<Grid item xs={12} md={12} lg={12}>
<Grid container direction="row" justify="flex-start" alignItems="stretch" spacing={1}>
<Grid item xs={12} md={12} lg={8}>
<ApplicationDetails
formData={record}
style={{
display: "flex",
height: "100%",
flex: 1
}}
/>
<MainCard
elevation={0}
border={false}
content={false}>
{/*row 1*/}
<Grid item xs={12} md={12} lg={12}>
<Grid container direction="row" justify="flex-start" alignItems="stretch" spacing={1}>
<Grid item xs={12} md={12} lg={8}>
<Box xs={12} ml={4} mt={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<ApplicationDetails
formData={record}
style={{
display: "flex",
height: "100%",
flex: 1
}}
/>
</Box>
</Grid>
<Grid item xs={12} md={12} lg={4} >
<Box xs={12} ml={4} mt={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>
<GazetteDetails
formData={record}
style={{
display: "flex",
height: "100%",
flex: 1
}}
/>
</Box>
</Grid>
</Grid> </Grid>
<Grid item xs={12} md={12} lg={4} >
<GazetteDetails
</Grid>
{/*row 2*/}
<Grid item xs={12} md={12} lg={12}>
<MainCard elevation={0}
border={false}
content={false}
>
<Box xs={12} ml={4} mt={3} sx={{ p: 1, border: '3px groove grey', borderRadius: '10px' }}>

<ProofForm
formData={record} formData={record}
style={{
display: "flex",
height: "100%",
flex: 1
}}
/> />
</Grid>
</Box>
<br/>
</MainCard>
</Grid> </Grid>
</Grid>
{/*row 2*/}
<Grid item xs={12} md={12} lg={12}>
<MainCard elevation={0}
border={false}
content={false}
>
<ProofForm
formData={record}
/>
</MainCard>
</Grid>
</MainCard>
</Grid> </Grid>

); );
}; };




Loading…
Cancel
Save