├── .gitignore ├── server ├── .gitignore ├── package.json ├── routes │ └── dashb.js ├── index.js └── mysql_connect.js ├── client ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── jasmine.png │ ├── manifest.json │ └── index.html ├── postcss.config.js ├── src │ ├── assets │ │ ├── jasmine.png │ │ └── Error.svg │ ├── index.css │ ├── webpack.config.js │ ├── components │ │ ├── Loader.jsx │ │ ├── Aside.jsx │ │ ├── ComplaintsViewer.jsx │ │ ├── ParkingSlot.jsx │ │ ├── ComplaintsViewerOwner.jsx │ │ ├── Particle.jsx │ │ ├── Header.jsx │ │ ├── CreatingParkingSlot.jsx │ │ ├── RaisingComplaints.jsx │ │ ├── RoomDetailsOwner.jsx │ │ ├── RoomDetails.jsx │ │ ├── PayMaintenance.jsx │ │ ├── Dashboard.jsx │ │ ├── TenantDetails.jsx │ │ ├── OwnerDetails.jsx │ │ ├── Auth.jsx │ │ ├── CreatingTenant.jsx │ │ └── CreatingOwner.jsx │ ├── HamContextProvider.js │ ├── index.jsx │ ├── ErrorPage.jsx │ └── App.jsx ├── tailwind.config.js ├── .gitignore └── package.json ├── assets ├── admin.png ├── login.png ├── owner.png ├── schema.png ├── tenant.png ├── employee.png └── er-diagram.png ├── README.md └── database └── export.sql /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | demo.html 3 | config_sql.js -------------------------------------------------------------------------------- /client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /assets/admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/assets/admin.png -------------------------------------------------------------------------------- /assets/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/assets/login.png -------------------------------------------------------------------------------- /assets/owner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/assets/owner.png -------------------------------------------------------------------------------- /assets/schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/assets/schema.png -------------------------------------------------------------------------------- /assets/tenant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/assets/tenant.png -------------------------------------------------------------------------------- /assets/employee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/assets/employee.png -------------------------------------------------------------------------------- /assets/er-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/assets/er-diagram.png -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/client/public/favicon.ico -------------------------------------------------------------------------------- /client/public/jasmine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/client/public/jasmine.png -------------------------------------------------------------------------------- /client/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /client/src/assets/jasmine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imtharun/apartment-management-system-dbms/HEAD/client/src/assets/jasmine.png -------------------------------------------------------------------------------- /client/src/index.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap"); 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | -------------------------------------------------------------------------------- /client/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: ["./src/**/*.{js,jsx,ts,tsx}"], 3 | theme: { 4 | fontFamily: { 5 | mons: ["Montserrat", "sans-serif"], 6 | }, 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | }; 11 | -------------------------------------------------------------------------------- /client/src/webpack.config.js: -------------------------------------------------------------------------------- 1 | const nrwlConfig = require("@nrwl/react/plugins/webpack.js"); 2 | 3 | module.exports = (config, context) => { 4 | // first call it so that @nrwl/react plugin adds its configs 5 | nrwlConfig(config); 6 | 7 | return { 8 | ...config, 9 | node: undefined, 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /client/src/components/Loader.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Hypnosis } from "react-cssfx-loading/lib"; 3 | 4 | const Loader = () => { 5 | return ( 6 |
7 | 8 |
9 | ); 10 | }; 11 | 12 | export default Loader; 13 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "nodemon index.js" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "cors": "^2.8.5", 14 | "express": "^4.18.1", 15 | "mongodb": "^4.7.0", 16 | "mysql": "^2.18.1" 17 | }, 18 | "devDependencies": { 19 | "nodemon": "^2.0.16" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/src/HamContextProvider.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | export const HamContext = React.createContext(); 4 | 5 | function HamContextProvider(props) { 6 | const [hamActive, setHamActive] = useState(false); 7 | 8 | const hamHandler = function () { 9 | setHamActive((prev) => !prev); 10 | }; 11 | 12 | return ( 13 | 14 | {props.children} 15 | 16 | ); 17 | } 18 | 19 | export default HamContextProvider; 20 | -------------------------------------------------------------------------------- /client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "jasmine.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "jasmine.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /client/src/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { Suspense } from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import { BrowserRouter } from "react-router-dom"; 4 | import "./index.css"; 5 | import Loader from "./components/Loader"; 6 | import HamContextProvider from "./HamContextProvider"; 7 | const App = React.lazy(() => import("./App")); 8 | 9 | const root = ReactDOM.createRoot(document.getElementById("root")); 10 | root.render( 11 | 12 | 13 | 14 | }> 15 | 16 | 17 | 18 | 19 | 20 | ); 21 | -------------------------------------------------------------------------------- /client/src/ErrorPage.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useNavigate } from "react-router-dom"; 3 | import Error from "./assets/Error.svg"; 4 | 5 | function ErrorPage() { 6 | const nav = useNavigate(); 7 | return ( 8 |
9 |
10 | Error 404 11 |
12 | 20 |
21 | ); 22 | } 23 | 24 | export default ErrorPage; 25 | -------------------------------------------------------------------------------- /client/src/components/Aside.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { NavLink } from "react-router-dom"; 3 | 4 | function Aside(props) { 5 | return ( 6 |
7 | 21 |
22 | ); 23 | } 24 | 25 | export default Aside; 26 | -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "appartment-management-system-dbms", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.12.4", 7 | "@material-ui/icons": "^4.11.3", 8 | "@testing-library/jest-dom": "^5.16.4", 9 | "@testing-library/react": "^13.2.0", 10 | "@testing-library/user-event": "^13.5.0", 11 | "axios": "^0.27.2", 12 | "react": "^18.1.0", 13 | "react-cssfx-loading": "^1.1.1", 14 | "react-dom": "^18.1.0", 15 | "react-router-dom": "^6.3.0", 16 | "react-scripts": "5.0.1", 17 | "react-tsparticles": "^2.0.6", 18 | "tsparticles": "^2.0.6", 19 | "web-vitals": "^2.1.4" 20 | }, 21 | "scripts": { 22 | "start": "react-scripts start", 23 | "build": "react-scripts build", 24 | "test": "react-scripts test", 25 | "eject": "react-scripts eject" 26 | }, 27 | "eslintConfig": { 28 | "extends": [ 29 | "react-app", 30 | "react-app/jest" 31 | ] 32 | }, 33 | "browserslist": { 34 | "production": [ 35 | ">0.2%", 36 | "not dead", 37 | "not op_mini all" 38 | ], 39 | "development": [ 40 | "last 1 chrome version", 41 | "last 1 firefox version", 42 | "last 1 safari version" 43 | ] 44 | }, 45 | "devDependencies": { 46 | "autoprefixer": "^10.4.7", 47 | "postcss": "^8.4.13", 48 | "tailwindcss": "^3.0.24" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /client/src/components/ComplaintsViewer.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-multi-str */ 2 | import React, { useEffect, useState } from "react"; 3 | import axios from "axios"; 4 | 5 | function ComplaintsViewer(props) { 6 | const [comps, setComps] = useState([]); 7 | 8 | const getComplaints = async () => { 9 | try { 10 | const res = await axios.get("http://localhost:5000/viewcomplaints"); 11 | setComps(res.data); 12 | } catch (err) { 13 | console.log(err); 14 | } 15 | }; 16 | 17 | useEffect(() => { 18 | getComplaints(); 19 | }, []); 20 | 21 | return ( 22 |
23 | {comps.map((ele, index) => { 24 | return ( 25 | ele.complaints && 26 | ele.room_no && ( 27 |
31 |
32 |

33 | Room No 34 |

35 |

{ele.room_no}

36 |
37 |
38 |

39 | Complaints 40 |

41 |

{ele.complaints}

42 |
43 |
44 | ) 45 | ); 46 | })} 47 |
48 | ); 49 | } 50 | 51 | export default ComplaintsViewer; 52 | -------------------------------------------------------------------------------- /client/src/components/ParkingSlot.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useState, useEffect } from "react"; 3 | 4 | function ParkingSlot(props) { 5 | const [parkingSlot, setParkingSlot] = useState([]); 6 | 7 | const slots = async () => { 8 | try { 9 | const res = await axios.post("http://localhost:5000/viewparking", { 10 | userId: JSON.parse(localStorage.getItem("whom")).username, 11 | }); 12 | setParkingSlot(res.data); 13 | } catch (error) { 14 | console.log(error); 15 | } 16 | }; 17 | 18 | useEffect(() => { 19 | slots(); 20 | }, []); 21 | return ( 22 |
23 |
24 |

Parking Slot

25 |
26 |
27 | {parkingSlot.map((ele, index) => { 28 | if (ele.parking_slot === null) { 29 | return ( 30 |
34 |

No parking slot alloted

35 |
36 | ); 37 | } else { 38 | return ( 39 |
40 |

Slot no

41 |

{ele.parking_slot}

42 |
43 | ); 44 | } 45 | // console.log(ele); 46 | })} 47 |
48 |
49 | ); 50 | } 51 | 52 | export default ParkingSlot; 53 | -------------------------------------------------------------------------------- /client/src/components/ComplaintsViewerOwner.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-multi-str */ 2 | import React, { useEffect, useState } from "react"; 3 | import axios from "axios"; 4 | 5 | function ComplaintsViewer(props) { 6 | const [comps, setComps] = useState([]); 7 | 8 | const getComplaints = async () => { 9 | try { 10 | const res = await axios.post("http://localhost:5000/ownercomplaints", { 11 | userId: JSON.parse(localStorage.getItem("whom")).username, 12 | }); 13 | setComps(res.data); 14 | } catch (error) { 15 | console.log(error); 16 | } 17 | }; 18 | 19 | useEffect(() => { 20 | getComplaints(); 21 | }, []); 22 | return ( 23 |
24 | {comps.map((ele, index) => { 25 | return ( 26 | ele.complaints && 27 | ele.room_no && ( 28 |
32 |
33 |

34 | Room No 35 |

36 |

{ele.room_no}

37 |
38 |
39 |

40 | Complaints 41 |

42 |

{ele.complaints}

43 |
44 |
45 | ) 46 | ); 47 | })} 48 |
49 | ); 50 | } 51 | 52 | export default ComplaintsViewer; 53 | -------------------------------------------------------------------------------- /client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | Jasmine Apartment 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /client/src/components/Particle.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Particles from "react-tsparticles"; 3 | import { loadFull } from "tsparticles"; 4 | 5 | function Particle() { 6 | const particlesInit = async (main) => { 7 | // console.log(main); 8 | await loadFull(main); 9 | }; 10 | 11 | const particlesLoaded = (container) => { 12 | // console.log(container); 13 | }; 14 | return ( 15 | 92 | ); 93 | } 94 | 95 | export default Particle; 96 | -------------------------------------------------------------------------------- /server/routes/dashb.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const router = express.Router(); 3 | const cors = require("cors") 4 | const app = express(); 5 | router.use(cors()); 6 | const db = require('../mysql_connect'); 7 | // const pg = require('../postgre_connect') 8 | 9 | 10 | 11 | //values for admin dashboard 12 | router.post("/admin",(req,res)=> 13 | { 14 | console.log(req.body); 15 | let resdata; 16 | let totalowner; 17 | let totaltenant; 18 | let totalemployee; 19 | 20 | let resul = db.totalowner((err,result)=> 21 | { 22 | if(err) console.log(err); 23 | var resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 24 | totalowner = resultArray; 25 | }); 26 | resul = db.totaltenant((err,result)=> 27 | { 28 | if(err) console.log(err); 29 | var resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 30 | totaltenant = resultArray; 31 | }); 32 | resul = db.totalemployee((err,result)=> 33 | { 34 | if(err) console.log(err); 35 | var resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 36 | totalemployee = resultArray; 37 | }); 38 | resul =db.getdata('tenant',(err,result)=>{ 39 | if(err) console.log(err); 40 | tenantdata = result; 41 | resdata = { 42 | totalowner : totalowner, 43 | totaltenant: totaltenant, 44 | totalemployee: totalemployee, 45 | } 46 | res.send(resdata); 47 | }) 48 | 49 | }) 50 | 51 | 52 | 53 | //values for owner dashboard 54 | router.post("/owner",(req,res)=> 55 | { 56 | let resdata; 57 | let totaltenant; 58 | let totalcomplaint; 59 | let totalemployee; 60 | 61 | resul = db.totaltenant((err,result)=> 62 | { 63 | if(err) console.log(err); 64 | var resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 65 | totaltenant = resultArray; 66 | }); 67 | resul = db.totalcomplaint((err,result)=> 68 | { 69 | if(err) console.log(err); 70 | let resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 71 | totalcomplaint = resultArray; 72 | }); 73 | 74 | resul = db.totalemployee((err,result)=> 75 | { 76 | if(err) console.log(err); 77 | let resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 78 | totalemployee = resultArray; 79 | resdata = { 80 | totaltenant : totaltenant, 81 | totalcomplaint : totalcomplaint, 82 | totalemployee : totalemployee 83 | } 84 | res.send(resdata); 85 | }) 86 | }) 87 | 88 | 89 | //values for 90 | router.post("/employee",(req,res)=> 91 | { 92 | let totalcomplaint; 93 | const empid = req.body.userId; 94 | let sal; 95 | resul = db.empsalary(empid,(err,result)=> 96 | { 97 | if(err) console.log(err); 98 | let resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 99 | sal = resultArray; 100 | }) 101 | resul = db.totalcomplaint((err,result)=> 102 | { 103 | if(err) console.log(err); 104 | let resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 105 | totalcomplaint = resultArray; 106 | resdata = 107 | { 108 | salary : sal, 109 | totalcomplaint : totalcomplaint 110 | } 111 | res.send(resdata); 112 | }); 113 | }) 114 | 115 | router.post("/tenant",(req,res)=> 116 | { 117 | const username = req.body.userId; 118 | const rest = db.gettenantdata(username,(err,result)=> 119 | { 120 | if(err) console.log(err); 121 | res.send(result); 122 | }) 123 | 124 | }); 125 | 126 | module.exports = router; -------------------------------------------------------------------------------- /client/src/components/Header.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from "react"; 2 | import { NavLink, useNavigate } from "react-router-dom"; 3 | import { HamContext } from "../HamContextProvider"; 4 | import jasmineImage from "./../assets/jasmine.png"; 5 | 6 | function Header(props) { 7 | const nav = useNavigate(); 8 | 9 | const logoutHandler = function () { 10 | localStorage.clear(); 11 | nav("/", { replace: true }); 12 | }; 13 | 14 | const { hamActive, hamHandler } = useContext(HamContext); 15 | const user = JSON.parse(localStorage.getItem("whom")).userType; 16 | return ( 17 | 95 | ); 96 | } 97 | 98 | export default Header; 99 | -------------------------------------------------------------------------------- /client/src/components/CreatingParkingSlot.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useState, useRef } from "react"; 3 | 4 | function CreatingParkingSlot() { 5 | const roomEl = useRef(null); 6 | const slotNoEl = useRef(null); 7 | const [roomNo, setRoomno] = useState(""); 8 | const [slotNo, setSlotNo] = useState(""); 9 | 10 | const createSlot = async () => { 11 | try { 12 | const res = await axios.post("http://localhost:5000/bookslot", { 13 | roomNo: roomNo, 14 | slotNo: slotNo, 15 | }); 16 | if (res.status === 200) { 17 | roomEl.current.value = ""; 18 | slotNoEl.current.value = ""; 19 | } 20 | } catch (error) { 21 | console.log(error); 22 | } 23 | }; 24 | 25 | const submitHandler = function (e) { 26 | e.preventDefault(); 27 | createSlot(); 28 | }; 29 | return ( 30 |
31 |
32 |
33 |
34 |
35 |
36 |

37 | Parking Slot 38 |

39 |
40 |
41 | 47 | { 52 | setRoomno(roomEl.current.value); 53 | }} 54 | name="Room no" 55 | id="Room no" 56 | placeholder="Enter your Room no" 57 | required 58 | className="w-full px-3 py-2 placeholder-gray-300 border border-gray-300 rounded-md focus:outline-none focus:ring focus:ring-indigo-100 focus:border-indigo-300 " 59 | /> 60 |
61 | 62 |
63 | 69 | { 74 | setSlotNo(slotNoEl.current.value); 75 | }} 76 | name="pno" 77 | id="pno" 78 | placeholder="Enter Parking slot number" 79 | required 80 | className="w-full px-3 py-2 placeholder-gray-300 border border-gray-300 rounded-md focus:outline-none focus:ring focus:ring-indigo-100 focus:border-indigo-300 " 81 | /> 82 |
83 | 84 |
85 | 91 |
92 |

96 |
97 |
98 |
99 |
100 |
101 | ); 102 | } 103 | 104 | export default CreatingParkingSlot; 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apartment Management System 2 | 3 | We created this project as a part of Database Management System Course. 4 | # Contents 5 | - Project Description 6 | - Basic Structure 7 | - Functionalities 8 | - ER Diagram 9 | - Database Schema 10 | - Screenshots of the Interface 11 | - Tech Stack 12 | - How to Run 13 | - Contributors 14 | 15 | # Project Description 16 | 17 | In this project we created a Apartment management system with user interface and database support.This project is a part of our curriculum, here we solved the problem of manual entry of data in apartments by creating user interface and storing data in mysql database. 18 | 19 | # Basic Structure 20 | 21 | ## Functionalities 22 | 23 | - Admin 24 | - Admin can login. 25 | - Admin can view the tenant and owner details. 26 | - Admin can create owner. 27 | - Admin can allot parking slot. 28 | - Admin can view the complaints. 29 | - Admin can see total Owners. 30 | - Admin can see total Tenants. 31 | - Admin can see total Employee. 32 | - Owner 33 | - Owner can see the Tenant details of his/her owned room. 34 | - Owner can create Tenant. 35 | - Owner can see the complaints from his/her owned room. 36 | - Owner can see the Room Details. 37 | - Owner can see Total Complaint. 38 | - Owner can see Number of Employee. 39 | - Tenant 40 | 41 | - Tenant can see the alloted parking slot. 42 | - Tenant can pay maintenance fee. 43 | - Tenant can raise complaints. 44 | - Tenant can see his/her Tenant id. 45 | - Tenant can see his/her Name. 46 | - Tenant can see his/her Age. 47 | - Tenant can see his/her DOB. 48 | - Tenant can see his/her Room no. 49 | 50 | - Employee 51 | 52 | - Employee can see all the complaints. 53 | - Employee can see Total number of Complaints 54 | 55 | - All the admins, owners, tenant, employees can login and logout. 56 | 57 | ## ER Diagram 58 | 59 | 60 | 61 | ## Database Schema 62 | 63 | database-schema 64 | 65 | ## Screenshots of the Implementation 66 | 67 | ### Admin dashboard 68 | 69 | admin-dashboard 70 | 71 | ### Owner dashboard 72 | 73 | owner-dashboard 74 | 75 | ### Tenant dashboard 76 | 77 | tenant-dashboard 78 | 79 | ### Employee dashboard 80 | 81 | employee-dashboard 82 | 83 | # Tech Stack 84 | 85 | - Frontend - HTML5, Tailwind css, React JS 86 | - Backend - NodeJS, ExpressJS 87 | - Database - MySql 88 | 89 | # How to Run 90 | 91 | - First, clone the github repo 92 | - Then, install the dependencies by opening the terminal with path as that of cloned github folder and do the following 93 | 94 | - For Client side, cd client 95 | 96 | npm install 97 | 98 | - For Server side, cd server 99 | 100 | npm install 101 | 102 | - Install MySql workbench if you don't have one, and then import the export.sql file under database folder in workbench. 103 | 104 | - Then in server folder create a file "config_sql.js" add localhost name, database name, username and password of your sql workbench and export it. 105 | 106 | - Now to run, type the following 107 | 108 | - For client, 109 | 110 | npm run start 111 | 112 | - For sever, 113 | npm run start 114 | 115 | - Now, you can use the project. 116 | 117 | # Contributors 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
D K Suryah
D K Suryah

Tharunprasth A S
Tharunprasath A S

Yuvarraj S
Yuvarraj S

Shivanesh S
Shivanesh S

128 | 129 | `Thank you!🧑‍💻` 130 | -------------------------------------------------------------------------------- /client/src/components/RaisingComplaints.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useState, useRef } from "react"; 3 | 4 | function RaisingComplaints() { 5 | const blockEl = useRef(null); 6 | const roomEl = useRef(null); 7 | const descpEl = useRef(null); 8 | const tenantEl = useRef(null); 9 | 10 | const [blockno, setBlockno] = useState(""); 11 | const [roomno, setRoomno] = useState(""); 12 | const [tenantId, setTenantId] = useState(""); 13 | const [descp, setDescp] = useState(""); 14 | 15 | const raiseComplaint = async () => { 16 | try { 17 | const res = await axios.post("http://localhost:5000/raisingcomplaint", { 18 | blockno: blockno, 19 | roomno: roomno, 20 | tenantId: tenantId, 21 | descp: descp, 22 | }); 23 | if (res.status === 200) { 24 | blockEl.current.value = ""; 25 | roomEl.current.value = ""; 26 | descpEl.current.value = ""; 27 | tenantEl.current.value = ""; 28 | } 29 | } catch (err) { 30 | console.log(err); 31 | } 32 | }; 33 | 34 | const submitHandler = function (e) { 35 | e.preventDefault(); 36 | raiseComplaint(); 37 | }; 38 | 39 | return ( 40 |
41 |
42 |
43 |

44 | Add Complaint 45 |

46 |
47 | 53 | { 58 | setRoomno(roomEl.current.value); 59 | }} 60 | placeholder="Room no" 61 | id="room-no" 62 | className="ml-5 outline-none py-1 px-2 mb-3 text-md border-2 rounded-md" 63 | /> 64 |
65 | 71 | { 76 | setBlockno(blockEl.current.value); 77 | }} 78 | placeholder="Block no" 79 | id="block-no" 80 | className="ml-6 outline-none py-1 px-2 text-md border-2 rounded-md" 81 | /> 82 |
83 |
84 | 90 | { 95 | setTenantId(tenantEl.current.value); 96 | }} 97 | placeholder="Tenant id" 98 | id="tenant-no" 99 | className="ml-5 outline-none py-1 my-3 px-2 text-md border-2 rounded-md" 100 | /> 101 |
102 |
103 |
104 | 110 | 122 |
123 | 126 |
127 |
128 |
129 | ); 130 | } 131 | 132 | export default RaisingComplaints; 133 | -------------------------------------------------------------------------------- /client/src/components/RoomDetailsOwner.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import axios from "axios"; 3 | 4 | function RoomDetails(props) { 5 | const roomDetailsHeader = [ 6 | "Tenant id", 7 | "Name", 8 | "Age", 9 | "dob", 10 | "Status", 11 | "Room no", 12 | ]; 13 | 14 | const [roomRows, setRoomRows] = useState([]); 15 | 16 | const getRoomDetails = async () => { 17 | try { 18 | const res = await axios.post("http://localhost:5000/ownertenantdetails", { 19 | userId: JSON.parse(window.localStorage.getItem("whom")).username, 20 | }); 21 | setRoomRows(res.data); 22 | } catch (error) { 23 | console.log(error); 24 | } 25 | }; 26 | 27 | useEffect(() => { 28 | getRoomDetails(); 29 | }, []); 30 | 31 | return ( 32 |
33 |
34 |
35 |
36 |
37 | 38 | 39 | 40 | {roomDetailsHeader.map((ele, index) => { 41 | return ( 42 | 59 | ); 60 | })} 61 | 62 | 63 | 64 | {/* */} 65 | {roomRows.map((ele, index) => { 66 | return ( 67 | 68 | 81 | 94 | 107 | 120 | 133 | 146 | 147 | ); 148 | })} 149 | 150 |
57 | {ele} 58 |
79 | {ele.tenant_id} 80 | 92 | {ele.name} 93 | 105 | {ele.age} 106 | 118 | {ele.dob} 119 | 131 | {ele.stat} 132 | 144 | {ele.room_no} 145 |
151 |
152 |
153 |
154 |
155 |
156 | ); 157 | } 158 | 159 | export default RoomDetails; 160 | -------------------------------------------------------------------------------- /client/src/components/RoomDetails.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import axios from "axios"; 3 | 4 | function RoomDetails(props) { 5 | const roomDetailsHeader = [ 6 | "Room no", 7 | "Room Type", 8 | "Floor no", 9 | "Register no", 10 | "Block no", 11 | "Parking Slot", 12 | ]; 13 | const [roomRows, setRoomRows] = useState([]); 14 | 15 | const getRoomRows = async () => { 16 | try { 17 | const res = await axios.post("http://localhost:5000/ownerroomdetails", { 18 | userId: JSON.parse(window.localStorage.getItem("whom")).username, 19 | }); 20 | setRoomRows(res.data); 21 | } catch (error) { 22 | console.log(error); 23 | } 24 | }; 25 | 26 | useEffect(() => { 27 | getRoomRows(); 28 | }, []); 29 | 30 | return ( 31 |
32 |
33 |
34 |
35 |
36 | 37 | 38 | 39 | {roomDetailsHeader.map((ele, index) => { 40 | return ( 41 | 58 | ); 59 | })} 60 | 61 | 62 | 63 | {/* */} 64 | {roomRows.map((ele, index) => { 65 | return ( 66 | 67 | 80 | 93 | 106 | 119 | 132 | 145 | 146 | ); 147 | })} 148 | 149 |
56 | {ele} 57 |
78 | {ele.room_no} 79 | 91 | {ele.type} 92 | 104 | {ele.floor} 105 | 117 | {ele.reg_no} 118 | 130 | {ele.block_no} 131 | 143 | {ele.parking_slot} 144 |
150 |
151 |
152 |
153 |
154 |
155 | ); 156 | } 157 | 158 | export default RoomDetails; 159 | -------------------------------------------------------------------------------- /client/src/components/PayMaintenance.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useState } from "react"; 3 | import { useEffect } from "react"; 4 | // import { useEffect } from "react"; 5 | 6 | function PayMaintenance(props) { 7 | const maintenanceHeader = ["Name", "Tenant no", "Room no", "Status"]; 8 | const [isPaid, setIsPaid] = useState(false); 9 | 10 | const [rows, setRows] = useState([]); 11 | 12 | const pay = async () => { 13 | try { 14 | const res = await axios.post(`http://localhost:5000/dashboard/tenant`, { 15 | userId: JSON.parse(window.localStorage.getItem("whom")).username, 16 | }); 17 | const [result] = res.data; 18 | setRows(result); 19 | setIsPaid(result.stat === "paid"); 20 | } catch (error) { 21 | console.log(error); 22 | } 23 | }; 24 | 25 | useEffect(() => { 26 | pay(); 27 | }, []); 28 | 29 | useEffect(() => { 30 | axios 31 | .post("http://localhost:5000/paymaintanance", { 32 | userId: JSON.parse(localStorage.getItem("whom")).username, 33 | status: "Paid", 34 | }) 35 | .then((res) => { 36 | // console.log(res); 37 | }) 38 | .catch((err) => { 39 | // console.log(err); 40 | }); 41 | }, [isPaid]); 42 | 43 | return ( 44 |
45 |
46 |
47 |
48 |
49 | 50 | 51 | 52 | {maintenanceHeader.map((ele, index) => { 53 | return ( 54 | 71 | ); 72 | })} 73 | 74 | 75 | 76 | {/* */} 77 | 78 | 79 | 92 | 105 | 118 | 144 | 145 | 146 |
69 | {ele} 70 |
90 | {rows.name} 91 | 103 | {rows.room_no} 104 | 116 | {rows.tenant_id} 117 | 129 | {!isPaid ? ( 130 | 138 | ) : ( 139 | 140 | Paid 141 | 142 | )} 143 |
147 |
148 |
149 |
150 |
151 |
152 | ); 153 | } 154 | 155 | export default PayMaintenance; 156 | -------------------------------------------------------------------------------- /client/src/components/Dashboard.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useContext, useState, useEffect } from "react"; 3 | import { HamContext } from "../HamContextProvider"; 4 | 5 | function Dashboard(props) { 6 | const { hamActive, hamHandler } = useContext(HamContext); 7 | const [forBox, setForBox] = useState(); 8 | 9 | const getBoxInfo = async () => { 10 | const whom = JSON.parse(window.localStorage.getItem("whom")).userType; 11 | try { 12 | const res = await axios.post(`http://localhost:5000/dashboard/${whom}`, { 13 | userId: JSON.parse(window.localStorage.getItem("whom")).username, 14 | }); 15 | if (whom === "admin") { 16 | const forAdminBox = [ 17 | { "Total Owner": 59 }, 18 | { "Total Tenant": 39 }, 19 | { "Total Employee": 20 }, 20 | ]; 21 | forAdminBox[0]["Total Owner"] = res.data.totalowner; 22 | forAdminBox[2]["Total Employee"] = res.data.totalemployee; 23 | forAdminBox[1]["Total Tenant"] = res.data.totaltenant; 24 | setForBox(forAdminBox); 25 | } 26 | if (whom === "owner") { 27 | const forOwnerBox = [ 28 | { "No of Emloyees": 5 }, 29 | // { "Total Tenant": 4 }, 30 | { "Total complaints": 2 }, 31 | ]; 32 | forOwnerBox[0]["No of Emloyees"] = res.data.totalemployee; 33 | // forOwnerBox[1]["Total Tenant"] = res.data.totaltenant; 34 | forOwnerBox[1]["Total complaints"] = res.data.totalcomplaint; 35 | setForBox(forOwnerBox); 36 | } 37 | if (whom === "employee") { 38 | const forEmployeeBox = [ 39 | { "Total complaints": 31 }, 40 | { Salary: "Rs. 20,0000" }, 41 | ]; 42 | forEmployeeBox[0]["Total complaints"] = res.data.totalcomplaint; 43 | forEmployeeBox[1].Salary = "Rs. " + res.data.salary; 44 | setForBox(forEmployeeBox); 45 | } 46 | if (whom === "tenant") { 47 | const forTenantBox = [ 48 | { "tenant id": 12132 }, 49 | { "Tenant Name": "Tharun" }, 50 | { "Tenant age": 20 }, 51 | { dob: "12-1-2002" }, 52 | { "Room no": 123456 }, 53 | ]; 54 | forTenantBox[0]["tenant id"] = res.data[0].tenant_id; 55 | forTenantBox[1]["Tenant Name"] = res.data[0].name; 56 | forTenantBox[2]["Tenant age"] = res.data[0].age; 57 | forTenantBox[3].dob = res.data[0].dob; 58 | forTenantBox[4]["Room no"] = res.data[0].room_no; 59 | setForBox(forTenantBox); 60 | } 61 | } catch (error) { 62 | console.log(error); 63 | } 64 | }; 65 | 66 | useEffect(() => { 67 | getBoxInfo(); 68 | }, []); 69 | 70 | return ( 71 |
{ 73 | if (hamActive === true) { 74 | hamHandler(); 75 | } 76 | }} 77 | style={{ 78 | filter: hamActive ? "blur(2px)" : "blur(0px)", 79 | }} 80 | className="w-screen" 81 | > 82 |
83 | {forBox && 84 | forBox.map((ele, index) => { 85 | return ( 86 |
87 |

88 | {Object.values(forBox[index])} 89 |

90 |

91 | {Object.keys(forBox[index])} 92 |

93 |
94 | ); 95 | })} 96 |
97 |
98 |
99 |
100 |

101 | Apartment Rules and Regulation 102 |

103 |
104 |
    105 |
  1. Tenant shall keep premises in good condition.
  2. 106 |
  3. Tenant shall not interfere with other tenant's premises.
  4. 107 |
  5. Tenant shall pay rent promptly on the due date.
  6. 108 |
  7. 109 | Tenant shall not make any alterations to the premises without 110 | written permission of the landlord. 111 |
  8. 112 |
  9. 113 | Tenant shall keep proper liability, fire and/or other damage 114 | insurance on the contents of the premises leased. 115 |
  10. 116 |
  11. 117 | Tenants shall not receive a refund of the damage deposit until 118 | landlord is certain that the premises are free of damages upon the 119 | surrender of the premises. 120 |
  12. 121 |
  13. 122 | No tenant shall interfere in any manner with any portion either of 123 | the heating or lighting or other apparatus in or about the 124 | building. 125 |
  14. 126 |
  15. 127 | Automobiles must be kept within yellow lines of the parking lot 128 | areas. 129 |
  16. 130 |
  17. 131 | Sanitary napkins shall not be deposited in toilets but shall be 132 | wrapped and deposited with other waste matter and refuse. 133 |
  18. 134 |
  19. 135 | Tenant shall be responsible for closing of windows in his or her 136 | apartment during storms. 137 |
  20. 138 |
139 |
140 |
141 |
142 | ); 143 | } 144 | 145 | export default Dashboard; 146 | -------------------------------------------------------------------------------- /client/src/components/TenantDetails.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useEffect, useState } from "react"; 3 | 4 | function TenantDetails(props) { 5 | const header = ["Tenant no", "Room_no", "Name", "Age", "DOB", "Stat"]; 6 | 7 | const [tenantRows, setTenantRows] = useState([]); 8 | 9 | const getTenantRows = async () => { 10 | try { 11 | const res = await axios.get("http://localhost:5000/tenantDetails"); 12 | setTenantRows(res.data); 13 | } catch (error) { 14 | console.log(error); 15 | } 16 | }; 17 | 18 | useEffect(() => { 19 | getTenantRows(); 20 | }, []); 21 | 22 | return ( 23 |
24 |
25 |
26 |
27 |
28 | 29 | 30 | 31 | {header.map((ele, index) => { 32 | return ( 33 | 50 | ); 51 | })} 52 | 53 | 54 | 55 | {/* */} 56 | {tenantRows.map((ele, index) => { 57 | return ( 58 | 59 | 72 | 85 | 98 | 111 | 124 | 137 | 138 | ); 139 | })} 140 | 141 |
48 | {ele} 49 |
70 | {ele.tenant_id} 71 | 83 | {ele.room_no} 84 | 96 | {ele.name} 97 | 109 | {ele.age} 110 | 122 | {ele.dob} 123 | 135 | {ele.stat} 136 |
142 |
143 |
144 |
145 |
146 |
147 | ); 148 | } 149 | 150 | export default TenantDetails; 151 | -------------------------------------------------------------------------------- /client/src/components/OwnerDetails.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import React, { useEffect, useState } from "react"; 3 | 4 | function OwnerDetails(props) { 5 | const oHeader = [ 6 | "Owner Id", 7 | "Name", 8 | "Age", 9 | "Room no", 10 | "DOB", 11 | "Agreement Status", 12 | ]; 13 | const [ownerRows, setOwnerRows] = useState([]); 14 | 15 | const getOwnerData = async () => { 16 | try { 17 | const res = await axios.get("http://localhost:5000/ownerdetails"); 18 | setOwnerRows(res.data); 19 | } catch (error) { 20 | console.log(error); 21 | } 22 | }; 23 | 24 | useEffect(() => { 25 | getOwnerData(); 26 | }, []); 27 | 28 | return ( 29 |
30 |
31 |
32 |
33 |
34 | 35 | 36 | 37 | {oHeader.map((ele, index) => { 38 | return ( 39 | 56 | ); 57 | })} 58 | 59 | 60 | 61 | {/* */} 62 | {ownerRows.map((ele, index) => { 63 | return ( 64 | 65 | 78 | 91 | 104 | 117 | 130 | 143 | 144 | ); 145 | })} 146 | 147 |
54 | {ele} 55 |
76 | {ele.owner_id} 77 | 89 | {ele.name} 90 | 102 | {ele.room_no} 103 | 115 | {ele.age} 116 | 128 | {ele.dob} 129 | 141 | {ele.aggrement_status} 142 |
148 |
149 |
150 |
151 |
152 |
153 | ); 154 | } 155 | 156 | export default OwnerDetails; 157 | -------------------------------------------------------------------------------- /client/src/components/Auth.jsx: -------------------------------------------------------------------------------- 1 | import React, { useRef, useState, useEffect } from "react"; 2 | import axios from "axios"; 3 | import { useNavigate } from "react-router-dom"; 4 | import Particle from "./Particle"; 5 | 6 | function Auth(props) { 7 | const nav = useNavigate(); 8 | const inputEl = useRef(null); 9 | const passEl = useRef(null); 10 | const [isName, setIsName] = useState(true); 11 | const [isPassword, setIsPassword] = useState(true); 12 | const [userId, setUserId] = useState(""); 13 | const [password, setPassword] = useState(""); 14 | 15 | useEffect(() => { 16 | if ( 17 | inputEl.current.value === "" || 18 | userId.toUpperCase().charAt(0) === "A" || 19 | userId.toUpperCase().charAt(0) === "O" || 20 | userId.toUpperCase().charAt(0) === "E" || 21 | userId.toUpperCase().charAt(0) === "T" 22 | ) { 23 | setIsName(true); 24 | return; 25 | } else { 26 | setIsName(false); 27 | } 28 | }, [userId]); 29 | 30 | useEffect(() => { 31 | if (password.length === 0) { 32 | setIsPassword(true); 33 | return; 34 | } else if (password.length < 6) { 35 | setIsPassword(false); 36 | } else { 37 | setIsPassword(true); 38 | } 39 | }, [password]); 40 | 41 | const authorize = async () => { 42 | try { 43 | const res = await axios.post("http://localhost:5000/auth", { 44 | username: userId, 45 | password: password, 46 | }); 47 | if (res.data.access === "granted") { 48 | window.localStorage.setItem( 49 | "whom", 50 | JSON.stringify({ 51 | userType: res.data.user, 52 | username: userId, 53 | }) 54 | ); 55 | if (res.data.user === "employee") { 56 | nav("/employee", { replace: true }); 57 | } 58 | if (res.data.user === "admin") { 59 | nav("/admin", { replace: true }); 60 | } 61 | if (res.data.user === "tenant") { 62 | nav("/tenant", { replace: true }); 63 | } 64 | if (res.data.user === "owner") { 65 | nav("/owner", { replace: true }); 66 | } 67 | if (res.data.user === "unknown") { 68 | setIsName(false); 69 | } else if (res.data.user === "passunknown") { 70 | setIsPassword(false); 71 | } 72 | } else { 73 | setIsName(false); 74 | setIsPassword(false); 75 | } 76 | } catch (error) { 77 | console.log(error); 78 | } 79 | }; 80 | 81 | const submitHandler = function (e) { 82 | e.preventDefault(); 83 | setUserId(inputEl.current.value); 84 | setPassword(passEl.current.value); 85 | authorize(); 86 | }; 87 | 88 | return ( 89 |
90 |
91 |
92 |
93 |
94 |

95 | Jasmine Towers 96 |

97 |
98 |
99 |
100 |
101 | 107 | setUserId(inputEl.current.value)} 115 | id="used-id" 116 | placeholder="User id" 117 | className={`w-full px-3 py-2 placeholder-gray-300 border ${ 118 | isName ? "border-gray-300" : "border-red-500" 119 | } 120 | rounded-md focus:outline-none focus:ring focus:ring-indigo-100 focus:border-indigo-300 `} 121 | /> 122 | {!isName && ( 123 | 124 | Invalid username 125 | 126 | )} 127 |
128 |
129 |
130 | 136 |
137 | setPassword(passEl.current.value)} 146 | placeholder="Your Password" 147 | className={`w-full px-3 py-2 placeholder-gray-300 border 148 | ${ 149 | isPassword ? "border-gray-300" : "border-red-500" 150 | } rounded-md focus:outline-none focus:ring focus:ring-indigo-100 focus:border-indigo-300 `} 151 | /> 152 | {!isPassword && ( 153 | 154 | Invalid password 155 | 156 | )} 157 |
158 |
159 | 165 |
166 |
167 |
168 |
169 |
170 |
171 | 172 |
173 | ); 174 | } 175 | 176 | export default Auth; 177 | -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const bodyParser = require('body-parser'); 3 | const db = require('./mysql_connect'); 4 | const dashB = require('./routes/dashb'); 5 | const cors = require("cors") 6 | 7 | 8 | //port number to listen 9 | const port = 5000; 10 | 11 | //init 12 | const app = express(); 13 | app.use(bodyParser.urlencoded({ extended: false })); 14 | app.use(bodyParser.json()); 15 | app.use("/dashboard",dashB); 16 | app.use(cors()) 17 | 18 | 19 | //initializing 20 | app.listen(port,()=>{ 21 | console.log("Server starten to listen..."); 22 | }); 23 | 24 | 25 | //home page 26 | app.get('/', function(req, res){ 27 | res.send("Only accepting GET and POST requests!"); 28 | }); 29 | 30 | 31 | 32 | //authorisation 33 | app.post("/auth", (req, res) => { 34 | const username = req.body.username; 35 | const password = req.body.password; 36 | let rep = "unknown"; 37 | let acces = "denied"; 38 | 39 | if(username && 40 | username.toUpperCase().charAt(0) === "E" && 41 | password && 42 | password.length >= 6){ 43 | rep = "employee"; 44 | 45 | // res.send({ user: "employee" }); 46 | }else if ( 47 | username && 48 | username.toUpperCase().charAt(0) === "A" && 49 | password && 50 | password.length >= 6 51 | ) { 52 | rep = "admin"; 53 | }else if ( 54 | username && 55 | username.toUpperCase().charAt(0) === "T" && 56 | password && 57 | password.length >= 6 58 | ) { 59 | rep = "tenant"; 60 | }else if ( 61 | username && 62 | username.toUpperCase().charAt(0) === "O" && 63 | password && 64 | password.length >= 6 65 | ) { 66 | rep= "owner"; 67 | } else if(password.length < 6) { 68 | res.send({ user: "passunknown" }); 69 | }else { 70 | res.send({ user: "unknown" }); 71 | } 72 | 73 | const resul =db.authoriseuser(username,password,(err,result)=>{ 74 | if(err) console.log(err); 75 | acces = result; 76 | console.log(acces); 77 | res.send({ 78 | access: acces, 79 | user: rep, 80 | }); 81 | }) 82 | }); 83 | 84 | 85 | //register complaint 86 | app.post('/raisingcomplaint',function(req,res){ 87 | const desc = req.body.descp; 88 | const blockno = req.body.blockno; 89 | const roomno = req.body.roomno; 90 | const values = [desc,blockno,roomno]; 91 | const resul =db.registercomplaint(values,(err,result)=>{ 92 | if(err) console.log(err); 93 | res.send(result); 94 | }) 95 | }); 96 | 97 | //create a new tenant by owner 98 | app.post('/createtenant',function(req,res){ 99 | const name = req.body.name; 100 | const age = req.body.age; 101 | const tenantno = req.body.tenantno; 102 | const adhaar = req.body.adhaar; 103 | const roomno = req.body.roomno; 104 | const password = req.body.password; 105 | const dob = req.body.dob; 106 | const values = [tenantno,name,dob,roomno,age]; 107 | const resul =db.createtenant(values,(err,result)=>{ 108 | if(err) console.log(err); 109 | const prof = [adhaar,tenantno]; 110 | const vals = ["t-"+tenantno,password,tenantno]; 111 | const resul =db.createtenantproof(prof,(err,result)=>{ 112 | if(err) console.log(err);//res.sendStatus(404); 113 | }) 114 | const respn =db.createuserid(vals,(err,result)=>{ 115 | if(err) console.log(err);//res.sendStatus(404); 116 | else res.sendStatus(200); 117 | }) 118 | }); 119 | }); 120 | 121 | 122 | //creates owner in owner table 123 | app.post('/createowner',(req,res)=> 124 | { 125 | const ownerid = req.body.ownerId; 126 | const name = req.body.name; 127 | const age = req.body.age; 128 | const aggrement_status = req.body.aggrementStatus; 129 | const roomno = req.body.roomno; 130 | const dob = req.body.dob; 131 | const proof = req.body.adhaar; 132 | const values = [ownerid,name,age,aggrement_status,roomno,dob]; 133 | const proofval = [proof,ownerid]; 134 | const password = req.body.password; 135 | const vals = ["o-"+ownerid,password,ownerid]; 136 | 137 | const rest = db.createowner(values,(err,result)=>{ 138 | if(err) console.log(err);//res.sendStatus(404); 139 | }); 140 | const rep = db.createownerproof(proofval,(err,result)=>{ 141 | console.log(proofval); 142 | if(err) console.log(err);//res.sendStatus(404); 143 | }); 144 | const respn =db.createuserid(vals,(err,result)=>{ 145 | if(err) console.log(err);//res.sendStatus(404); 146 | else res.sendStatus(200); 147 | }) 148 | }); 149 | 150 | 151 | 152 | //get the tenent details fetch all data from table 153 | app.get('/tenantdetails',(req,res)=> 154 | { 155 | const rest = db.getdata('tenant',(err,result)=> 156 | { 157 | res.send(result); 158 | }) 159 | }) 160 | 161 | 162 | 163 | //get the owner details fetch all the data from the table 164 | app.get('/ownerdetails',(req,res)=> 165 | { 166 | const rest = db.getdata('owner',(err,result)=> 167 | { 168 | res.send(result); 169 | }) 170 | }) 171 | 172 | //view parkings owned by tenant 173 | app.post('/viewparking',(req,res)=> 174 | { 175 | const id = req.body.userId; 176 | const rest = db.viewparking(id,(err,result)=> 177 | { 178 | if(err) console.log(err); 179 | res.send(result); 180 | }) 181 | }) 182 | 183 | 184 | 185 | //get the room details owned by the owner 186 | app.post('/ownercomplaints',(req,res)=> 187 | { 188 | const ownerid = req.body.userId; 189 | const rest = db.ownercomplaints(ownerid,(err,result)=> 190 | { 191 | if(err) console.log(err); 192 | res.send(result); 193 | }) 194 | }) 195 | 196 | 197 | //view complaints that are in the database 198 | app.get('/viewcomplaints',(req,res)=> 199 | { 200 | const rest = db.viewcomplaints((err,result)=> 201 | { 202 | res.send(result); 203 | }) 204 | }) 205 | 206 | 207 | //getonlycomplaints according to owner 208 | app.post('/ownerroomdetails',(req,res)=> 209 | { 210 | const ownerId = req.body.userId; 211 | const rest = db.ownerroomdetails(ownerId,(err,result)=> 212 | { 213 | if(err) console.log(err); 214 | res.send(result); 215 | }) 216 | }) 217 | 218 | 219 | 220 | 221 | //books parking slot for tenents 222 | app.post('/bookslot',(req,res)=> 223 | { 224 | const roomno =req.body.roomNo; 225 | const slno = req.body.slotNo; 226 | const values = [slno,roomno,]; 227 | const rest = db.bookslot(values,(err,result)=>{ 228 | if(err) console.log(err); 229 | if(err) res.sendStatus(405); 230 | else{ 231 | res.sendStatus(200); 232 | } 233 | 234 | }) 235 | }); 236 | 237 | 238 | app.post('/ownertenantdetails',(req,res)=> 239 | { 240 | const id = req.body.userId; 241 | const rest = db.ownertenantdetails(id,(err,result)=>{ 242 | if(err) console.log(err); 243 | if(err) res.sendStatus(405); 244 | else{ 245 | res.send(result); 246 | } 247 | }) 248 | }); 249 | 250 | app.post('/paymaintanance',(req,res)=> 251 | { 252 | const id = req.body.userId; 253 | const rest = db.paymaintanence(id,(err,result)=>{ 254 | if(err) console.log(err); 255 | if(err) res.sendStatus(405); 256 | else{ 257 | res.sendStatus(200); 258 | } 259 | }) 260 | }); 261 | //Other routes 262 | app.get('*', function(req, res){ 263 | res.send('Sorry, this is an invalid URL.'); 264 | }); -------------------------------------------------------------------------------- /client/src/components/CreatingTenant.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useRef } from "react"; 2 | import axios from "axios"; 3 | 4 | function CreatingTenant() { 5 | const tenantEl = useRef(null); 6 | const nameEl = useRef(null); 7 | const ageEl = useRef(null); 8 | const dobEl = useRef(null); 9 | const roomEl = useRef(null); 10 | const passEl = useRef(null); 11 | 12 | const adhaarEl = useRef(null); 13 | 14 | const [name, setName] = useState(""); 15 | const [age, setAge] = useState(""); 16 | const [dob, setDob] = useState(""); 17 | const [roomno, setRoomno] = useState(""); 18 | const [pass, setPass] = useState(""); 19 | const [tenantno, setTenantno] = useState(""); 20 | const [adhaar, setAdhaar] = useState(""); 21 | 22 | const createTenant = async () => { 23 | try { 24 | const res = await axios.post("http://localhost:5000/createtenant", { 25 | name: name, 26 | age: age, 27 | roomno: roomno, 28 | tenantno: tenantno, 29 | password: pass, 30 | adhaar: adhaar, 31 | dob: dob, 32 | }); 33 | if (res.status === 200) { 34 | tenantEl.current.value = ""; 35 | nameEl.current.value = ""; 36 | ageEl.current.value = ""; 37 | roomEl.current.value = ""; 38 | passEl.current.value = ""; 39 | adhaarEl.current.value = ""; 40 | dobEl.current.value = ""; 41 | } 42 | } catch (error) { 43 | console.log(error); 44 | } 45 | }; 46 | 47 | const submitHandler = function (e) { 48 | e.preventDefault(); 49 | createTenant(); 50 | }; 51 | 52 | return ( 53 |
54 |
55 |
56 | 62 | { 70 | setName(nameEl.current.value); 71 | }} 72 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 73 | /> 74 |
75 |
76 | 82 | { 90 | setTenantno(tenantEl.current.value); 91 | }} 92 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 93 | /> 94 |
95 |
96 | 102 | { 110 | setRoomno(roomEl.current.value); 111 | }} 112 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 113 | /> 114 |
115 |
116 | 122 | { 129 | setAge(ageEl.current.value); 130 | }} 131 | placeholder="Age" 132 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 133 | /> 134 |
135 |
136 | 142 | { 148 | setDob(dobEl.current.value); 149 | }} 150 | id="dob" 151 | placeholder="Enter your dob" 152 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 153 | /> 154 |
155 |
156 | 162 | { 169 | setAdhaar(adhaarEl.current.value); 170 | }} 171 | placeholder="Adhaar" 172 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 173 | /> 174 |
175 |
176 | 182 | { 188 | setPass(passEl.current.value); 189 | }} 190 | id="dob" 191 | placeholder="Enter your Password" 192 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 193 | /> 194 |
195 |
196 | 199 |
200 |
201 |
202 | ); 203 | } 204 | 205 | export default CreatingTenant; 206 | -------------------------------------------------------------------------------- /server/mysql_connect.js: -------------------------------------------------------------------------------- 1 | const mysql = require('mysql'); 2 | const config = require('./config_sql'); 3 | const con = mysql.createConnection({ 4 | host: config.host, 5 | user: config.uname, 6 | password: config.upass, 7 | database: config.database 8 | }); 9 | 10 | connect(); 11 | //used to establish connection with the database 12 | function connect() 13 | { 14 | con.connect(function(err) 15 | { 16 | if (err) throw err; 17 | console.log("database Connected!"); 18 | }); 19 | } 20 | 21 | 22 | 23 | 24 | //register the complaint to the block 25 | function registercomplaint(values,callback) 26 | { 27 | sql = ' update block set complaints= ? where block_no = ? and room_no= ?'; 28 | console.log(); 29 | con.query(sql,values,(err,results)=> 30 | { 31 | if (err) 32 | { 33 | console.log(err); 34 | } 35 | callback(err,results); 36 | }) 37 | } 38 | 39 | //function to calculate total number of owners 40 | function totalowner(callback) 41 | { 42 | sql = 'SELECT COUNT(owner_id) FROM owner'; 43 | con.query(sql,(err,results)=> 44 | { 45 | callback(err,results); 46 | }) 47 | } 48 | 49 | //get all the data from the table using table name 50 | function getdata(tablename,callback) 51 | { 52 | sql = 'select * from '+tablename+';'; 53 | con.query(sql,(err,results)=> 54 | { 55 | callback(err,results); 56 | }) 57 | } 58 | 59 | 60 | //add an owner tuple to the table 61 | function createowner(values,callback) 62 | { 63 | sql = 'insert into owner values(?,?,?,?,?,?)'; 64 | con.query(sql,values,(err,results)=> 65 | { 66 | callback(err,results); 67 | }) 68 | } 69 | //function to create an owner 70 | function createownerproof(values,callback) 71 | { 72 | sql = 'insert into identity values(?,?,null);'; 73 | con.query(sql,values,(err,results)=> 74 | { 75 | callback(err,results); 76 | }) 77 | } 78 | 79 | 80 | 81 | //book a parking slot for the tenant 82 | function bookslot(values,callback) 83 | { 84 | sql = 'update room set parking_slot = ? where room_no = ?'; 85 | con.query(sql,values,(err,results)=> 86 | { 87 | callback(err,results); 88 | }) 89 | } 90 | 91 | 92 | 93 | //view all the complaints 94 | function viewcomplaints(callback) 95 | { 96 | sql = 'select * from oo;'; 97 | con.query(sql,(err,results)=> 98 | { 99 | callback(err,results); 100 | }) 101 | } 102 | 103 | 104 | 105 | 106 | //view only owner complaints 107 | //dbms yuvarraj 108 | function ownercomplaints(ownerid,callback) 109 | { 110 | sql = 'select complaints,room_no from block where room_no in (select room_no from owner where owner_id in(select id from auth where user_id=?))'; 111 | con.query(sql,ownerid,(err,results)=> 112 | { 113 | callback(err,results); 114 | }) 115 | } 116 | 117 | 118 | 119 | //get the total no of tenants 120 | function totaltenant(callback) 121 | { 122 | sql = 'SELECT COUNT(tenant_id) FROM tenant'; 123 | con.query(sql,(err,results)=> 124 | { 125 | callback(err,results); 126 | }) 127 | } 128 | //get the total number of employees 129 | function totalemployee(callback) 130 | { 131 | sql = 'SELECT COUNT(emp_id) FROM employee'; 132 | con.query(sql,(err,results)=> 133 | { 134 | callback(err,results); 135 | }) 136 | } 137 | //function to retrieve all the complaints in the block 138 | function totalcomplaint(callback) 139 | { 140 | sql = 'SELECT COUNT(complaints) FROM block'; 141 | con.query(sql,(err,results)=> 142 | { 143 | callback(err,results); 144 | }) 145 | } 146 | //get the data of tenent 147 | function gettenantdata(tid,callback) 148 | { 149 | sql = 'select * from tenant where tenant_id in (select id from auth where user_id=?)'; 150 | con.query(sql,tid,(err,results)=> 151 | { 152 | callback(err,results); 153 | }) 154 | } 155 | 156 | 157 | 158 | 159 | //creating an tenant id 160 | function createtenant(values,callback) 161 | { 162 | sql = 'insert into tenant values(?,?,?,null,?,?)'; 163 | con.query(sql,values,(err,results)=> 164 | { 165 | callback(err,results); 166 | }) 167 | } 168 | //creating an proof for tenant 169 | function createtenantproof(values,callback) 170 | { 171 | sql = 'insert into identity values(?,null,?)'; 172 | con.query(sql,values,(err,results)=> 173 | { 174 | callback(err,results); 175 | }) 176 | } 177 | function createuserid(values,callback) 178 | { 179 | sql = 'insert into auth values(?,?,?)'; 180 | con.query(sql,values,(err,results)=> 181 | { 182 | callback(err,results); 183 | }) 184 | } 185 | 186 | 187 | //owner viewing tenant details 188 | function ownertenantdetails(values,callback) 189 | { 190 | sql = 'select * from tenant where room_no in (select room_no from owner where owner_id in(select id from auth where user_id=?))'; 191 | con.query(sql,values,(err,results)=> 192 | { 193 | callback(err,results); 194 | }) 195 | } 196 | 197 | //tenant pays maintanence fee 198 | function paymaintanence(id,callback) 199 | { 200 | sql = 'update tenant set stat="paid" where tenant_id in (select id from auth where user_id=?)'; 201 | con.query(sql,id,(err,results)=> 202 | { 203 | callback(err,results); 204 | }) 205 | } 206 | 207 | //owner viewing room owned by him 208 | function ownerroomdetails(values,callback) 209 | { 210 | sql = 'select * from room where room_no in (select room_no from owner where owner_id in(select id from auth where user_id=?))'; 211 | con.query(sql,values,(err,results)=> 212 | { 213 | callback(err,results); 214 | }) 215 | } 216 | //view parking alloted for tenant 217 | function viewparking(id,callback) 218 | { 219 | sql = 'select parking_slot from room where room_no in (select room_no from tenant where tenant_id in (select id from auth where user_id=?))'; 220 | con.query(sql,id,(err,results)=> 221 | { 222 | callback(err,results); 223 | }) 224 | } 225 | 226 | 227 | //employee salary get 228 | function empsalary(id,callback) 229 | { 230 | sql = 'select salary from employee where emp_id in (select id from auth where user_id=?)'; 231 | con.query(sql,id,(err,results)=> 232 | { 233 | callback(err,results); 234 | }) 235 | } 236 | 237 | 238 | 239 | //function to validate user with username and password 240 | function authoriseuser(username,password,callback) 241 | { 242 | let results; 243 | sql = 'SELECT password from auth where user_id = ?'; 244 | const value = [username]; 245 | console.log(value); 246 | con.query(sql,value,(err,result)=> 247 | { 248 | if(result.length===0) 249 | { 250 | results = "denied"; 251 | callback(err,results); 252 | return; 253 | } 254 | else 255 | { 256 | const resultArray = Object.values(JSON.parse(JSON.stringify(result))[0])[0]; 257 | if(password === resultArray) 258 | { 259 | results = "granted"; 260 | } 261 | else 262 | { 263 | results = "denied"; 264 | } 265 | callback(err,results); 266 | } 267 | 268 | }) 269 | } 270 | 271 | 272 | module.exports = { 273 | connect, 274 | registercomplaint, 275 | createowner, 276 | bookslot, 277 | getdata, 278 | totalowner, 279 | totaltenant, 280 | totalemployee, 281 | totalcomplaint, 282 | createownerproof, 283 | viewcomplaints, 284 | authoriseuser, 285 | gettenantdata, 286 | createtenant, 287 | createtenantproof, 288 | ownerroomdetails, 289 | ownercomplaints, 290 | viewparking, 291 | createuserid, 292 | paymaintanence, 293 | empsalary, 294 | ownerroomdetails, 295 | ownertenantdetails 296 | } -------------------------------------------------------------------------------- /client/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Routes, Route } from "react-router-dom"; 3 | import Header from "./components/Header"; 4 | import Dashboard from "./components/Dashboard"; 5 | import Aside from "./components/Aside"; 6 | import Auth from "./components/Auth"; 7 | import OwnerDetails from "./components/OwnerDetails"; 8 | import TenantDetails from "./components/TenantDetails"; 9 | import CreatingOwner from "./components/CreatingOwner"; 10 | import CreatingParkingSlot from "./components/CreatingParkingSlot"; 11 | import ComplaintsViewer from "./components/ComplaintsViewer"; 12 | import RaisingComplaints from "./components/RaisingComplaints"; 13 | import ParkingSlot from "./components/ParkingSlot"; 14 | import PayMaintenance from "./components/PayMaintenance"; 15 | import CreatingTenant from "./components/CreatingTenant"; 16 | import RoomDetails from "./components/RoomDetails"; 17 | import ErrorPage from "./ErrorPage"; 18 | import ComplaintsViewerOwner from "./components/ComplaintsViewerOwner"; 19 | import RoomDetailsOwner from "./components/RoomDetailsOwner"; 20 | 21 | function App() { 22 | // Sidebar 23 | const forAdmin = [ 24 | "Tenant Details", 25 | "Owner Details", 26 | "Create owner", 27 | "Allotting Parking slot", 28 | "Complaints", 29 | ]; 30 | const forEmployee = ["Complaints"]; 31 | const forTenant = [ 32 | "Raising Complaints", 33 | "Alloted Parking slot", 34 | "Pay maintenance", 35 | ]; 36 | const forOwner = [ 37 | "Tenant details", 38 | "Complaint", 39 | "Create Tenant", 40 | "Room Details", 41 | ]; 42 | 43 | return ( 44 |
45 | 46 | } /> 47 | 51 |
52 |
53 |
56 | 57 | } 58 | /> 59 | 63 |
64 |
65 |
68 | 69 | } 70 | /> 71 | 75 |
76 |
77 |
80 | 81 | } 82 | /> 83 | 87 |
88 |
89 |
92 | 93 | } 94 | /> 95 | 99 |
100 |
101 | 102 |
103 | 104 | } 105 | /> 106 | 110 |
111 |
112 | 113 |
114 | 115 | } 116 | /> 117 | 121 |
122 |
123 | 124 |
125 | 126 | } 127 | /> 128 | 132 |
133 |
134 | 135 |
136 | 137 | } 138 | /> 139 | 143 |
144 |
145 | 146 |
147 | 148 | } 149 | /> 150 | 154 |
155 |
156 | 157 |
158 | 159 | } 160 | /> 161 | 165 |
166 |
167 | 168 |
169 | 170 | } 171 | /> 172 | 176 |
177 |
178 | 179 |
180 | 181 | } 182 | /> 183 | 187 |
188 |
189 | 190 |
191 | 192 | } 193 | /> 194 | 198 |
199 |
200 | 201 |
202 | 203 | } 204 | /> 205 | 209 |
210 |
211 | 212 |
213 | 214 | } 215 | /> 216 | 220 |
221 |
222 | 223 |
224 | 225 | } 226 | /> 227 | 231 |
232 |
233 | 234 |
235 | 236 | } 237 | /> 238 | 242 | 243 | 244 | } 245 | /> 246 | 247 |
248 | ); 249 | } 250 | 251 | export default App; 252 | -------------------------------------------------------------------------------- /client/src/components/CreatingOwner.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useRef } from "react"; 2 | import axios from "axios"; 3 | 4 | function CreatingUser() { 5 | const nameEl = useRef(null); 6 | const ageEl = useRef(null); 7 | const adhaarEl = useRef(null); 8 | const dobEl = useRef(null); 9 | const aggreeEl = useRef(null); 10 | const ownerEl = useRef(null); 11 | const roomEl = useRef(null); 12 | const passEl = useRef(null); 13 | 14 | const [name, setName] = useState(""); 15 | const [age, setAge] = useState(""); 16 | const [adhaar, setAdhaar] = useState(""); 17 | const [dob, setDob] = useState(""); 18 | const [ownerId, setOwnerId] = useState(""); 19 | const [roomno, setRoomno] = useState(""); 20 | const [pass, setPass] = useState(""); 21 | const [aggrementStatus, setAggrementStatus] = useState(""); 22 | 23 | const post = async () => { 24 | try { 25 | const res = await axios.post("http://localhost:5000/createowner", { 26 | name: name, 27 | age: age, 28 | ownerId: ownerId, 29 | adhaar: adhaar, 30 | roomno: roomno, 31 | password: pass, 32 | aggrementStatus: aggrementStatus, 33 | dob: dob, 34 | }); 35 | if (res.status === 200) { 36 | nameEl.current.value = ""; 37 | ageEl.current.value = ""; 38 | adhaarEl.current.value = ""; 39 | dobEl.current.value = ""; 40 | ownerEl.current.value = ""; 41 | aggreeEl.current.value = ""; 42 | passEl.current.value = ""; 43 | roomEl.current.value = ""; 44 | } 45 | } catch (error) { 46 | console.log(error); 47 | } 48 | }; 49 | 50 | const submitHandler = function (e) { 51 | e.preventDefault(); 52 | post(); 53 | }; 54 | 55 | return ( 56 |
57 |
58 |
59 | 65 | { 73 | setName(nameEl.current.value); 74 | }} 75 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 76 | /> 77 |
78 |
79 | 85 | { 93 | setOwnerId(ownerEl.current.value); 94 | }} 95 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 96 | /> 97 |
98 |
99 | 105 | { 113 | setRoomno(roomEl.current.value); 114 | }} 115 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 116 | /> 117 |
118 |
119 | 125 | { 133 | setAggrementStatus(aggreeEl.current.value); 134 | }} 135 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 136 | /> 137 |
138 |
139 | 145 | { 152 | setAge(ageEl.current.value); 153 | }} 154 | placeholder="Age" 155 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 156 | /> 157 |
158 |
159 | 165 | { 170 | setAdhaar(adhaarEl.current.value); 171 | }} 172 | name="Adhaar" 173 | id="Adhaar" 174 | placeholder="Enter your Adhaar" 175 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 176 | /> 177 |
178 |
179 | 185 | { 191 | setPass(passEl.current.value); 192 | }} 193 | id="dob" 194 | placeholder="Enter your Password" 195 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 196 | /> 197 |
198 |
199 | 205 | { 211 | setDob(dobEl.current.value); 212 | }} 213 | id="dob" 214 | placeholder="Enter your dob" 215 | className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-medium text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md" 216 | /> 217 |
218 | 219 |
220 | 223 |
224 |
225 |
226 | ); 227 | } 228 | 229 | export default CreatingUser; 230 | -------------------------------------------------------------------------------- /database/export.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.29, for macos12 (x86_64) 2 | -- 3 | -- Host: localhost Database: app 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.29 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `auth` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `auth`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `auth` ( 26 | `user_id` varchar(10) NOT NULL, 27 | `password` varchar(20) NOT NULL DEFAULT '12345678', 28 | `id` int NOT NULL, 29 | PRIMARY KEY (`user_id`), 30 | UNIQUE KEY `id` (`id`) 31 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 32 | /*!40101 SET character_set_client = @saved_cs_client */; 33 | 34 | -- 35 | -- Dumping data for table `auth` 36 | -- 37 | 38 | LOCK TABLES `auth` WRITE; 39 | /*!40000 ALTER TABLE `auth` DISABLE KEYS */; 40 | INSERT INTO `auth` VALUES ('a-123','12345678',101),('a-124','12345678',102),('a-909','12345678',103),('e-123','12345678',701),('e-456','12345678',702),('e-909','12345678',703),('o-123','12345678',501),('o-124','12345678',502),('o-456','12345678',503),('o-909','12345678',504),('t-123','12345678',601),('t-124','12345678',602),('t-145','12345678',603),('t-190','12345678',604),('t-345','12345678',605); 41 | /*!40000 ALTER TABLE `auth` ENABLE KEYS */; 42 | UNLOCK TABLES; 43 | 44 | -- 45 | -- Temporary view structure for view `avt` 46 | -- 47 | 48 | DROP TABLE IF EXISTS `avt`; 49 | /*!50001 DROP VIEW IF EXISTS `avt`*/; 50 | SET @saved_cs_client = @@character_set_client; 51 | /*!50503 SET character_set_client = utf8mb4 */; 52 | /*!50001 CREATE VIEW `avt` AS SELECT 53 | 1 AS `tenant_id`, 54 | 1 AS `room_no`, 55 | 1 AS `dob`, 56 | 1 AS `name`, 57 | 1 AS `age`*/; 58 | SET character_set_client = @saved_cs_client; 59 | 60 | -- 61 | -- Table structure for table `block` 62 | -- 63 | 64 | DROP TABLE IF EXISTS `block`; 65 | /*!40101 SET @saved_cs_client = @@character_set_client */; 66 | /*!50503 SET character_set_client = utf8mb4 */; 67 | CREATE TABLE `block` ( 68 | `block_no` int NOT NULL, 69 | `block_name` varchar(10) DEFAULT NULL, 70 | `complaints` varchar(100) DEFAULT NULL, 71 | `room_no` int DEFAULT NULL, 72 | PRIMARY KEY (`block_no`), 73 | KEY `fk_r` (`room_no`), 74 | CONSTRAINT `fk_r` FOREIGN KEY (`room_no`) REFERENCES `room` (`room_no`) 75 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 76 | /*!40101 SET character_set_client = @saved_cs_client */; 77 | 78 | -- 79 | -- Dumping data for table `block` 80 | -- 81 | 82 | LOCK TABLES `block` WRITE; 83 | /*!40000 ALTER TABLE `block` DISABLE KEYS */; 84 | INSERT INTO `block` VALUES (1,'kaveri','Water problem',11),(2,'Narmadha','Plumbing work',12),(3,'yamuna','tenant issue',13),(4,'jamuna',NULL,21); 85 | /*!40000 ALTER TABLE `block` ENABLE KEYS */; 86 | UNLOCK TABLES; 87 | 88 | -- 89 | -- Table structure for table `block_admin` 90 | -- 91 | 92 | DROP TABLE IF EXISTS `block_admin`; 93 | /*!40101 SET @saved_cs_client = @@character_set_client */; 94 | /*!50503 SET character_set_client = utf8mb4 */; 95 | CREATE TABLE `block_admin` ( 96 | `admin_id` int NOT NULL, 97 | `admin_name` varchar(20) DEFAULT NULL, 98 | `block_no` int DEFAULT NULL, 99 | PRIMARY KEY (`admin_id`), 100 | KEY `block_no` (`block_no`), 101 | CONSTRAINT `block_admin_ibfk_1` FOREIGN KEY (`block_no`) REFERENCES `block` (`block_no`) 102 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 103 | /*!40101 SET character_set_client = @saved_cs_client */; 104 | 105 | -- 106 | -- Dumping data for table `block_admin` 107 | -- 108 | 109 | LOCK TABLES `block_admin` WRITE; 110 | /*!40000 ALTER TABLE `block_admin` DISABLE KEYS */; 111 | INSERT INTO `block_admin` VALUES (101,'shiva',1),(102,'rajaa',NULL); 112 | /*!40000 ALTER TABLE `block_admin` ENABLE KEYS */; 113 | UNLOCK TABLES; 114 | 115 | -- 116 | -- Table structure for table `employee` 117 | -- 118 | 119 | DROP TABLE IF EXISTS `employee`; 120 | /*!40101 SET @saved_cs_client = @@character_set_client */; 121 | /*!50503 SET character_set_client = utf8mb4 */; 122 | CREATE TABLE `employee` ( 123 | `emp_id` int NOT NULL, 124 | `emp_name` varchar(30) DEFAULT NULL, 125 | `salary` int DEFAULT NULL, 126 | `emp_type` varchar(20) DEFAULT NULL, 127 | `age` int DEFAULT NULL, 128 | `block_no` int DEFAULT NULL, 129 | PRIMARY KEY (`emp_id`), 130 | KEY `block_no` (`block_no`), 131 | CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`block_no`) REFERENCES `block` (`block_no`) 132 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 133 | /*!40101 SET character_set_client = @saved_cs_client */; 134 | 135 | -- 136 | -- Dumping data for table `employee` 137 | -- 138 | 139 | LOCK TABLES `employee` WRITE; 140 | /*!40000 ALTER TABLE `employee` DISABLE KEYS */; 141 | INSERT INTO `employee` VALUES (701,'Muthu',20000,'Plumber',20,4),(702,'krishanan',5000,'Gardener',30,3),(703,'raman surya',4000,'Electrician ',21,NULL); 142 | /*!40000 ALTER TABLE `employee` ENABLE KEYS */; 143 | UNLOCK TABLES; 144 | 145 | -- 146 | -- Table structure for table `identity` 147 | -- 148 | 149 | DROP TABLE IF EXISTS `identity`; 150 | /*!40101 SET @saved_cs_client = @@character_set_client */; 151 | /*!50503 SET character_set_client = utf8mb4 */; 152 | CREATE TABLE `identity` ( 153 | `proof` varchar(15) DEFAULT NULL, 154 | `owner_id` int DEFAULT NULL, 155 | `tenant_id` int DEFAULT NULL, 156 | UNIQUE KEY `proof` (`proof`), 157 | KEY `owner_id` (`owner_id`), 158 | KEY `fk_t` (`tenant_id`), 159 | CONSTRAINT `fk_t` FOREIGN KEY (`tenant_id`) REFERENCES `tenant` (`tenant_id`), 160 | CONSTRAINT `identity_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `owner` (`owner_id`) 161 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 162 | /*!40101 SET character_set_client = @saved_cs_client */; 163 | 164 | -- 165 | -- Dumping data for table `identity` 166 | -- 167 | 168 | LOCK TABLES `identity` WRITE; 169 | /*!40000 ALTER TABLE `identity` DISABLE KEYS */; 170 | INSERT INTO `identity` VALUES ('1234567890',501,NULL),('987654321',502,NULL),('2764724628',503,NULL),('9876543456',504,NULL),('6789876987',NULL,601),('4567898769',NULL,602),('9876567888',NULL,603),('2345676543',NULL,604),('7657876788',NULL,605); 171 | /*!40000 ALTER TABLE `identity` ENABLE KEYS */; 172 | UNLOCK TABLES; 173 | 174 | -- 175 | -- Temporary view structure for view `o` 176 | -- 177 | 178 | DROP TABLE IF EXISTS `o`; 179 | /*!50001 DROP VIEW IF EXISTS `o`*/; 180 | SET @saved_cs_client = @@character_set_client; 181 | /*!50503 SET character_set_client = utf8mb4 */; 182 | /*!50001 CREATE VIEW `o` AS SELECT 183 | 1 AS `complaints`*/; 184 | SET character_set_client = @saved_cs_client; 185 | 186 | -- 187 | -- Temporary view structure for view `oo` 188 | -- 189 | 190 | DROP TABLE IF EXISTS `oo`; 191 | /*!50001 DROP VIEW IF EXISTS `oo`*/; 192 | SET @saved_cs_client = @@character_set_client; 193 | /*!50503 SET character_set_client = utf8mb4 */; 194 | /*!50001 CREATE VIEW `oo` AS SELECT 195 | 1 AS `complaints`, 196 | 1 AS `room_no`*/; 197 | SET character_set_client = @saved_cs_client; 198 | 199 | -- 200 | -- Table structure for table `owner` 201 | -- 202 | 203 | DROP TABLE IF EXISTS `owner`; 204 | /*!40101 SET @saved_cs_client = @@character_set_client */; 205 | /*!50503 SET character_set_client = utf8mb4 */; 206 | CREATE TABLE `owner` ( 207 | `owner_id` int NOT NULL, 208 | `name` varchar(20) DEFAULT NULL, 209 | `age` int DEFAULT NULL, 210 | `aggrement_status` varchar(20) NOT NULL, 211 | `room_no` int DEFAULT NULL, 212 | `dob` varchar(15) DEFAULT NULL, 213 | PRIMARY KEY (`owner_id`), 214 | KEY `FK_rrno` (`room_no`), 215 | CONSTRAINT `FK_rrno` FOREIGN KEY (`room_no`) REFERENCES `room` (`room_no`) 216 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 217 | /*!40101 SET character_set_client = @saved_cs_client */; 218 | 219 | -- 220 | -- Dumping data for table `owner` 221 | -- 222 | 223 | LOCK TABLES `owner` WRITE; 224 | /*!40000 ALTER TABLE `owner` DISABLE KEYS */; 225 | INSERT INTO `owner` VALUES (501,'yuvarraj S',19,'yes',11,'17-aug-2002'),(502,'Tharun',19,'yes',13,'21-may-2002'),(503,'Surya DK',20,'no',21,'23-sep-2001'),(504,'Shivanesh',21,'no',31,'24-jan-2002'); 226 | /*!40000 ALTER TABLE `owner` ENABLE KEYS */; 227 | UNLOCK TABLES; 228 | 229 | -- 230 | -- Table structure for table `rental` 231 | -- 232 | 233 | DROP TABLE IF EXISTS `rental`; 234 | /*!40101 SET @saved_cs_client = @@character_set_client */; 235 | /*!50503 SET character_set_client = utf8mb4 */; 236 | CREATE TABLE `rental` ( 237 | `doj` varchar(20) DEFAULT NULL, 238 | `monthly_rent` int DEFAULT NULL, 239 | `room_no` int DEFAULT NULL, 240 | `tenant_id` int DEFAULT NULL, 241 | KEY `tenant_id` (`tenant_id`), 242 | KEY `FK_rno` (`room_no`), 243 | CONSTRAINT `FK_rno` FOREIGN KEY (`room_no`) REFERENCES `room` (`room_no`), 244 | CONSTRAINT `rental_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `tenant` (`tenant_id`) 245 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 246 | /*!40101 SET character_set_client = @saved_cs_client */; 247 | 248 | -- 249 | -- Dumping data for table `rental` 250 | -- 251 | 252 | LOCK TABLES `rental` WRITE; 253 | /*!40000 ALTER TABLE `rental` DISABLE KEYS */; 254 | INSERT INTO `rental` VALUES ('02-jan-2021',25000,11,601),('03-jan-2021',25000,12,602),('03-jan-2021',35000,13,603),('06-jan-2021',15000,21,604),('07-jan-2021',15000,31,605); 255 | /*!40000 ALTER TABLE `rental` ENABLE KEYS */; 256 | UNLOCK TABLES; 257 | 258 | -- 259 | -- Table structure for table `room` 260 | -- 261 | 262 | DROP TABLE IF EXISTS `room`; 263 | /*!40101 SET @saved_cs_client = @@character_set_client */; 264 | /*!50503 SET character_set_client = utf8mb4 */; 265 | CREATE TABLE `room` ( 266 | `room_no` int NOT NULL, 267 | `type` varchar(10) DEFAULT NULL, 268 | `floor` int DEFAULT NULL, 269 | `parking_slot` varchar(10) DEFAULT NULL, 270 | `reg_no` int DEFAULT NULL, 271 | `block_no` int DEFAULT NULL, 272 | PRIMARY KEY (`room_no`), 273 | UNIQUE KEY `parking_slot` (`parking_slot`), 274 | UNIQUE KEY `reg_no` (`reg_no`), 275 | KEY `block_no` (`block_no`), 276 | CONSTRAINT `room_ibfk_1` FOREIGN KEY (`block_no`) REFERENCES `block` (`block_no`) 277 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 278 | /*!40101 SET character_set_client = @saved_cs_client */; 279 | 280 | -- 281 | -- Dumping data for table `room` 282 | -- 283 | 284 | LOCK TABLES `room` WRITE; 285 | /*!40000 ALTER TABLE `room` DISABLE KEYS */; 286 | INSERT INTO `room` VALUES (11,'3bhk',2,'B-123',1234,1),(12,'2bhk',2,'B-124',12345,2),(13,'3bhk',2,'B-125',123,1),(21,'1bhk',3,'B-234',456,4),(31,'4bhk',4,'B-789',2345,4),(67,'1bhk',7,'B-890',654,3); 287 | /*!40000 ALTER TABLE `room` ENABLE KEYS */; 288 | UNLOCK TABLES; 289 | 290 | -- 291 | -- Temporary view structure for view `tav` 292 | -- 293 | 294 | DROP TABLE IF EXISTS `tav`; 295 | /*!50001 DROP VIEW IF EXISTS `tav`*/; 296 | SET @saved_cs_client = @@character_set_client; 297 | /*!50503 SET character_set_client = utf8mb4 */; 298 | /*!50001 CREATE VIEW `tav` AS SELECT 299 | 1 AS `tenant_id`, 300 | 1 AS `room_no`, 301 | 1 AS `dob`, 302 | 1 AS `name`*/; 303 | SET character_set_client = @saved_cs_client; 304 | 305 | -- 306 | -- Table structure for table `tenant` 307 | -- 308 | 309 | DROP TABLE IF EXISTS `tenant`; 310 | /*!40101 SET @saved_cs_client = @@character_set_client */; 311 | /*!50503 SET character_set_client = utf8mb4 */; 312 | CREATE TABLE `tenant` ( 313 | `tenant_id` int NOT NULL, 314 | `name` varchar(30) DEFAULT NULL, 315 | `dob` varchar(10) DEFAULT NULL, 316 | `stat` varchar(10) DEFAULT NULL, 317 | `room_no` int DEFAULT NULL, 318 | `age` int DEFAULT NULL, 319 | PRIMARY KEY (`tenant_id`), 320 | KEY `fk_rn` (`room_no`), 321 | CONSTRAINT `fk_rn` FOREIGN KEY (`room_no`) REFERENCES `room` (`room_no`) 322 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 323 | /*!40101 SET character_set_client = @saved_cs_client */; 324 | 325 | -- 326 | -- Dumping data for table `tenant` 327 | -- 328 | 329 | LOCK TABLES `tenant` WRITE; 330 | /*!40000 ALTER TABLE `tenant` DISABLE KEYS */; 331 | INSERT INTO `tenant` VALUES (601,'nithin','01-apr-02','no',11,19),(602,'rohith','23-aug-02','not paid',12,23),(603,'mothi','12-jun-02','not paid',13,41),(604,'abu danish','23-apr-02','not paid',21,35),(605,'Hari','30-sep-02','not paid',31,56); 332 | /*!40000 ALTER TABLE `tenant` ENABLE KEYS */; 333 | UNLOCK TABLES; 334 | 335 | -- 336 | -- Dumping events for database 'app' 337 | -- 338 | 339 | -- 340 | -- Dumping routines for database 'app' 341 | -- 342 | 343 | -- 344 | -- Final view structure for view `avt` 345 | -- 346 | 347 | /*!50001 DROP VIEW IF EXISTS `avt`*/; 348 | /*!50001 SET @saved_cs_client = @@character_set_client */; 349 | /*!50001 SET @saved_cs_results = @@character_set_results */; 350 | /*!50001 SET @saved_col_connection = @@collation_connection */; 351 | /*!50001 SET character_set_client = utf8mb4 */; 352 | /*!50001 SET character_set_results = utf8mb4 */; 353 | /*!50001 SET collation_connection = utf8mb4_0900_ai_ci */; 354 | /*!50001 CREATE ALGORITHM=UNDEFINED */ 355 | /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ 356 | /*!50001 VIEW `avt` AS select `tenant`.`tenant_id` AS `tenant_id`,`tenant`.`room_no` AS `room_no`,`tenant`.`dob` AS `dob`,`tenant`.`name` AS `name`,`tenant`.`age` AS `age` from `tenant` */; 357 | /*!50001 SET character_set_client = @saved_cs_client */; 358 | /*!50001 SET character_set_results = @saved_cs_results */; 359 | /*!50001 SET collation_connection = @saved_col_connection */; 360 | 361 | -- 362 | -- Final view structure for view `o` 363 | -- 364 | 365 | /*!50001 DROP VIEW IF EXISTS `o`*/; 366 | /*!50001 SET @saved_cs_client = @@character_set_client */; 367 | /*!50001 SET @saved_cs_results = @@character_set_results */; 368 | /*!50001 SET @saved_col_connection = @@collation_connection */; 369 | /*!50001 SET character_set_client = utf8mb4 */; 370 | /*!50001 SET character_set_results = utf8mb4 */; 371 | /*!50001 SET collation_connection = utf8mb4_0900_ai_ci */; 372 | /*!50001 CREATE ALGORITHM=UNDEFINED */ 373 | /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ 374 | /*!50001 VIEW `o` AS select `block`.`complaints` AS `complaints` from `block` */; 375 | /*!50001 SET character_set_client = @saved_cs_client */; 376 | /*!50001 SET character_set_results = @saved_cs_results */; 377 | /*!50001 SET collation_connection = @saved_col_connection */; 378 | 379 | -- 380 | -- Final view structure for view `oo` 381 | -- 382 | 383 | /*!50001 DROP VIEW IF EXISTS `oo`*/; 384 | /*!50001 SET @saved_cs_client = @@character_set_client */; 385 | /*!50001 SET @saved_cs_results = @@character_set_results */; 386 | /*!50001 SET @saved_col_connection = @@collation_connection */; 387 | /*!50001 SET character_set_client = utf8mb4 */; 388 | /*!50001 SET character_set_results = utf8mb4 */; 389 | /*!50001 SET collation_connection = utf8mb4_0900_ai_ci */; 390 | /*!50001 CREATE ALGORITHM=UNDEFINED */ 391 | /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ 392 | /*!50001 VIEW `oo` AS select `block`.`complaints` AS `complaints`,`block`.`room_no` AS `room_no` from `block` */; 393 | /*!50001 SET character_set_client = @saved_cs_client */; 394 | /*!50001 SET character_set_results = @saved_cs_results */; 395 | /*!50001 SET collation_connection = @saved_col_connection */; 396 | 397 | -- 398 | -- Final view structure for view `tav` 399 | -- 400 | 401 | /*!50001 DROP VIEW IF EXISTS `tav`*/; 402 | /*!50001 SET @saved_cs_client = @@character_set_client */; 403 | /*!50001 SET @saved_cs_results = @@character_set_results */; 404 | /*!50001 SET @saved_col_connection = @@collation_connection */; 405 | /*!50001 SET character_set_client = utf8mb4 */; 406 | /*!50001 SET character_set_results = utf8mb4 */; 407 | /*!50001 SET collation_connection = utf8mb4_0900_ai_ci */; 408 | /*!50001 CREATE ALGORITHM=UNDEFINED */ 409 | /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ 410 | /*!50001 VIEW `tav` AS select `tenant`.`tenant_id` AS `tenant_id`,`tenant`.`room_no` AS `room_no`,`tenant`.`dob` AS `dob`,`tenant`.`name` AS `name` from `tenant` */; 411 | /*!50001 SET character_set_client = @saved_cs_client */; 412 | /*!50001 SET character_set_results = @saved_cs_results */; 413 | /*!50001 SET collation_connection = @saved_col_connection */; 414 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 415 | 416 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 417 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 418 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 419 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 420 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 421 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 422 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 423 | 424 | -- Dump completed on 2022-06-11 12:14:42 425 | -------------------------------------------------------------------------------- /client/src/assets/Error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | --------------------------------------------------------------------------------