From ec423572aaf8ecf80a409fd9a03d73b5d31e444f Mon Sep 17 00:00:00 2001 From: Blaster4385 Date: Sat, 13 Aug 2022 21:40:17 +0530 Subject: Implemented update UI --- client/src/App.js | 179 +-------------- .../src/components/BiometricCard/BiometricCard.jsx | 20 ++ .../BiometricCard/BiometricCard.module.css | 26 +++ client/src/components/EditButton/EditButton.jsx | 19 ++ .../components/EditButton/EditButton.module.css | 16 ++ client/src/components/Gender/Gender.jsx | 60 +++++ client/src/components/Gender/Gender.module.css | 3 + client/src/components/LabelCard/LabelCard.jsx | 3 +- .../src/components/SubmitButton/SubmitButton.jsx | 4 +- client/src/components/UpdateInput/UpdateInput.jsx | 42 ++++ .../components/UpdateInput/UpdateInput.module.css | 25 +++ client/src/pages/Enrollment/Enrollment.jsx | 181 ++++++++++++++- client/src/pages/Home/Home.jsx | 5 +- client/src/pages/Update/Address/Address.jsx | 247 +++++++++++++++++++++ client/src/pages/Update/Address/Address.module.css | 33 +++ client/src/pages/Update/Agreement/Agreement.jsx | 54 +++++ .../pages/Update/Agreement/Agreement.module.css | 4 + client/src/pages/Update/Biometric/Biometric.jsx | 48 ++++ .../pages/Update/Biometric/Biometric.module.css | 28 +++ .../Update/BiometricSelect/BiometricSelect.jsx | 21 ++ .../src/pages/Update/Demographic/Demographic.jsx | 136 ++++++++++++ .../Update/DocumentScanner/DocumentScanner.jsx | 56 +++++ .../DocumentScanner/DocumentScanner.module.css | 5 + client/src/pages/Update/FinalSlip/FinalSlip.jsx | 28 +++ .../pages/Update/FinalSlip/FinalSlip.module.css | 5 + .../src/pages/Update/Fingerprint/Fingerprint.jsx | 57 +++++ .../Update/Fingerprint/Fingerprint.module.css | 5 + client/src/pages/Update/FormOne/FormOne.jsx | 92 ++++++++ client/src/pages/Update/FormOne/FormOne.module.css | 47 ++++ client/src/pages/Update/IrisScan/IrisScan.jsx | 57 +++++ .../src/pages/Update/IrisScan/IrisScan.module.css | 5 + .../src/pages/Update/PhotoCapture/PhotoCapture.jsx | 88 ++++++++ .../Update/PhotoCapture/PhotoCapture.module.css | 5 + client/src/pages/Update/Update.jsx | 51 ++++- client/src/pages/Update/Update.module.css | 14 ++ .../src/pages/Update/UpdateSelect/UpdateSelect.jsx | 34 +++ .../Update/UpdateSelect/UpdateSelect.module.css | 5 + client/src/routes/index.js | 42 +--- 38 files changed, 1524 insertions(+), 226 deletions(-) create mode 100644 client/src/components/BiometricCard/BiometricCard.jsx create mode 100644 client/src/components/BiometricCard/BiometricCard.module.css create mode 100644 client/src/components/EditButton/EditButton.jsx create mode 100644 client/src/components/EditButton/EditButton.module.css create mode 100644 client/src/components/Gender/Gender.jsx create mode 100644 client/src/components/Gender/Gender.module.css create mode 100644 client/src/components/UpdateInput/UpdateInput.jsx create mode 100644 client/src/components/UpdateInput/UpdateInput.module.css create mode 100644 client/src/pages/Update/Address/Address.jsx create mode 100644 client/src/pages/Update/Address/Address.module.css create mode 100644 client/src/pages/Update/Agreement/Agreement.jsx create mode 100644 client/src/pages/Update/Agreement/Agreement.module.css create mode 100644 client/src/pages/Update/Biometric/Biometric.jsx create mode 100644 client/src/pages/Update/Biometric/Biometric.module.css create mode 100644 client/src/pages/Update/BiometricSelect/BiometricSelect.jsx create mode 100644 client/src/pages/Update/Demographic/Demographic.jsx create mode 100644 client/src/pages/Update/DocumentScanner/DocumentScanner.jsx create mode 100644 client/src/pages/Update/DocumentScanner/DocumentScanner.module.css create mode 100644 client/src/pages/Update/FinalSlip/FinalSlip.jsx create mode 100644 client/src/pages/Update/FinalSlip/FinalSlip.module.css create mode 100644 client/src/pages/Update/Fingerprint/Fingerprint.jsx create mode 100644 client/src/pages/Update/Fingerprint/Fingerprint.module.css create mode 100644 client/src/pages/Update/FormOne/FormOne.jsx create mode 100644 client/src/pages/Update/FormOne/FormOne.module.css create mode 100644 client/src/pages/Update/IrisScan/IrisScan.jsx create mode 100644 client/src/pages/Update/IrisScan/IrisScan.module.css create mode 100644 client/src/pages/Update/PhotoCapture/PhotoCapture.jsx create mode 100644 client/src/pages/Update/PhotoCapture/PhotoCapture.module.css create mode 100644 client/src/pages/Update/UpdateSelect/UpdateSelect.jsx create mode 100644 client/src/pages/Update/UpdateSelect/UpdateSelect.module.css (limited to 'client/src') diff --git a/client/src/App.js b/client/src/App.js index e7ab247..c39f14e 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -1,183 +1,10 @@ -import React, { useState } from 'react' -import Address from './pages/Enrollment/Address/Address' -import Agreement from './pages/Enrollment/Agreement/Agreement' -import DocumentScanner from './pages/Enrollment/DocumentScanner/DocumentScanner' -import FinalSlip from './pages/Enrollment/FinalSlip/FinalSlip' -import Fingerprint from './pages/Enrollment/Fingerprint/Fingerprint' -import FormTwo from './pages/Enrollment/FormTwo/FormTwo' -import IrisScan from './pages/Enrollment/IrisScan/IrisScan' -import PhotoCapture from './pages/Enrollment/PhotoCapture/PhotoCapture' -import SubmitButton from './components/SubmitButton/SubmitButton' -import FormOne from './pages/Enrollment/FormOne/FormOne' -import { validEmail, validMobileNumber, validPincode } from './components/RegEx/RegEx' -import Home from './pages/Home/Home' +import React from 'react' +import Index from './routes' const App = () => { - const [page, setPage] = useState(9) - - const [formData, setFormData] = useState({ - indianResident: '', - name: '', - gender: '', - dob: new Date().toISOString().slice(0, 10), - mobile: '', - email: '', - country: '', - state: '', - district: '', - village: '', - houseNo: '', - street: '', - locality: '', - postOffice: '', - landmark: '', - pincode: '', - address: '' - }) - - function handleSubmit () { - if (page === 0) { - if (formData.indianResident === '') { - return alert('Please select your residency') - } else if (formData.name === '' || formData.name.length < 1) { - return alert('Please enter your name') - } else if (formData.gender === '') { - return alert('Please select your gender') - } else { - setPage(page + 1) - } - } else if (page === 1) { - if (formData.mobile === '') { - return alert('Please enter your mobile number') - } else if (!validMobileNumber.test(formData.mobile)) { - return alert('Please enter valid mobile number') - } else if (formData.email === '') { - return alert('Please enter your email') - } else if (!validEmail.test(formData.email)) { - return alert('Please enter valid email') - } else { - setPage(page + 1) - } - } else if (page === 2) { - if (formData.country === '') { - return alert('Please select your country') - } else if (formData.state === '') { - return alert('Please select your state') - } else if (formData.district === '') { - return alert('Please select your district') - } else if (formData.village === '') { - return alert('Please enter your village') - } else if (formData.houseNo === '') { - return alert('Please enter your house number') - } else if (formData.street === '') { - return alert('Please enter your street') - } else if (formData.locality === '') { - return alert('Please enter your locality') - } else if (formData.postOffice === '') { - return alert('Please enter your post office') - } else if (formData.landmark === '') { - return alert('Please enter your landmark') - } else if (formData.pincode === '') { - return alert('Please enter your pincode') - } else if (!validPincode.test(formData.pincode)) { - return alert('Please enter valid pincode') - } else { - setFormData({ - ...formData, - address: `${formData.houseNo} ${formData.street}, ${formData.locality}, ${formData.landmark}, ${formData.village}, ${formData.district.label}, ${formData.country.label} ${formData.pincode}` - }) - setPage(page + 1) - } - } else if (page === 3) { - setPage(page + 1) - } else if (page === 4) { - setPage(page + 1) - } else if (page === 5) { - setPage(page + 1) - } else if (page === 6) { - setPage(page + 1) - } else if (page === 7) { - setPage(page + 1) - } else if (page === 8) { - setPage(page + 1) - } else if (page === 9) { - setPage(page + 1) - } else setPage(page + 1) - } - - const conditionalComponent = () => { - switch (page) { - case 0: - return - case 1: - return - case 2: - return
- case 3: - return - case 4: - return - case 5: - return - case 6: - return - case 7: - return - case 8: - return - default: - return - } - } - - const conditionalButton = () => { - switch (page) { - case 0: - return - Next - - case 1: - return - Next - - case 2: - return - Next - - case 3: - return - Next - - case 4: - return - Next - - case 5: - return - Next - - case 6: - return - Next - - case 7: - return - Submit - - case 8: - return - Exit - - default: - return - Next - - } - } return ( <> - {conditionalComponent()} - {conditionalButton()} + ) } diff --git a/client/src/components/BiometricCard/BiometricCard.jsx b/client/src/components/BiometricCard/BiometricCard.jsx new file mode 100644 index 0000000..ff5271f --- /dev/null +++ b/client/src/components/BiometricCard/BiometricCard.jsx @@ -0,0 +1,20 @@ +import React from 'react' +import EditButton from '../EditButton/EditButton' +import styles from './BiometricCard.module.css' + +const BiometricCard = ({ label, onclick }) => { + return ( +
+
+
+
+
{label}
+ +
+
+
+
+ ) +} + +export default BiometricCard diff --git a/client/src/components/BiometricCard/BiometricCard.module.css b/client/src/components/BiometricCard/BiometricCard.module.css new file mode 100644 index 0000000..ca6f46a --- /dev/null +++ b/client/src/components/BiometricCard/BiometricCard.module.css @@ -0,0 +1,26 @@ +.input { + display: flex; + justify-content: center; + font-family: 'Barlow'; + font-size: var(--font-medium-s); + } + + .input__container { + display: flex; + flex-direction: column; + } + + .input__edit{ + display: flex; + flex-direction: row; + } + + .input__field { + width: 300px; + margin: 10px 0px; + padding: 18px 10px; + border: 3px solid; + border-radius: 10px; + font-size: 1rem; + text-align: center; + } \ No newline at end of file diff --git a/client/src/components/EditButton/EditButton.jsx b/client/src/components/EditButton/EditButton.jsx new file mode 100644 index 0000000..125ffad --- /dev/null +++ b/client/src/components/EditButton/EditButton.jsx @@ -0,0 +1,19 @@ +import React from 'react' +import styles from './EditButton.module.css' + +const EditButton = ({ onClick, enabled }) => { + return ( + <> + + + ) +} + +export default EditButton diff --git a/client/src/components/EditButton/EditButton.module.css b/client/src/components/EditButton/EditButton.module.css new file mode 100644 index 0000000..5c9a288 --- /dev/null +++ b/client/src/components/EditButton/EditButton.module.css @@ -0,0 +1,16 @@ +.submit { + background: transparent; + border: none; + transition: 0.2s all; + cursor: pointer; + margin-left: 10px; +} + +.submit:active { + transform: scale(0.98); +} + +.submit__image { + height: 30px; + width: 30px; +} diff --git a/client/src/components/Gender/Gender.jsx b/client/src/components/Gender/Gender.jsx new file mode 100644 index 0000000..97e4d6e --- /dev/null +++ b/client/src/components/Gender/Gender.jsx @@ -0,0 +1,60 @@ +import React from 'react' +import EditButton from '../../components/EditButton/EditButton' +import LabelCard from '../LabelCard/LabelCard' +import styles from './Gender.module.css' + +const Gender = ({ formData, setFormData }) => { + const [editable, setEditable] = React.useState(true) + + const handleEdit = () => { + setEditable(!editable) + } + return ( +
+ { + setFormData({ + ...formData, + gender: 'Male' + }) + }} + image={`${process.env.PUBLIC_URL}/assets/images/male.svg`} /> + { + setFormData({ + ...formData, + gender: 'Female' + }) + }} + image={`${process.env.PUBLIC_URL}/assets/images/female.svg`} /> + { + setFormData({ + ...formData, + gender: 'Transgender' + }) + }} + image={`${process.env.PUBLIC_URL}/assets/images/trans.svg`} /> + +
+ ) +} + +export default Gender diff --git a/client/src/components/Gender/Gender.module.css b/client/src/components/Gender/Gender.module.css new file mode 100644 index 0000000..f84ba2a --- /dev/null +++ b/client/src/components/Gender/Gender.module.css @@ -0,0 +1,3 @@ +.formone__gender { + display: flex; + } \ No newline at end of file diff --git a/client/src/components/LabelCard/LabelCard.jsx b/client/src/components/LabelCard/LabelCard.jsx index 42ba7bf..dd02050 100644 --- a/client/src/components/LabelCard/LabelCard.jsx +++ b/client/src/components/LabelCard/LabelCard.jsx @@ -1,7 +1,7 @@ import React from 'react' import styles from './LabelCard.module.css' -const LabelCard = ({ id, name, value, title, image, onChange }) => { +const LabelCard = ({ id, name, value, title, image, onChange, readOnly }) => { return (
) diff --git a/client/src/components/SubmitButton/SubmitButton.jsx b/client/src/components/SubmitButton/SubmitButton.jsx index 4437efa..6098f3c 100644 --- a/client/src/components/SubmitButton/SubmitButton.jsx +++ b/client/src/components/SubmitButton/SubmitButton.jsx @@ -1,10 +1,10 @@ import React from 'react' import styles from './SubmitButton.module.css' -const SubmitButton = ({ onClick }) => { +const SubmitButton = ({ onClick, onChange }) => { return ( <> - + + + + + + + + + + ) +} + +export default Agreement diff --git a/client/src/pages/Update/Agreement/Agreement.module.css b/client/src/pages/Update/Agreement/Agreement.module.css new file mode 100644 index 0000000..c618a4d --- /dev/null +++ b/client/src/pages/Update/Agreement/Agreement.module.css @@ -0,0 +1,4 @@ +.card__container { + display: flex; + justify-content: center; + } \ No newline at end of file diff --git a/client/src/pages/Update/Biometric/Biometric.jsx b/client/src/pages/Update/Biometric/Biometric.jsx new file mode 100644 index 0000000..c105ad8 --- /dev/null +++ b/client/src/pages/Update/Biometric/Biometric.jsx @@ -0,0 +1,48 @@ +import React, { useState } from 'react' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' +import PhotoCapture from '../PhotoCapture/PhotoCapture' +import Fingerprint from '../Fingerprint/Fingerprint' +import IrisScan from '../IrisScan/IrisScan' +import BiometricSelect from '../BiometricSelect/BiometricSelect' + +const Biometric = () => { + const [page, setPage] = useState(4) + + const [formData, setFormData] = useState({ + photo: '', + irisScan: '', + fingerPrint: '' + }) + + const conditionalComponent = () => { + switch (page) { + case 0: + return + case 1: + return + case 2: + return + default: + return + } + } + + const conditionalButton = () => { + switch (page) { + case 0: + return setPage(4)}>Next + case 1: + return setPage(4)}>Next + case 2: + return setPage(4)}>Next + } + } + return ( + <> + {conditionalComponent()} + {conditionalButton()} + + ) +} + +export default Biometric diff --git a/client/src/pages/Update/Biometric/Biometric.module.css b/client/src/pages/Update/Biometric/Biometric.module.css new file mode 100644 index 0000000..c2bfd94 --- /dev/null +++ b/client/src/pages/Update/Biometric/Biometric.module.css @@ -0,0 +1,28 @@ +.input { + display: flex; + justify-content: center; + font-family: 'Barlow'; + font-size: var(--font-medium-s); + font-weight: bold; + } + + .input__container { + display: flex; + flex-direction: column; + } + + .input__edit{ + display: flex; + flex-direction: row; + } + + .input__field { + width: 300px; + margin: 10px 0px; + padding: 18px 10px; + border: 3px solid; + border-radius: 10px; + font-size: 1rem; + text-align: center; + } + \ No newline at end of file diff --git a/client/src/pages/Update/BiometricSelect/BiometricSelect.jsx b/client/src/pages/Update/BiometricSelect/BiometricSelect.jsx new file mode 100644 index 0000000..7eab595 --- /dev/null +++ b/client/src/pages/Update/BiometricSelect/BiometricSelect.jsx @@ -0,0 +1,21 @@ +import React from 'react' +import Header from '../../../components/Header/Header' +import BiometricCard from '../../../components/BiometricCard/BiometricCard' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' +import { Link } from 'react-router-dom' + +const BiometricSelect = ({ page, setPage }) => { + return ( + <> +
+ setPage(0)} /> + setPage(1)} /> + setPage(2)} /> + + + + + ) +} + +export default BiometricSelect diff --git a/client/src/pages/Update/Demographic/Demographic.jsx b/client/src/pages/Update/Demographic/Demographic.jsx new file mode 100644 index 0000000..8ec9e82 --- /dev/null +++ b/client/src/pages/Update/Demographic/Demographic.jsx @@ -0,0 +1,136 @@ +import React, { useState } from 'react' +import Address from '../Address/Address' +import DocumentScanner from '../DocumentScanner/DocumentScanner' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' +import FormOne from '../FormOne/FormOne' +import { validEmail, validMobileNumber, validPincode } from '../../../components/RegEx/RegEx' +import UpdateSelect from '../UpdateSelect/UpdateSelect' + +const Demographic = () => { + const [page, setPage] = useState(0) + + const [formData, setFormData] = useState({ + name: '', + gender: '', + dob: new Date().toISOString().slice(0, 10), + mobile: '', + email: '', + country: '', + state: '', + district: '', + village: '', + houseNo: '', + street: '', + locality: '', + postOffice: '', + landmark: '', + pincode: '', + address: '' + }) + + function handleSubmit () { + if (page === 0) { + if (formData.name === '' || formData.name.length < 1) { + return alert('Please enter your name') + } else if (formData.gender === '') { + return alert('Please select your gender') + } else if (formData.mobile === '') { + return alert('Please enter your mobile number') + } else if (!validMobileNumber.test(formData.mobile)) { + return alert('Please enter valid mobile number') + } else if (formData.email === '') { + return alert('Please enter your email') + } else if (!validEmail.test(formData.email)) { + return alert('Please enter valid email') + } else { + setPage(page + 1) + } + } else if (page === 1) { + if (formData.mobile === '') { + return alert('Please enter your mobile number') + } else if (!validMobileNumber.test(formData.mobile)) { + return alert('Please enter valid mobile number') + } else if (formData.email === '') { + return alert('Please enter your email') + } else if (!validEmail.test(formData.email)) { + return alert('Please enter valid email') + } else { + setPage(page + 1) + } + } else if (page === 2) { + if (formData.country === '') { + return alert('Please select your country') + } else if (formData.state === '') { + return alert('Please select your state') + } else if (formData.district === '') { + return alert('Please select your district') + } else if (formData.village === '') { + return alert('Please enter your village') + } else if (formData.houseNo === '') { + return alert('Please enter your house number') + } else if (formData.street === '') { + return alert('Please enter your street') + } else if (formData.locality === '') { + return alert('Please enter your locality') + } else if (formData.postOffice === '') { + return alert('Please enter your post office') + } else if (formData.landmark === '') { + return alert('Please enter your landmark') + } else if (formData.pincode === '') { + return alert('Please enter your pincode') + } else if (!validPincode.test(formData.pincode)) { + return alert('Please enter valid pincode') + } else { + setFormData({ + ...formData, + address: `${formData.houseNo} ${formData.street}, ${formData.locality}, ${formData.landmark}, ${formData.village}, ${formData.district.label}, ${formData.country.label} ${formData.pincode}` + }) + setPage(page + 1) + } + } else if (page === 3) { + setPage(page + 1) + } else setPage(page + 1) + } + + const conditionalComponent = () => { + switch (page) { + case 0: + return + case 1: + return
+ case 2: + return + default: + return + } + } + + const conditionalButton = () => { + switch (page) { + case 0: + return + Next + + case 1: + return + Next + + case 2: + return + Next + + default: + return + Next + + } + } + return ( + <> + {conditionalComponent()} + {conditionalButton()} + + ) +} + +export default Demographic diff --git a/client/src/pages/Update/DocumentScanner/DocumentScanner.jsx b/client/src/pages/Update/DocumentScanner/DocumentScanner.jsx new file mode 100644 index 0000000..f200497 --- /dev/null +++ b/client/src/pages/Update/DocumentScanner/DocumentScanner.jsx @@ -0,0 +1,56 @@ +import React from 'react' +import Header from '../../../components/Header/Header' +import CardScanner from '../../../components/Card/CardScanner' +import styles from './DocumentScanner.module.css' +import { Button, Grid, Typography } from '@mui/material' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' + +const DocumentScanner = () => { + return ( + <> +
+
+ +
+ + + + + + + + +

