Compare commits
No commits in common. "develop" and "test" have entirely different histories.
0
admin/.gitignore → .gitignore
vendored
70
README.md
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Getting Started with Create React App
|
||||
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
## Available Scripts
|
||||
|
||||
In the project directory, you can run:
|
||||
|
||||
### `npm start`
|
||||
|
||||
Runs the app in the development mode.\
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
|
||||
|
||||
The page will reload when you make changes.\
|
||||
You may also see any lint errors in the console.
|
||||
|
||||
### `npm test`
|
||||
|
||||
Launches the test runner in the interactive watch mode.\
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
### `npm run build`
|
||||
|
||||
Builds the app for production to the `build` folder.\
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
The build is minified and the filenames include the hashes.\
|
||||
Your app is ready to be deployed!
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
### `npm run eject`
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
|
||||
|
||||
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
|
||||
|
||||
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
|
||||
|
||||
## Learn More
|
||||
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
|
||||
### Code Splitting
|
||||
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
|
||||
|
||||
### Analyzing the Bundle Size
|
||||
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
|
||||
|
||||
### Making a Progressive Web App
|
||||
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
|
||||
|
||||
### Deployment
|
||||
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
|
||||
|
||||
### `npm run build` fails to minify
|
||||
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
|
|
@ -1 +0,0 @@
|
|||
<?xml version="1.0"?><svg fill="#609db3" xmlns="http://www.w3.org/2000/svg" transform="rotate(180)" viewBox="0 0 24 24" width="192px" height="192px"> <path d="M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10s10-4.477,10-10C22,6.477,17.523,2,12,2z M10.25,16.321L10.25,16.321 c-0.414-0.414-0.414-1.086,0-1.5L13.071,12L10.25,9.179c-0.414-0.414-0.414-1.086,0-1.5l0,0c0.414-0.414,1.086-0.414,1.5,0 l3.614,3.614c0.391,0.391,0.391,1.024,0,1.414l-3.614,3.614C11.336,16.735,10.664,16.735,10.25,16.321z"/></svg>
|
Before Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 77 KiB |
|
@ -1,27 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="256" height="256" viewBox="0 0 64 64"
|
||||
style=" fill:#000000;">
|
||||
<path fill="#FAB400" d="M44,14v41c0,0.55-0.44,1-1,1H9c-0.55,0-1-0.45-1-1V5c0-0.55,0.45-1,1-1h25L44,14z"></path>
|
||||
<path fill="#DC9600"
|
||||
d="M44,46.307v8.28l-7.526-7.557c-0.361-0.351-0.403-0.919-0.103-1.342l-2.282-2.271 c-2.416,1.807-5.42,2.891-8.673,2.891c-7.981,0-14.454-6.484-14.454-14.454c0-7.991,6.473-14.454,14.454-14.454 S39.87,23.861,39.87,31.852c0,3.232-1.063,6.215-2.87,8.631v0.01l2.292,2.271c0.413-0.258,0.96-0.207,1.311,0.134L44,46.307z">
|
||||
</path>
|
||||
<rect width="3.999" height="4.487" x="34.998" y="38.757" fill="#F0F0F0" transform="rotate(-45.001 36.997 41)">
|
||||
</rect>
|
||||
<path fill="#0A5078"
|
||||
d="M27.557,16.102c6.095,0.751,11.09,5.56,12.045,11.626c0.627,3.985-0.436,7.741-2.602,10.624v0.01 c-0.8,1.07-1.75,2.02-2.82,2.83c-2.893,2.163-6.657,3.257-10.669,2.62c-6.087-0.967-10.905-5.99-11.63-12.111 C10.804,22.609,18.458,14.981,27.557,16.102z">
|
||||
</path>
|
||||
<path fill="#DC9600" d="M44.02,16H34c-1.105,0-2-0.895-2-2V4h2.003L44,13.98L44.02,16z"></path>
|
||||
<path fill="#FAB400" d="M44,14h-9c-0.552,0-1-0.448-1-1V4L44,14z"></path>
|
||||
<path fill="#00143C"
|
||||
d="M25.009,10h-12c-0.552,0-1,0.448-1,1s0.448,1,1,1h12c0.552,0,1-0.448,1-1S25.561,10,25.009,10z"></path>
|
||||
<path fill="#00143C"
|
||||
d="M31.009,50h-18c-0.552,0-1,0.448-1,1s0.448,1,1,1h18c0.552,0,1-0.448,1-1S31.561,50,31.009,50z"></path>
|
||||
<path fill="#00143C" d="M18.009,46h-5c-0.552,0-1,0.448-1,1s0.448,1,1,1h5c0.552,0,1-0.448,1-1S18.561,46,18.009,46z">
|
||||
</path>
|
||||
<circle cx="26" cy="30" r="10" fill="#FAB400"></circle>
|
||||
<path fill="#C80A50"
|
||||
d="M29.009,29.993l2.293-2.293c0.391-0.391,0.391-1.024,0-1.414L29.716,24.7 c-0.391-0.391-1.024-0.391-1.414,0l-2.293,2.293L23.716,24.7c-0.391-0.391-1.024-0.391-1.414,0l-1.586,1.586 c-0.391,0.391-0.391,1.024,0,1.414l2.293,2.293l-2.293,2.293c-0.391,0.391-0.391,1.024,0,1.414l1.586,1.586 c0.391,0.391,1.024,0.391,1.414,0l2.293-2.293l2.293,2.293c0.391,0.391,1.024,0.391,1.414,0l1.586-1.586 c0.391-0.391,0.391-1.024,0-1.414L29.009,29.993z">
|
||||
</path>
|
||||
<path fill="#0A5078"
|
||||
d="M55.159,59.183c-1.1,1.1-2.89,1.1-4,0l-14.44-14.48c-0.35-0.35-0.39-0.9-0.1-1.3 c0.03-0.04,0.06-0.08,0.1-0.12l2.58-2.58c0.05-0.05,0.1-0.09,0.15-0.13c0.4-0.25,0.93-0.21,1.27,0.13l14.44,14.48 C56.249,56.253,56.289,58.063,55.159,59.183z">
|
||||
</path>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.4 KiB |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240px" height="240px"><path fill="#455A64" d="M32,5h-8c0,1.104-1,3-3,3s-3-1.896-3-3h-8C7.791,5,6,6.791,6,9v30c0,2.209,1.791,4,4,4h22c2.209,0,4-1.791,4-4V9C36,6.791,34.209,5,32,5"/><path fill="#FFF" d="M32,40H10c-0.552,0-1-0.448-1-1V9c0-0.552,0.448-1,1-1h22c0.552,0,1,0.448,1,1v30C33,39.552,32.552,40,32,40z"/><path fill="#90A4AE" d="M23,5c0,1.104-0.895,2-2,2s-2-0.896-2-2h-2v4c0,1.105,0.895,2,2,2h4c1.105,0,2-0.895,2-2V5H23z"/><path fill="#90A4AE" d="M21,1c-2.206,0-4,1.794-4,4s1.794,4,4,4s4-1.794,4-4S23.206,1,21,1 M21,7c-1.104,0-2-0.896-2-2s0.896-2,2-2s2,0.896,2,2S22.104,7,21,7"/><path fill="#FF9800" d="M21,31.02c-2.395,0-2.5-3.52-2.5-3.52v-3h5v3C23.5,27.5,23.395,31.02,21,31.02"/><path fill="#FFA726" d="M26.5 21.5c0 .552-.448 1-1 1s-1-.448-1-1 .448-1 1-1S26.5 20.948 26.5 21.5M17.5 21.5c0 .552-.448 1-1 1s-1-.448-1-1 .448-1 1-1S17.5 20.948 17.5 21.5"/><path fill="#FFB74D" d="M25.5,18.5c0-3.818-9-2.485-9,0V22c0,2.485,2.015,4.5,4.5,4.5s4.5-2.015,4.5-4.5V18.5z"/><path fill="#424242" d="M21,14c-3.038,0-5,2.462-5,5.5v1.142l1,0.858V19l6-2l2,2v2.5l1-0.87V19.5c0-2.012-0.52-4.007-3-4.5l-0.5-1H21z"/><path fill="#784719" d="M22.5 21.5c0 .276.224.5.5.5.275 0 .5-.224.5-.5S23.275 21 23 21C22.724 21 22.5 21.224 22.5 21.5M18.5 21.5c0 .276.224.5.5.5.275 0 .5-.224.5-.5S19.275 21 19 21C18.724 21 18.5 21.224 18.5 21.5"/><path fill="#2196F3" d="M23.5,27.5L23.5,27.5c0,0-0.877,1-2.5,1c-1.624,0-2.5-1-2.5-1S13,28.493,13,34h16C29,28.513,23.5,27.5,23.5,27.5"/><path fill="#F44336" d="M42,37c0,5.523-4.477,10-10,10s-10-4.477-10-10s4.477-10,10-10S42,31.477,42,37"/><g><path fill="#FFF" d="M30.5 31H33.5V43H30.5z" transform="rotate(134.999 32 37)"/><path fill="#FFF" d="M30.501 31H33.501000000000005V42.999H30.501z" transform="rotate(-134.999 32 37)"/></g></svg>
|
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 8.9 KiB |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240px" height="240px"><path fill="#455A64" d="M32,5h-8c0,1.104-1,3-3,3s-3-1.896-3-3h-8C7.791,5,6,6.791,6,9v30c0,2.209,1.791,4,4,4h22c2.209,0,4-1.791,4-4V9C36,6.791,34.209,5,32,5"/><path fill="#FFF" d="M32,40H10c-0.552,0-1-0.448-1-1V9c0-0.552,0.448-1,1-1h22c0.552,0,1,0.448,1,1v30C33,39.552,32.552,40,32,40z"/><path fill="#90A4AE" d="M23,5c0,1.104-0.895,2-2,2s-2-0.896-2-2h-2v4c0,1.105,0.895,2,2,2h4c1.105,0,2-0.895,2-2V5H23z"/><path fill="#90A4AE" d="M21,1c-2.206,0-4,1.794-4,4s1.794,4,4,4s4-1.794,4-4S23.206,1,21,1 M21,7c-1.104,0-2-0.896-2-2s0.896-2,2-2s2,0.896,2,2S22.104,7,21,7"/><path fill="#FF9800" d="M21,31.02c-2.395,0-2.5-3.52-2.5-3.52v-3h5v3C23.5,27.5,23.395,31.02,21,31.02"/><path fill="#FFA726" d="M26.5 21.5c0 .552-.448 1-1 1s-1-.448-1-1 .448-1 1-1S26.5 20.948 26.5 21.5M17.5 21.5c0 .552-.448 1-1 1s-1-.448-1-1 .448-1 1-1S17.5 20.948 17.5 21.5"/><path fill="#FFB74D" d="M25.5,18.5c0-3.818-9-2.485-9,0V22c0,2.485,2.015,4.5,4.5,4.5s4.5-2.015,4.5-4.5V18.5z"/><path fill="#424242" d="M21,14c-3.038,0-5,2.462-5,5.5v1.142l1,0.858V19l6-2l2,2v2.5l1-0.87V19.5c0-2.012-0.52-4.007-3-4.5l-0.5-1H21z"/><path fill="#784719" d="M22.5 21.5c0 .276.224.5.5.5.275 0 .5-.224.5-.5S23.275 21 23 21C22.724 21 22.5 21.224 22.5 21.5M18.5 21.5c0 .276.224.5.5.5.275 0 .5-.224.5-.5S19.275 21 19 21C18.724 21 18.5 21.224 18.5 21.5"/><path fill="#2196F3" d="M23.5,27.5L23.5,27.5c0,0-0.877,1-2.5,1c-1.624,0-2.5-1-2.5-1S13,28.493,13,34h16C29,28.513,23.5,27.5,23.5,27.5"/><path fill="#43A047" d="M42,37c0,5.523-4.477,10-10,10s-10-4.477-10-10s4.477-10,10-10S42,31.477,42,37"/><path fill="#DCEDC8" d="M36.492 32.35L30.802 38.05 28.074 35.33 25.951 37.458 30.806 42.3 38.619 34.473z"/></svg>
|
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 18 KiB |
|
@ -1,11 +0,0 @@
|
|||
import Index from './routes';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className='App'>
|
||||
<Index />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
|
@ -1,93 +0,0 @@
|
|||
import React, {useState} from 'react';
|
||||
import {Button} from '@mui/material';
|
||||
|
||||
import styles from './Accordion.module.css';
|
||||
import PopUpModal from '../Modal/Modal';
|
||||
|
||||
const Accordion = ({name, user}) => {
|
||||
const [isActive, setIsActive] = useState(false);
|
||||
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const handleOpen = () => setOpen(true);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.accordion}>
|
||||
<div
|
||||
className={styles.accordion__title}
|
||||
onClick={() => setIsActive(!isActive)}
|
||||
>
|
||||
<h2>{name}</h2>
|
||||
<span className={styles.accordion__subheading}>
|
||||
Date of Birth: {user.dob}
|
||||
</span>
|
||||
<span className={styles.accordion__subheading}>
|
||||
Mobile Number: {user.mobile}
|
||||
</span>
|
||||
<div>❯</div>
|
||||
</div>
|
||||
{isActive && (
|
||||
<div className={styles.accordion__content}>
|
||||
<div className={styles.accordion__demographic}>
|
||||
<div>
|
||||
<span>Name</span> <hr /> {user.name}
|
||||
</div>
|
||||
<div>
|
||||
<span>Gender</span> <hr /> {user.gender}
|
||||
</div>
|
||||
<div>
|
||||
<span>Date of Birth</span> <hr /> {user.dob}
|
||||
</div>
|
||||
<div>
|
||||
<span>Mobile Number</span> <hr /> {user.mobile}
|
||||
</div>
|
||||
<div>
|
||||
<span>Email</span> <hr /> {user.email}
|
||||
</div>
|
||||
<div>
|
||||
<span>Address</span> <hr /> {user.address.houseNo},
|
||||
{user.address.street},{user.address.locality},
|
||||
{user.address.landmark},{user.address.village},
|
||||
{user.address.district.name},{user.address.state.name},
|
||||
{user.address.pincode}
|
||||
</div>
|
||||
<div>
|
||||
<span>Indian Resident</span> <hr />{' '}
|
||||
{user.indianResident ? 'Yes' : 'No'}
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.accordion__biometric}>
|
||||
<img
|
||||
src={user.photo}
|
||||
alt=''
|
||||
height='300px'
|
||||
className={styles.accordion__biometric_image}
|
||||
/>
|
||||
<Button
|
||||
sx={{margin: '10px 0px', padding: '20px'}}
|
||||
variant='contained'
|
||||
onClick={() => {
|
||||
handleOpen();
|
||||
}}
|
||||
>
|
||||
Documents
|
||||
</Button>
|
||||
<Button
|
||||
sx={{padding: '20px'}}
|
||||
variant='contained'
|
||||
onClick={() => {
|
||||
handleOpen();
|
||||
}}
|
||||
>
|
||||
Biometric
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<PopUpModal open={open} setOpen={setOpen} documents={user.documents} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Accordion;
|
|
@ -1,64 +0,0 @@
|
|||
.accordion {
|
||||
width: 800px;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
|
||||
.accordion__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
background-color: #2c3e50;
|
||||
color: #ecf0f1;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 4px -2px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.accordion__title:hover {
|
||||
background-color: #17212b;
|
||||
}
|
||||
|
||||
.accordion__title,
|
||||
.accordion__content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.accordion__subheading {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.accordion__content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: #2c3e50;
|
||||
border-radius: 10px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.accordion__demographic {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 60%;
|
||||
background-color: #ecf0f1;
|
||||
border-radius: 10px;
|
||||
margin-right: 10px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.accordion__biometric {
|
||||
width: 40%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.accordion__biometric_image {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.accordion__demographic div {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.accordion__demographic div span {
|
||||
font-weight: 700;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
import React from 'react'
|
||||
import styles from './BackButton.module.css'
|
||||
|
||||
const BackButton = ({ onClick, onChange }) => {
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
onClick={onClick}
|
||||
className={styles.submit}
|
||||
type="submit"
|
||||
onChange={onChange}
|
||||
>
|
||||
<img
|
||||
className={styles.submit__image}
|
||||
src={`${process.env.PUBLIC_URL}/assets/images/back.svg`}
|
||||
alt=""
|
||||
/>
|
||||
</button>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default BackButton
|
|
@ -1,20 +0,0 @@
|
|||
.submit {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 150px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
transition: 0.2s all;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.submit:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 3px 2px 22px 1px var(--color-shadow);
|
||||
}
|
||||
|
||||
.submit__image {
|
||||
height: 75px;
|
||||
width: 75px;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
import React from 'react';
|
||||
|
||||
import styles from './Button.module.css';
|
||||
|
||||
const Button = ({title, onClick, color}) => {
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
className={
|
||||
color === 'green' ? styles.button__green : styles.button__red
|
||||
}
|
||||
onClick={onClick}
|
||||
>
|
||||
{title}
|
||||
</button>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Button;
|
|
@ -1,19 +0,0 @@
|
|||
.button__green {
|
||||
font-size: 1rem;
|
||||
margin: 8px;
|
||||
padding: 20px 30px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
background-color: rgb(35, 151, 35);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.button__red {
|
||||
font-size: 1rem;
|
||||
margin: 8px;
|
||||
padding: 20px 30px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
background-color: #ff3333;
|
||||
color: #fff;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
import React from 'react';
|
||||
import styles from './Card.module.css';
|
||||
|
||||
const Card = ({title, image, onClick}) => {
|
||||
return (
|
||||
<div onClick={onClick} className={styles.card}>
|
||||
<img
|
||||
className={styles.card__image}
|
||||
src={image}
|
||||
alt=''
|
||||
height='200px'
|
||||
width='200px'
|
||||
/>
|
||||
<h2 className={styles.card__title}>{title}</h2>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Card;
|
|
@ -1,26 +0,0 @@
|
|||
@import '../../styles/GlobalVariables.css';
|
||||
|
||||
.card {
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 3px solid var(--color-black);
|
||||
border-radius: 10px;
|
||||
margin: 30px;
|
||||
transition: 0.2s all;
|
||||
cursor: pointer;
|
||||
color: var(--color-black);
|
||||
text-decoration-line: none;
|
||||
}
|
||||
|
||||
.card:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 3px 2px 22px 1px var(--color-shadow);
|
||||
}
|
||||
|
||||
.card__title {
|
||||
margin: 15px 0px;
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
import React, { useEffect } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { initialUserData } from '../../constants/userData'
|
||||
import { userContext } from '../../context/User'
|
||||
|
||||
import styles from './Error.module.css'
|
||||
|
||||
const Error = ({ message }) => {
|
||||
const navigate = useNavigate()
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
navigate('/')
|
||||
}, 3000)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.error}>
|
||||
<img
|
||||
src={`${process.env.PUBLIC_URL}/assets/images/error.svg`}
|
||||
className={styles.error__image}
|
||||
/>
|
||||
<h1 className={styles.error__title}>{message}</h1>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Error
|
|
@ -1,19 +0,0 @@
|
|||
.error {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.error__title {
|
||||
font-family: 'Barlow', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: var(--font-large);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.error__image {
|
||||
margin-left: 40px;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
import React from 'react';
|
||||
import styles from './Header.module.css';
|
||||
|
||||
const Header = ({subheading}) => {
|
||||
return (
|
||||
<header className={styles.header}>
|
||||
<img
|
||||
src={`${process.env.PUBLIC_URL}/favicon.ico`}
|
||||
className={styles.header__image}
|
||||
alt=''
|
||||
/>
|
||||
<h3 className={styles.header__subheading}>{subheading}</h3>
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
|
@ -1,20 +0,0 @@
|
|||
@import '../../styles/GlobalVariables.css';
|
||||
|
||||
.header {
|
||||
font-family: 'Fredoka One', cursive;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.header__subheading {
|
||||
font-size: var(--font-medium);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.header__image {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
import React from 'react';
|
||||
import {Modal, Box} from '@mui/material';
|
||||
import styles from './MessageModal.module.css';
|
||||
import Button from '../Button/Button';
|
||||
|
||||
const MessageModal = ({title, open, setOpen, onChange, onClick}) => {
|
||||
const style = {
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: 1000,
|
||||
bgcolor: 'background.paper',
|
||||
borderRadius: '10px',
|
||||
boxShadow: 24,
|
||||
p: 4,
|
||||
};
|
||||
|
||||
const handleClose = () => setOpen(false);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={handleClose}
|
||||
aria-labelledby='modal-modal-title'
|
||||
aria-describedby='modal-modal-description'
|
||||
>
|
||||
<Box sx={style}>
|
||||
<h1 id='modal-modal-title' className={styles.modal__title}>
|
||||
{title}
|
||||
</h1>
|
||||
<div className={styles.modal__content}>
|
||||
<textarea
|
||||
className={styles.modal__input}
|
||||
onChange={onChange}
|
||||
type='textarea'
|
||||
placeholder='Enter the reason for rejection'
|
||||
/>
|
||||
<Button color='red' title='Confirm Reject' onClick={onClick} />
|
||||
</div>
|
||||
</Box>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default MessageModal;
|
|
@ -1,23 +0,0 @@
|
|||
.modal__input {
|
||||
font-family: 'Barlow';
|
||||
width: 500px;
|
||||
min-height: 200px;
|
||||
margin: 10px 0px;
|
||||
padding: 18px 10px;
|
||||
border: 3px solid;
|
||||
border-radius: 10px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.modal__content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.modal__title {
|
||||
text-align: center;
|
||||
margin: 20px 0px 40px;
|
||||
font-size: var(--font-medium-large);
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
import React from 'react';
|
||||
import {Modal, Box} from '@mui/material';
|
||||
import styles from './Modal.module.css';
|
||||
import Tab from '@mui/material/Tab';
|
||||
import TabContext from '@mui/lab/TabContext';
|
||||
import TabList from '@mui/lab/TabList';
|
||||
import TabPanel from '@mui/lab/TabPanel';
|
||||
|
||||
const PopUpModal = ({documents, open, setOpen}) => {
|
||||
const style = {
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: 1000,
|
||||
bgcolor: 'background.paper',
|
||||
borderRadius: '10px',
|
||||
boxShadow: 24,
|
||||
p: 4,
|
||||
};
|
||||
|
||||
const [value, setValue] = React.useState('1');
|
||||
|
||||
const handleChange = (event, newValue) => {
|
||||
setValue(newValue);
|
||||
};
|
||||
|
||||
const handleClose = () => setOpen(false);
|
||||
|
||||
return (
|
||||
<div className={styles.modal}>
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={handleClose}
|
||||
aria-labelledby='modal-modal-title'
|
||||
aria-describedby='modal-modal-description'
|
||||
>
|
||||
<Box sx={style}>
|
||||
<TabContext value={value}>
|
||||
<Box sx={{borderBottom: 1, borderColor: 'divider'}}>
|
||||
<TabList onChange={handleChange}>
|
||||
<Tab label='Proof of Identity' value='1' />
|
||||
<Tab label='Proof of Address' value='2' />
|
||||
<Tab label='Proof of Date of Birth' value='3' />
|
||||
</TabList>
|
||||
</Box>
|
||||
<TabPanel
|
||||
value='1'
|
||||
sx={{
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
<img src={documents.POI} alt='' />
|
||||
</TabPanel>
|
||||
<TabPanel
|
||||
value='2'
|
||||
sx={{
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
<img src={documents.POA} alt='' />
|
||||
</TabPanel>
|
||||
<TabPanel
|
||||
value='3'
|
||||
sx={{
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
<img src={documents.DOB} alt='' />
|
||||
</TabPanel>
|
||||
</TabContext>
|
||||
</Box>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PopUpModal;
|
|
@ -1,21 +0,0 @@
|
|||
.modal {
|
||||
margin: 0px 15px;
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
right: 250px;
|
||||
}
|
||||
|
||||
.modal__title {
|
||||
text-align: center;
|
||||
margin: 20px 0px 40px;
|
||||
font-size: var(--font-medium-large);
|
||||
}
|
||||
|
||||
.modal__image {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.modal__content {
|
||||
width: 50%;
|
||||
font-size: var(--font-medium-sm);
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
import React from 'react'
|
||||
import CircularProgress from '@mui/material/CircularProgress'
|
||||
import Header from '../Header/Header'
|
||||
import styles from './Spinner.module.css'
|
||||
|
||||
const Spinner = ({ heading }) => {
|
||||
console.log(heading)
|
||||
return (
|
||||
<div className={styles.spinner}>
|
||||
<Header subheading={heading} />
|
||||
<CircularProgress />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Spinner
|
|
@ -1,6 +0,0 @@
|
|||
.spinner {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: url('../public/assets/images/background.png') no-repeat center center
|
||||
fixed;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Consolas, 'Courier New',
|
||||
monospace;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
import {BrowserRouter} from 'react-router-dom';
|
||||
import {QueryClient, QueryClientProvider} from 'react-query';
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
const root = ReactDOM.createRoot(document.getElementById('root'));
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<BrowserRouter>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<App />
|
||||
</QueryClientProvider>
|
||||
</BrowserRouter>
|
||||
</React.StrictMode>
|
||||
);
|
|
@ -1,115 +0,0 @@
|
|||
import React, {useState} from 'react';
|
||||
import Accordion from '../../components/Accordion/Accordion';
|
||||
import Button from '../../components/Button/Button';
|
||||
import Header from '../../components/Header/Header';
|
||||
import {
|
||||
deleteUser,
|
||||
getUnverifiedUsers,
|
||||
updateUser,
|
||||
} from '../../services/apiservice';
|
||||
import { useQuery, useMutation } from 'react-query';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import BackButton from '../../components/BackButton/BackButton';
|
||||
import { sendMessage } from '../../services/apiservice';
|
||||
import Spinner from '../../components/Spinner/Spinner';
|
||||
import TextField from '@mui/material/TextField';
|
||||
|
||||
import styles from './EnrollmentRequests.module.css';
|
||||
import MessageModal from '../../components/Modal/MessageModal';
|
||||
|
||||
const EnrollmentRequests = () => {
|
||||
const navigate = useNavigate();
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const [message, setMessage] = React.useState('');
|
||||
const { data, refetch, isLoading } = useQuery('unverified', getUnverifiedUsers);
|
||||
|
||||
const deleteUse = useMutation((payload) => deleteUser(payload));
|
||||
|
||||
const updateUse = useMutation((id) => updateUser(id, { verified: true }), {
|
||||
onSuccess: () => {
|
||||
refetch();
|
||||
},
|
||||
});
|
||||
|
||||
const setConfirm = useMutation((payload) => {
|
||||
sendMessage(payload);
|
||||
});
|
||||
|
||||
const handleModalClick = (item) => {
|
||||
deleteUse.mutate(item._id, {
|
||||
onSuccess: () => {
|
||||
setConfirm.mutate({
|
||||
mobile: `+91${item.mobile}`,
|
||||
message: message,
|
||||
});
|
||||
setOpen(false);
|
||||
refetch();
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const [inputText, setInputText] = useState("");
|
||||
|
||||
const inputHandler = (e) => {
|
||||
const lowerCase = e.target.value.toLowerCase();
|
||||
setInputText(lowerCase);
|
||||
};
|
||||
|
||||
const filteredData = data?.data?.filter((el) => {
|
||||
if (inputText === '') {
|
||||
return el;
|
||||
} else {
|
||||
return el.name.toLowerCase().includes(inputText);
|
||||
}
|
||||
})
|
||||
|
||||
if (isLoading) {
|
||||
return <Spinner heading='Admin' />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.unverified_users}>
|
||||
<Header subheading='Admin' />
|
||||
<h1 className={styles.unverified_users__heading}>Search</h1>
|
||||
<input
|
||||
className={styles.input__search}
|
||||
onChange={inputHandler}
|
||||
placeholder="Enter name of user to search"
|
||||
/>
|
||||
<BackButton onClick={() => navigate('/')} />
|
||||
<h1 className={styles.unverified_users__heading}>Enrollment Requests</h1>
|
||||
<div className={styles.accordion}>
|
||||
{data?.data?.length !== 0 ? (
|
||||
filteredData?.map((item) => (
|
||||
<div className={styles.unverified_users__accordion} key={item._id}>
|
||||
<Accordion name={item.name} user={item} />
|
||||
<Button
|
||||
title='Accept'
|
||||
color='green'
|
||||
onClick={() => updateUse.mutate(item._id)}
|
||||
/>
|
||||
<Button
|
||||
title='Reject'
|
||||
color='red'
|
||||
onClick={() => {
|
||||
setOpen(true);
|
||||
}}
|
||||
/>
|
||||
<MessageModal
|
||||
title='Reason for Reject'
|
||||
open={open}
|
||||
setOpen={setOpen}
|
||||
onChange={(e) => setMessage(e.target.value)}
|
||||
onClick={() => handleModalClick(item)}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<div className={styles.unverified_users__nodata}>No Data Found</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default EnrollmentRequests;
|
|
@ -1,38 +0,0 @@
|
|||
.unverified_users {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.unverified_users__heading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.accordion {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.unverified_users__accordion {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.unverified_users__nodata {
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.input__search {
|
||||
width: 400px;
|
||||
height: 60px;
|
||||
margin: 10px 0px 30px;
|
||||
padding: 18px 10px;
|
||||
border: 3px solid;
|
||||
border-radius: 10px;
|
||||
font-size: 1.25rem;
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
import React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
import Card from '../../components/Card/Card';
|
||||
import Header from '../../components/Header/Header';
|
||||
import styles from './Home.module.css';
|
||||
|
||||
const Home = ({page, setPage}) => {
|
||||
return (
|
||||
<>
|
||||
<Header subheading='Admin' />
|
||||
<div className={styles.card__container}>
|
||||
<Link to='/verified'>
|
||||
<Card
|
||||
title='Verified Users'
|
||||
image={`${process.env.PUBLIC_URL}/assets/images/verified.svg`}
|
||||
/>
|
||||
</Link>
|
||||
<Link to='/enrollment'>
|
||||
<Card
|
||||
title='Enrollment Requests'
|
||||
image={`${process.env.PUBLIC_URL}/assets/images/enrollment.svg`}
|
||||
/>
|
||||
</Link>
|
||||
<Link to='/update'>
|
||||
<Card
|
||||
title='Update Requests'
|
||||
image={`${process.env.PUBLIC_URL}/assets/images/update.svg`}
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
|
@ -1,4 +0,0 @@
|
|||
.card__container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
import React, { useState } from 'react';
|
||||
import Accordion from '../../components/Accordion/Accordion';
|
||||
import Button from '../../components/Button/Button';
|
||||
import Header from '../../components/Header/Header';
|
||||
import {
|
||||
deleteUser,
|
||||
getUpdatingUsers,
|
||||
updateUser,
|
||||
} from '../../services/apiservice';
|
||||
import { useQuery, useMutation } from 'react-query';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import styles from './UpdateRequests.module.css';
|
||||
import BackButton from '../../components/BackButton/BackButton';
|
||||
import Spinner from '../../components/Spinner/Spinner';
|
||||
|
||||
const UpdateRequests = () => {
|
||||
const navigate = useNavigate();
|
||||
const { data, isLoading, isError, refetch } = useQuery(
|
||||
'updating',
|
||||
getUpdatingUsers
|
||||
);
|
||||
const deleteUse = useMutation((id) => deleteUser(id), {
|
||||
onSuccess: () => {
|
||||
refetch();
|
||||
},
|
||||
});
|
||||
|
||||
const updateUse = useMutation((id) => updateUser(id, { verified: true }), {
|
||||
onSuccess: () => {
|
||||
refetch();
|
||||
},
|
||||
});
|
||||
|
||||
const [inputText, setInputText] = useState("");
|
||||
|
||||
const inputHandler = (e) => {
|
||||
const lowerCase = e.target.value.toLowerCase();
|
||||
setInputText(lowerCase);
|
||||
};
|
||||
|
||||
const filteredData = data?.data?.filter((el) => {
|
||||
if (inputText === '') {
|
||||
return el;
|
||||
} else {
|
||||
return el.name.toLowerCase().includes(inputText);
|
||||
}
|
||||
})
|
||||
|
||||
if (isLoading) {
|
||||
return <Spinner heading='Admin' />;
|
||||
}
|
||||
|
||||
if (isError) {
|
||||
return <div>Error</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.unverified_users}>
|
||||
<Header subheading='Admin' />
|
||||
<h1 className={styles.unverified_users__heading}>Search</h1>
|
||||
<input
|
||||
className={styles.input__search}
|
||||
onChange={inputHandler}
|
||||
placeholder="Enter name of user to search"
|
||||
/>
|
||||
<BackButton onClick={() => navigate('/')} />
|
||||
<h1 className={styles.unverified_users__heading}>Update Requests</h1>
|
||||
<div className={styles.accordion}>
|
||||
{data?.data.length !== 0 ? (
|
||||
filteredData?.map((item) => (
|
||||
<div className={styles.unverified_users__accordion} key={item._id}>
|
||||
<Accordion name={item.name} user={item} />
|
||||
<Button
|
||||
title='Accept'
|
||||
color='green'
|
||||
onClick={() => updateUse.mutate(item._id)}
|
||||
/>
|
||||
<Button
|
||||
title='Reject'
|
||||
color='red'
|
||||
onClick={() => deleteUse.mutate(item._id)}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<div className={styles.unverified_users__nodata}>No Data Found</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default UpdateRequests;
|
|
@ -1,38 +0,0 @@
|
|||
.unverified_users {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.unverified_users__heading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.accordion {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.unverified_users__accordion {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.unverified_users__nodata {
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.input__search {
|
||||
width: 400px;
|
||||
height: 60px;
|
||||
margin: 10px 0px 30px;
|
||||
padding: 18px 10px;
|
||||
border: 3px solid;
|
||||
border-radius: 10px;
|
||||
font-size: 1.25rem;
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
import React, { useState } from 'react';
|
||||
import Accordion from '../../components/Accordion/Accordion';
|
||||
import Header from '../../components/Header/Header';
|
||||
import { getVerifiedUsers } from '../../services/apiservice';
|
||||
import { useQuery } from 'react-query';
|
||||
|
||||
import styles from './VerifiedUsers.module.css';
|
||||
|
||||
const VerifiedUsers = () => {
|
||||
const { data } = useQuery('verified', getVerifiedUsers);
|
||||
|
||||
const [inputText, setInputText] = useState("");
|
||||
|
||||
const inputHandler = (e) => {
|
||||
const lowerCase = e.target.value.toLowerCase();
|
||||
setInputText(lowerCase);
|
||||
};
|
||||
|
||||
const filteredData = data?.data?.filter((el) => {
|
||||
if (inputText === '') {
|
||||
return el;
|
||||
} else {
|
||||
return el.name.toLowerCase().includes(inputText);
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div className={styles.verified_users}>
|
||||
<Header subheading='Admin' />
|
||||
<h1 className={styles.unverified_users__heading}>Search</h1>
|
||||
<input
|
||||
className={styles.input__search}
|
||||
onChange={inputHandler}
|
||||
placeholder="Enter name of user to search"
|
||||
/>
|
||||
<h1 className={styles.verified_users__heading}>Verified Users</h1>
|
||||
<div className='accordion'>
|
||||
{data?.data.length !== 0 ? (
|
||||
filteredData?.map((item) => (
|
||||
<div>
|
||||
<Accordion name={item.name} user={item} />
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<div className={styles.verified_users__nodata}>No Data Found</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default VerifiedUsers;
|
|
@ -1,25 +0,0 @@
|
|||
.verified_users {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.verified_users__heading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.verified_users__nodata {
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.input__search {
|
||||
width: 400px;
|
||||
height: 60px;
|
||||
margin: 10px 0px 30px;
|
||||
padding: 18px 10px;
|
||||
border: 3px solid;
|
||||
border-radius: 10px;
|
||||
font-size: 1.25rem;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
import React from 'react';
|
||||
import {Route, Routes} from 'react-router-dom';
|
||||
import Home from '../pages/Home/Home';
|
||||
import EnrollmentRequests from '../pages/EnrollmentRequests/EnrollmentRequests';
|
||||
import UpdateRequests from '../pages/UpdateRequests/UpdateRequests';
|
||||
import VerifiedUsers from '../pages/VerifiedUsers/VerifiedUsers';
|
||||
|
||||
const Index = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route exact path='/' element={<Home />} />
|
||||
<Route path='verified'>
|
||||
<Route index element={<VerifiedUsers />} />
|
||||
</Route>
|
||||
<Route path='enrollment'>
|
||||
<Route index element={<EnrollmentRequests />} />
|
||||
</Route>
|
||||
<Route path='update'>
|
||||
<Route index element={<UpdateRequests />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
);
|
||||
};
|
||||
|
||||
export default Index;
|
|
@ -1,35 +0,0 @@
|
|||
import axios from "axios";
|
||||
|
||||
const apiClient = axios.create({
|
||||
baseURL: "https://aadhaar-kiosk-server.onrender.com",
|
||||
});
|
||||
|
||||
export const getVerifiedUsers = async () => {
|
||||
const response = await apiClient.get("/users/verified");
|
||||
return response;
|
||||
};
|
||||
|
||||
export const getUnverifiedUsers = async () => {
|
||||
const response = await apiClient.get("/users/unverified");
|
||||
return response;
|
||||
};
|
||||
|
||||
export const updateUser = async (id, payload) => {
|
||||
const response = await apiClient.patch(`/user/${id}`, payload);
|
||||
return response;
|
||||
};
|
||||
|
||||
export const deleteUser = async (id) => {
|
||||
const response = await apiClient.delete(`/user/${id}`);
|
||||
return response;
|
||||
};
|
||||
|
||||
export const getUpdatingUsers = async () => {
|
||||
const response = await apiClient.get(`/users/updating`);
|
||||
return response;
|
||||
};
|
||||
|
||||
export const sendMessage = async (payload) => {
|
||||
const response = await apiClient.post("/messages", payload);
|
||||
return response;
|
||||
};
|
|
@ -1,12 +0,0 @@
|
|||
:root {
|
||||
--color-black: #000;
|
||||
--color-shadow: rgba(0, 0, 0, 0.24);
|
||||
|
||||
--font-large: 4rem;
|
||||
--font-medium-lm: 3rem;
|
||||
--font-medium-large: 2.5rem;
|
||||
--font-medium: 2rem;
|
||||
--font-medium-sm: 1.5rem;
|
||||
--font-medium-s: 1.25rem;
|
||||
--font-small: 1rem;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true
|
||||
},
|
||||
extends: ['plugin:react/recommended', 'standard'],
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
},
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module'
|
||||
},
|
||||
plugins: ['react'],
|
||||
rules: {
|
||||
'react/prop-types': 'off',
|
||||
indent: 'off'
|
||||
}
|
||||
}
|
23
client/.gitignore
vendored
|
@ -1,23 +0,0 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"semi": false,
|
||||
"trailingComma": "none",
|
||||
"singleQuote": true,
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"jsxBracketSameLine": false,
|
||||
"bracketSpacing": true
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
{
|
||||
"name": "aadhaar-kiosk-web-app",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.9.3",
|
||||
"@emotion/styled": "^11.9.3",
|
||||
"@mui/icons-material": "^5.8.4",
|
||||
"@mui/material": "^5.9.1",
|
||||
"@mui/styles": "^5.9.3",
|
||||
"@mui/x-date-pickers": "^5.0.0-beta.6",
|
||||
"@tensorflow-models/coco-ssd": "^2.2.2",
|
||||
"@tensorflow/tfjs": "^3.19.0",
|
||||
"axios": "^0.27.2",
|
||||
"country-state-city": "^3.0.1",
|
||||
"i18next": "^21.9.0",
|
||||
"i18next-browser-languagedetector": "^6.1.5",
|
||||
"i18next-xhr-backend": "^3.2.2",
|
||||
"moment": "^2.29.4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-i18next": "^11.18.4",
|
||||
"react-pincode": "^1.1.3",
|
||||
"react-query": "^3.39.2",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-scripts": "5.0.1",
|
||||
"react-select": "^5.4.0",
|
||||
"react-toastify": "^9.0.8",
|
||||
"react-webcam": "^7.0.1",
|
||||
"serve": "^14.1.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-n": "^15.0.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"prettier": "^2.7.1"
|
||||
}
|
||||
}
|