Add files via upload

This commit is contained in:
AkhilBarthwal005 2020-10-28 13:59:33 +05:30 committed by GitHub
parent e510b7d148
commit 799f48f3d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 510 additions and 0 deletions

View File

@ -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 (
<div>
<Navbar></Navbar>
<div className="container">
<div className="signin-container">
<h1>Welcome Back</h1>
<h4 className="msg">{this.state.msg}</h4>
<form onSubmit={this.onSubmit}>
<div className="box">
<FontAwesomeIcon icon={faEnvelope} />
<input
type="text"
name="adminEmail"
id="Email"
placeholder="Email"
value={this.state.adminEmail}
onChange={this.onChangeAdminEmail}
/>
</div>
<div className="box">
<FontAwesomeIcon icon={faKey} />
<input
type="password"
name="adminPassword"
id="Password"
placeholder="Password"
value={this.state.adminPassword}
onChange={this.onChangeAdminPassword}
/>
</div>
<button className="btn-signin">Log in</button>
</form>
</div>
</div>
</div>
);
}
}
export default adminLogin;

View File

@ -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(<Redirect to="/adminLogin" />)
}
else
{
return(
<div>
<Navbar></Navbar>
<br/>
<h3 className= "message">WELCOME ADMIN</h3>
<h3 className= "message">THIS IS ADMIN DASH BOARD</h3>
</div>
)
}
}
}
export default AdminAfterLogin

View File

@ -0,0 +1,16 @@
import React from 'react';
import Navbar from './nav'
import './css/basic.css'
class Contact extends React.Component {
render(){
return(
<div>
<Navbar></Navbar>
<h1 className= "message">This is Contact us Page</h1>
</div>
);
}
}
export default Contact

View File

@ -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(
<div>
<Navbar></Navbar>
<section class="department">
<form action="noaction.php" class="departmentform">
<input type="text" name="id" id="doctor_id" placeholder="Doctor_id" class="departmentformInput"/>
<select type="text" name="department" id="department" placeholder="Department*" class="departmentformInput departmentwidthfix" required>
<option value= "ENT">ENT</option>
<option value= "Orthopedic">Orthopedic</option>
<option value= "General Medicine">General Medicine</option>
<option value= "Chemo">Chemo</option>
</select>
<input type="text" name="numbers_of_doctors" id="numbers_of_doctors" placeholder="Numbers_of_Doctors" class="departmentformInput datetime"/>
</form>
</section>
</div>
);
}
}
export default Department

View File

@ -0,0 +1,28 @@
import React from 'react';
import Navbar from './nav'
import './css/doctor.css'
class Doctors extends React.Component {
render(){
return(
<div>
<Navbar></Navbar>
<section class="doctor">
<form action="noaction.php" class="doctorform">
<input type="text" name="id" id="doctor_id" placeholder="Doctor_id" class="departmentformInput"/>
<input type="text" name="doctor_name" id="doctor_name" placeholder="Doctor_Name" class="doctorformInput datetime"/>
<select type="text" name="department" id="department" placeholder="Department*" class="doctorformInput doctorwidthfix" required>
<option value= "ENT">ENT</option>
<option value= "Orthopedic">Orthopedic</option>
<option value= "General Medicine">General Medicine</option>
<option value= "Chemo">Chemo</option>
</select>
</form>
</section>
</div>
);
}
}
export default Doctors

View File

@ -0,0 +1,17 @@
import React from "react";
import "./css/footer.css";
class Footer extends React.Component {
render() {
return (
<div>
<footer class="background">
<p class="text-footer">
CopyRight &copy; www.Medicare.com..All Right are Reserved.
</p>
</footer>
</div>
);
}
}
export default Footer;

View File

@ -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(
<div>
<nav class="smallnav">
<div class="smallnav-info">
<FontAwesomeIcon icon={faClock} />
<p>MON-FRI 8AM - 7PM</p>
</div>
<div class="smallnav-info">
<FontAwesomeIcon icon={faPhoneVolume} />
<p>CALL +91 9557860483</p>
</div>
<div class="icon">
<div class= "icondesign">
<FontAwesomeIcon icon={faFacebook} />
</div>
<div class= "icondesign">
<FontAwesomeIcon icon={faWhatsapp} />
</div>
<div class= "icondesign">
<FontAwesomeIcon icon={faInstagram} />
</div>
<div class= "icondesign">
<FontAwesomeIcon icon={faTwitter} />
</div>
</div>
</nav>
</div>
);
}
export default Header