+
+ + + Please place your document on the scanner. +
+ Close the lid. +
+ Wait for prompt to remove your document +
+
+
+ + + ) +} + +export default DocumentScanner diff --git a/client/src/pages/Update/DocumentScanner/DocumentScanner.module.css b/client/src/pages/Update/DocumentScanner/DocumentScanner.module.css new file mode 100644 index 0000000..ec59f61 --- /dev/null +++ b/client/src/pages/Update/DocumentScanner/DocumentScanner.module.css @@ -0,0 +1,5 @@ +.card__container { + display: flex; + justify-content: center; + } + \ No newline at end of file diff --git a/client/src/pages/Update/FinalSlip/FinalSlip.jsx b/client/src/pages/Update/FinalSlip/FinalSlip.jsx new file mode 100644 index 0000000..9ac568a --- /dev/null +++ b/client/src/pages/Update/FinalSlip/FinalSlip.jsx @@ -0,0 +1,28 @@ +import React from 'react' +import Header from '../../../components/Header/Header' +import CardScanner from '../../../components/Card/CardScanner' +import styles from './FinalSlip.module.css' +import { Grid, Typography } from '@mui/material' + +const FinalSlip = () => { + return ( + <> +
+
+ +
+
+ + + Thank you for your time.
+ Please collect your slip before leaving +
+
+
+ + ) +} + +export default FinalSlip diff --git a/client/src/pages/Update/FinalSlip/FinalSlip.module.css b/client/src/pages/Update/FinalSlip/FinalSlip.module.css new file mode 100644 index 0000000..ec59f61 --- /dev/null +++ b/client/src/pages/Update/FinalSlip/FinalSlip.module.css @@ -0,0 +1,5 @@ +.card__container { + display: flex; + justify-content: center; + } + \ No newline at end of file diff --git a/client/src/pages/Update/Fingerprint/Fingerprint.jsx b/client/src/pages/Update/Fingerprint/Fingerprint.jsx new file mode 100644 index 0000000..bb46556 --- /dev/null +++ b/client/src/pages/Update/Fingerprint/Fingerprint.jsx @@ -0,0 +1,57 @@ +import React from 'react' +import Header from '../../../components/Header/Header' +import CardBiometrics from '../../../components/Card/CardBiometrics' +import styles from './Fingerprint.module.css' +import { Button, Grid, Typography } from '@mui/material' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' + +const Fingerprint = () => { + return ( + <> +
+
+ + +
+ + + + + + + + +

