diff --git a/frontend/src/components/adminLogin.js b/frontend/src/components/adminLogin.js new file mode 100644 index 0000000..133149f --- /dev/null +++ b/frontend/src/components/adminLogin.js @@ -0,0 +1,84 @@ +import React from "react"; +import "./css/adminLogin.css"; +import Navbar from "./nav"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faKey, faEnvelope } from "@fortawesome/free-solid-svg-icons"; + +class adminLogin extends React.Component { + constructor(props) { + super(); + this.onChangeAdminEmail = this.onChangeAdminEmail.bind(this); + this.onChangeAdminPassword = this.onChangeAdminPassword.bind(this); + this.onSubmit = this.onSubmit.bind(this); + this.state = { + adminEmail: "", + adminPassword: "", + msg: "", + }; + } + + onChangeAdminEmail(e) { + this.setState({ adminEmail: e.target.value }); + } + onChangeAdminPassword(e) { + this.setState({ adminPassword: e.target.value }); + } + onSubmit(e) { + e.preventDefault(); + console.log("Login Successfull"); + console.log(`ADMIN EMAIL ID : ${this.state.adminEmail}`); + console.log(`ADMIN PASSWORD : ${this.state.adminPassword}`); + if ( + this.state.adminEmail === "admin@gmail.com" && + this.state.adminPassword === "admin1234" + ) { + this.setState({ msg: "WELCOME ADMIN" }); + sessionStorage.setItem("Key_Veriable", "admin@gmail.com"); + this.props.history.push("/adminafterlogin"); + } else { + this.setState({ msg: "INVALID UID OR PASSWORD" }); + } + this.setState({ adminEmail: "", adminPassword: "" }); + } + + render() { + return ( +
+ +
+
+

Welcome Back

+

{this.state.msg}

+
+
+ + +
+
+ + +
+ +
+
+
+
+ ); + } +} + +export default adminLogin; diff --git a/frontend/src/components/adminafterlogin.js b/frontend/src/components/adminafterlogin.js new file mode 100644 index 0000000..de5ad46 --- /dev/null +++ b/frontend/src/components/adminafterlogin.js @@ -0,0 +1,30 @@ +import React from 'react' +import Navbar from './nav' +import './css/basic.css' +import { Redirect} from "react-router-dom"; + +class AdminAfterLogin extends React.Component +{ + render() + { + let authuser = sessionStorage.getItem('Key_Veriable') + console.log(authuser) + if (authuser == null) + { + return() + } + else + { + return( +
+ +
+

WELCOME ADMIN

+

THIS IS ADMIN DASH BOARD

+
+ ) + } + } +} + +export default AdminAfterLogin \ No newline at end of file diff --git a/frontend/src/components/contact.js b/frontend/src/components/contact.js new file mode 100644 index 0000000..7802216 --- /dev/null +++ b/frontend/src/components/contact.js @@ -0,0 +1,16 @@ +import React from 'react'; +import Navbar from './nav' +import './css/basic.css' + +class Contact extends React.Component { + render(){ + return( +
+ +

This is Contact us Page

+
+ ); + } +} + +export default Contact \ No newline at end of file diff --git a/frontend/src/components/department.js b/frontend/src/components/department.js new file mode 100644 index 0000000..f35cbdc --- /dev/null +++ b/frontend/src/components/department.js @@ -0,0 +1,31 @@ +import React from 'react'; +import Navbar from './nav' +// import healthimg from '../img/healthcare.jfif' +// import dentistimg from '../img/Dentist.jfif' +// import pediatricianimg from '../img/Pediatrician.jfif' +import './css/department.css' +class Department extends React.Component { + render(){ + return( +
+ +
+
+ + + + + +
+
+
+ ); + } +} + +export default Department \ No newline at end of file diff --git a/frontend/src/components/doctors.js b/frontend/src/components/doctors.js new file mode 100644 index 0000000..c04f4dc --- /dev/null +++ b/frontend/src/components/doctors.js @@ -0,0 +1,28 @@ +import React from 'react'; +import Navbar from './nav' +import './css/doctor.css' +class Doctors extends React.Component { + render(){ + return( +
+ +
+
+ + + + + +
+
+
+ ); + } +} + +export default Doctors \ No newline at end of file diff --git a/frontend/src/components/footer.js b/frontend/src/components/footer.js new file mode 100644 index 0000000..6f0383c --- /dev/null +++ b/frontend/src/components/footer.js @@ -0,0 +1,17 @@ +import React from "react"; +import "./css/footer.css"; +class Footer extends React.Component { + render() { + return ( +
+
+ +
+
+ ); + } +} + +export default Footer; diff --git a/frontend/src/components/header.js b/frontend/src/components/header.js new file mode 100644 index 0000000..c9c6ef5 --- /dev/null +++ b/frontend/src/components/header.js @@ -0,0 +1,39 @@ +import React from 'react' +import './css/header.css' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faFacebook,faWhatsapp,faInstagram,faTwitter } from '@fortawesome/free-brands-svg-icons' +import { faClock } from '@fortawesome/free-regular-svg-icons' +import { faPhoneVolume } from '@fortawesome/free-solid-svg-icons' + +function Header(){ + return( +
+ +
+ ); +} + +export default Header \ No newline at end of file diff --git a/frontend/src/components/home.js b/frontend/src/components/home.js new file mode 100644 index 0000000..d6472dd --- /dev/null +++ b/frontend/src/components/home.js @@ -0,0 +1,90 @@ +import React from 'react'; +import './css/home.css'; +import logo from './img/logo.png' +import Navbar from './nav' + + +class Home extends React.Component{ + + constructor(props){ + super(); + this.onClick=this.onClick.bind(this); + } + + onClick(e){ + e.preventDefault(); + this.props.history.push('/adminLogin') + } + + render(){ + + return( +
+ +
+
+
+

Your doctor your treatment

+
+ Proactively envisioned multimedia based expertise and cross-media growth strategies. Seamlessly visualize quality intellectual capital without superior collaboration and idea-sharing. +
+ +
+
+
+
+ logoImage +
+
+
+
+
+ +

+ + For all your family needs +

+

+ Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar solutions without functional solutions. +

+
+ +
+ Laptop +
+
+
+
+ +

+ For your child whitest teeths +

+

+ Completely synergize resource taxing relationships via premier niche markets. Professionally cultivate one-to-one customer service with robust ideas. Dynamically innovate resource-leveling customer service for state of the art customer service. +

+
+
+ Laptop +
+
+
+
+ +

+ Children medical care +

+

+ Objectively innovate empowered manufactured products whereas parallel platforms. Holisticly predominate extensible testing procedures for reliable supply chains. Dramatically engage top-line web services vis-a-vis cutting-edge deliverables. +

+
+ +
+ Laptop +
+
+
+ ); + } +} + +export default Home \ No newline at end of file diff --git a/frontend/src/components/logout.js b/frontend/src/components/logout.js new file mode 100644 index 0000000..b805a93 --- /dev/null +++ b/frontend/src/components/logout.js @@ -0,0 +1,18 @@ +import React from 'react'; +import { Redirect} from "react-router-dom"; + +class Logout extends React.Component +{ + render() + { + let authuser = sessionStorage.getItem('Key_Veriable') + console.log(authuser) + if (authuser === "admin@gmail.com") + { + sessionStorage.removeItem('Key_Veriable') + return() + } + } +} + +export default Logout \ No newline at end of file diff --git a/frontend/src/components/newAppointment.js b/frontend/src/components/newAppointment.js new file mode 100644 index 0000000..8e307cb --- /dev/null +++ b/frontend/src/components/newAppointment.js @@ -0,0 +1,157 @@ +import React from 'react'; +// import axios from 'axios'; BACKEND PART IMPORT IT +import './css/newAppointment.css'; +import Navbar from './nav' + +class newAppointment extends React.Component { + + constructor(){ + + super(); + this.onChangeName=this.onChangeName.bind(this); + this.onChangePhone=this.onChangePhone.bind(this); + this.onChangeEmail=this.onChangeEmail.bind(this); + this.onChangeAge=this.onChangeAge.bind(this); + this.onChangeGender=this.onChangeGender.bind(this); + this.onChangeDepartment=this.onChangeDepartment.bind(this); + this.onChangeDate=this.onChangeDate.bind(this); + this.onChangeTime=this.onChangeTime.bind(this); + this.onChangeDescription=this.onChangeDescription.bind(this); + this.onSubmit= this.onSubmit.bind(this); + this.state ={ + name: '', + phone: '', + email: '', + age: '', + gender: '', + department: '', + date: '', + time: '', + description: '', + msg: '' + } + } + + onChangeName(e){ + this.setState({name: e.target.value}); + } + onChangePhone(e){ + this.setState({phone: e.target.value}); + } + onChangeEmail(e){ + this.setState({email: e.target.value}); + } + onChangeAge(e){ + this.setState({age: e.target.value}); + } + onChangeGender(e){ + this.setState({gender: e.target.value}); + } + onChangeDepartment(e){ + this.setState({department: e.target.value}); + } + onChangeDate(e){ + this.setState({date: e.target.value}); + } + onChangeTime(e){ + this.setState({time: e.target.value}); + } + onChangeDescription(e){ + this.setState({description: e.target.value}); + } + onSubmit(e){ + e.preventDefault(); + console.log('Form Submited'); + console.log(`NAME: ${this.state.name}`); + console.log(`PHONE: ${this.state.phone}`); + console.log(`EMAIL: ${this.state.email}`); + console.log(`AGE: ${this.state.age}`); + console.log(`GENDER: ${this.state.gender}`); + console.log(`DEPARTMENT: ${this.state.department}`); + console.log(`DATE: ${this.state.date}`); + console.log(`TIME: ${this.state.time}`); + console.log(`DESCRIPTIOND: ${this.state.description}`); + + // PASSING OBJECT TO BACKEND + + // const patientinfo= { + // name : this.state.name, + // phone : this.state.phone, + // email : this.state.email, + // age : this.state.age, + // gender : this.state.gender, + // department : this.state.department, + // date : this.state.date, + // time : this.state.time, + // description : this.state.description, + // } + + // BACKEND PART + // axios.post('http://localhost:3000/newappointment', patientinfo) + // .then(res => { + // console.log(res.data) + // this.setState({ msg: 'APPOINTMENT REGISTRATION SUCCESSFUL' }) + // }) + // .catch( err => console.log(err)) + + + this.setState({ + name: '', + phone: '', + email: '', + age: '', + gender: '', + department: '', + date: '', + time: '', + description: '', + msg: '' + }) + } + + render() { + return ( +
+ +
+

Fill The below form for New Appointment

+

* refers to mandatory

+

{this.state.msg}

+
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ ); + } +} +export default newAppointment \ No newline at end of file