View File

@ -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(
<div>
<Navbar></Navbar>
<div class="firstSection background">
<div class="main-box">
<div class="firstHalf">
<p class="text-big">Your doctor your treatment</p>
<div class="text-small">
Proactively envisioned multimedia based expertise and cross-media growth strategies. Seamlessly visualize quality intellectual capital without superior collaboration and idea-sharing.
<div class="buttons">
<button class="btn" onClick={this.onClick}>Admin Sign in</button>
</div>
</div>
</div>
<div class="secondHalf">
<img src={logo} alt="logoImage" />
</div>
</div>
</div>
<section class="section">
<div class="para">
<p class="sectionTag text-big">Health care</p>
<p class="sectionSubTag text-small">
For all your family needs
</p>
<p class="sectionSubTag text-small">
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.
</p>
</div>
<div class="thumbnail">
<img src="https://source.unsplash.com/900x900/?Health,doctor" alt="Laptop" />
</div>
</section>
<section class="section section-left">
<div class="para">
<p class="sectionTag text-big">Dentist</p>
<p class="sectionSubTag text-small">
For your child whitest teeths
</p>
<p class="sectionSubTag text-small">
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.
</p>
</div>
<div class="thumbnail">
<img src="https://source.unsplash.com/900x900/?Dentist" alt="Laptop" />
</div>
</section>
<section class="section">
<div class="para">
<p class="sectionTag text-big">Pediatrician</p>
<p class="sectionSubTag text-small">
Children medical care
</p>
<p class="sectionSubTag text-small">
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.
</p>
</div>
<div class="thumbnail">
<img src="https://source.unsplash.com/900x900/?Pediatrician" alt="Laptop" />
</div>
</section>
</div>
);
}
}
export default Home

View File

@ -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(<Redirect to="/" />)
}
}
}
export default Logout

View File

@ -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 (
<div>
<Navbar></Navbar>
<section class="appointment">
<h1 class="subHeading">Fill The below form for New Appointment</h1>
<h4 class="note"> * refers to mandatory</h4>
<h4>{this.state.msg}</h4>
<form action="noaction.php" method="post" class="form" onSubmit={this.onSubmit}>
<input type="text" name="id" id="patient_id" placeholder="patient_id*" class="formInput" required/>
<input type="text" name="name" id="name" placeholder="Your Name*" class="formInput" required value={this.state.name} onChange={this.onChangeName}/>
<input type="phone" name="phone" id="phone" placeholder="Your Phone*" class="formInput" required value={this.state.phone} onChange={this.onChangePhone}/>
<input type="email" name="email" id="email" placeholder="Your Email(optional)" class="formInput" value={this.state.email} onChange={this.onChangeEmail}/>
<input type="text" name="age" id="age" placeholder="Your Age*" class="formInput" required value={this.state.age} onChange={this.onChangeAge}/>
<select type="text" name="gender" id="gender" placeholder="Gender*" class="formInput widthfix" required value={this.state.gender} onChange={this.onChangeGender}>
<option value= "Male">Male</option>
<option value= "Female">Female</option>
<option value= "Other">Other</option>
</select>
<select type="text" name="department" id="department" placeholder="Department*" class="formInput widthfix" required value={this.state.department} onChange={this.onChangeDepartment}>
<option value= "ENT">ENT</option>
<option value= "Orthopedic">Orthopedic</option>
<option value= "General Medicine">General Medicine</option>
<option value= "Chemo">Chemo</option>
</select>
<input type="date" name="date" id="date" class="formInput datetime" required value={this.state.date} onChange={this.onChangeDate}/>
<input type="time" name="time" id="time" class="formInput datetime" required value={this.state.time} onChange={this.onChangeTime}/>
<textarea name="description" id="Description" cols="30" rows="10" placeholder="Ellaborate your concern*" class="formInput" required value={this.state.description} onChange={this.onChangeDescription}></textarea>
<button class="btn-submit btn-dark">Submit</button>
</form>
</section>
</div>
);
}
}
export default newAppointment