+
+ + + Please put your eyes inside the iris scanner. +
+ Wait for prompt and beep sound to remove your eyes +
+
+
+ + + ) +} + +export default Fingerprint diff --git a/client/src/pages/Update/Fingerprint/Fingerprint.module.css b/client/src/pages/Update/Fingerprint/Fingerprint.module.css new file mode 100644 index 0000000..ec59f61 --- /dev/null +++ b/client/src/pages/Update/Fingerprint/Fingerprint.module.css @@ -0,0 +1,5 @@ +.card__container { + display: flex; + justify-content: center; + } + \ No newline at end of file diff --git a/client/src/pages/Update/FormOne/FormOne.jsx b/client/src/pages/Update/FormOne/FormOne.jsx new file mode 100644 index 0000000..5861971 --- /dev/null +++ b/client/src/pages/Update/FormOne/FormOne.jsx @@ -0,0 +1,92 @@ +import React from 'react' +import Header from '../../../components/Header/Header' +import UpdateInput from '../../../components/UpdateInput/UpdateInput' +import styles from './FormOne.module.css' +import EditButton from '../../../components/EditButton/EditButton' +import Gender from '../../../components/Gender/Gender' + +const FormOne = ({ formData, setFormData }) => { + const handleSubmit = () => { + } + + const [editable, setEditable] = React.useState(true) + + const handleEdit = () => { + setEditable(!editable) + } + + return ( + <>
handleSubmit()}> +
+ { + setFormData({ + ...formData, + name: e.target.value + }) + }} + placeholder="Enter your full name" /> + + { + setFormData({ + ...formData, + mobile: e.target.value + }) + }} + placeholder="Enter your Mobile Number" /> + +
+ +
+ { + setFormData({ + ...formData, + dob: e.target.value + }) + }} + required /> + +
+
+ + { + setFormData({ + ...formData, + email: e.target.value + }) + }} + placeholder="Enter your Email ID" /> + + + +
+
+ ) +} + +export default FormOne diff --git a/client/src/pages/Update/FormOne/FormOne.module.css b/client/src/pages/Update/FormOne/FormOne.module.css new file mode 100644 index 0000000..abde7ef --- /dev/null +++ b/client/src/pages/Update/FormOne/FormOne.module.css @@ -0,0 +1,47 @@ +.formone { + display: flex; + flex-direction: column; + align-items: center; + font-family: 'Barlow'; + font-size: var(--font-medium-s); +} + +.formone__radio { + display: flex; + align-items: center; +} + +.formone__resident { + display: flex; + align-items: center; + margin: 15px; +} + +.formone__resident input[type='radio'] { + width: 1.5rem; + height: 1.5rem; +} + +.formone__dob { + display: flex; + flex-direction: column; +} + +.formone__dob input[type='date']::-webkit-calendar-picker-indicator { + width: 30px; + height: 30px; + margin: 0; +} + +.formone__dob_input { + width: 300px; + margin: 10px 0px; + padding: 11px 10px; + border: 3px solid; + border-radius: 10px; +} + +.input__edit{ + display: flex; + flex-direction: row; +} diff --git a/client/src/pages/Update/IrisScan/IrisScan.jsx b/client/src/pages/Update/IrisScan/IrisScan.jsx new file mode 100644 index 0000000..c07e9b8 --- /dev/null +++ b/client/src/pages/Update/IrisScan/IrisScan.jsx @@ -0,0 +1,57 @@ +import React from 'react' +import Header from '../../../components/Header/Header' +import CardBiometrics from '../../../components/Card/CardBiometrics' +import styles from './IrisScan.module.css' +import { Button, Grid, Typography } from '@mui/material' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' + +const IrisScan = () => { + return ( + <> +
+
+ + +
+ + + + + + + + +

+
+ + + Please put your eyes inside the iris scanner. +
+ Wait for prompt and beep sound to remove your eyes +
+
+
+ + + ) +} + +export default IrisScan diff --git a/client/src/pages/Update/IrisScan/IrisScan.module.css b/client/src/pages/Update/IrisScan/IrisScan.module.css new file mode 100644 index 0000000..ec59f61 --- /dev/null +++ b/client/src/pages/Update/IrisScan/IrisScan.module.css @@ -0,0 +1,5 @@ +.card__container { + display: flex; + justify-content: center; + } + \ No newline at end of file diff --git a/client/src/pages/Update/PhotoCapture/PhotoCapture.jsx b/client/src/pages/Update/PhotoCapture/PhotoCapture.jsx new file mode 100644 index 0000000..c4960c2 --- /dev/null +++ b/client/src/pages/Update/PhotoCapture/PhotoCapture.jsx @@ -0,0 +1,88 @@ +/* eslint-disable multiline-ternary */ +import React, { useState } from 'react' +import Webcam from 'react-webcam' +import { useNavigate } from 'react-router-dom' +import Header from '../../../components/Header/Header' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' +import styles from './PhotoCapture.module.css' +import { Button, Grid, Typography } from '@mui/material' + +const PhotoCapture = () => { + const [photo, setPhoto] = useState() + + const navigate = useNavigate() + + const webcamRef = React.useRef(null) + + const capture = React.useCallback(() => { + const imageSrc = webcamRef.current.getScreenshot() + setPhoto(imageSrc) + }) + + return ( + <> +
+
+ {photo === '' ? ( + + ) : ( + + )} +
+ + + + + + + + +

+
+ + + Please look into the camera

+ Click Capture to Capture the photo

+ Click Reset the remove the captured photo +
+
+
+ navigate('/enrollment/documents')} /> + + ) +} + +export default PhotoCapture diff --git a/client/src/pages/Update/PhotoCapture/PhotoCapture.module.css b/client/src/pages/Update/PhotoCapture/PhotoCapture.module.css new file mode 100644 index 0000000..a1ff9c0 --- /dev/null +++ b/client/src/pages/Update/PhotoCapture/PhotoCapture.module.css @@ -0,0 +1,5 @@ +.card__container { + display: flex; + justify-content: center; + margin: 10px; +} diff --git a/client/src/pages/Update/Update.jsx b/client/src/pages/Update/Update.jsx index 0b448cf..69b9224 100644 --- a/client/src/pages/Update/Update.jsx +++ b/client/src/pages/Update/Update.jsx @@ -1,7 +1,56 @@ import React from 'react' +import { useNavigate } from 'react-router-dom' +import Header from '../../components/Header/Header' +import styles from './Update.module.css' +import Input from '../../components/Input/Input' +import { Grid, Button } from '@mui/material' const Update = () => { - return
Update
+ const navigate = useNavigate() + return ( + <>
+
+

Provide Aadhaar Number (UID):

+ + + + + + +
+
+

Enter OTP

+ + + + + + +
+ + ) } export default Update diff --git a/client/src/pages/Update/Update.module.css b/client/src/pages/Update/Update.module.css index e69de29..421dcfd 100644 --- a/client/src/pages/Update/Update.module.css +++ b/client/src/pages/Update/Update.module.css @@ -0,0 +1,14 @@ +.subheading__container { + font-family: 'Barlow'; + display: flex; + flex-direction: column; + align-items: center; + font-weight: bolder; + margin: 20px; + padding: 20px; + } + +.subheading { + font-size: var(--font-medium); + font-weight: 400; + } \ No newline at end of file diff --git a/client/src/pages/Update/UpdateSelect/UpdateSelect.jsx b/client/src/pages/Update/UpdateSelect/UpdateSelect.jsx new file mode 100644 index 0000000..a903704 --- /dev/null +++ b/client/src/pages/Update/UpdateSelect/UpdateSelect.jsx @@ -0,0 +1,34 @@ +import React from 'react' +import { Link } from 'react-router-dom' + +import Card from '../../../components/Card/Card' +import Header from '../../../components/Header/Header' +import SubmitButton from '../../../components/SubmitButton/SubmitButton' +import styles from './UpdateSelect.module.css' + +const UpdateSelect = () => { + return ( + <> +
+
+ + + + + + + + + +
+ + ) +} + +export default UpdateSelect diff --git a/client/src/pages/Update/UpdateSelect/UpdateSelect.module.css b/client/src/pages/Update/UpdateSelect/UpdateSelect.module.css new file mode 100644 index 0000000..ec59f61 --- /dev/null +++ b/client/src/pages/Update/UpdateSelect/UpdateSelect.module.css @@ -0,0 +1,5 @@ +.card__container { + display: flex; + justify-content: center; + } + \ No newline at end of file diff --git a/client/src/routes/index.js b/client/src/routes/index.js index f5bd89e..41beeca 100644 --- a/client/src/routes/index.js +++ b/client/src/routes/index.js @@ -4,14 +4,11 @@ import { Route, Routes } from 'react-router-dom' import Home from '../pages/Home/Home' import Enrollment from '../pages/Enrollment/Enrollment' import Update from '../pages/Update/Update' -import PhotoCapture from '../pages/Enrollment/PhotoCapture/PhotoCapture' -import DocumentScanner from '../pages/Enrollment/DocumentScanner/DocumentScanner' -import FormTwo from '../pages/Enrollment/FormTwo/FormTwo' -import Address from '../pages/Enrollment/Address/Address' -import IrisScan from '../pages/Enrollment/IrisScan/IrisScan' -import Fingerprint from '../pages/Enrollment/Fingerprint/Fingerprint' -import Agreement from '../pages/Enrollment/Agreement/Agreement' -import FinalSlip from '../pages/Enrollment/FinalSlip/FinalSlip' +import Demographic from '../pages/Update/Demographic/Demographic' +import UpdateSelect from '../pages/Update/UpdateSelect/UpdateSelect' +import Biometric from '../pages/Update/Biometric/Biometric' +import Agreement from '../pages/Update/Agreement/Agreement' +import FinalSlip from '../pages/Update/FinalSlip/FinalSlip' const Index = () => { return ( @@ -19,33 +16,14 @@ const Index = () => { } /> } /> - - } /> - - - } /> - - - } /> - - - } /> - - - } /> - - - } /> - - - } /> - - - } /> - } /> + } /> + } /> + } /> + } /> + } /> ) -- cgit