Commit 30549259 authored by Hasitha Samarasekara's avatar Hasitha Samarasekara

Merge branch 'IT18063288' into 'master'

It18063288

See merge request !19
parents 98164579 5fdf3eef
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const ClassStudentRequestSchema = new Schema({
class_id:{type:mongoose.Schema.Types.ObjectId,ref: 'Classes'},
student_id:{type:mongoose.Schema.Types.ObjectId,ref: 'student'},
tutor_id:{type:mongoose.Schema.Types.ObjectId,ref: 'tutor'},
},{
timestamps:true,
});
const ClassStudentRequestList = mongoose.model('ClassStudentRequestList',ClassStudentRequestSchema);
module.exports = ClassStudentRequestList;
\ No newline at end of file
......@@ -2,6 +2,7 @@ const router = require('express').Router();
let classes = require('../models/createClass.model');
let student = require('../models/student.user.model');
let studentList = require('../models/ClassStudentList.model');
let studentRequestList = require('../models/ClassStudentRquestList.model');
const mongoose = require("mongoose");
router.route('/add').post(async(req,res) =>{
......@@ -161,4 +162,64 @@ router.route('/studentList/:id').get(function (req, res) {
});
});
router.route('/studentRequestList/add').post((req, res) => {
const class_id = req.body._id;
const student_id = req.body.student_id;
const tutor_id = req.body.tutor_id;
console.log("classID: " + class_id);
console.log("student_nic: " + student_id);
classes.findById(class_id,function(err, tutorsClass){
if(!tutorsClass)
res.status(404).send("Sorry Class Could not Found.");
else {
student.find({"_id": student_id}).then(student => {
console.log(student)
console.log(student[0]._id)
if(student[0].student_nic === ""){
res.status(500).send("Sorry, This Student Not Registered");
}else{
const student_id = student[0]._id;
const newClassStudent = new studentRequestList({
class_id,
student_id,
tutor_id
});
studentRequestList.find({"student_id" : student_id, "class_id" : class_id}).then(reqClass =>{
console.log("reqClass : ")
console.log(reqClass)
if(reqClass.length > 0){
res.status(501).send("Already Request to this Class");
}
else{
newClassStudent.save().then(result =>{
res.json('Student Requested is complete!');
})
.catch(err =>{
res.status(500).send("Update not possible");
});
}
})
}
}).catch(err => res.status(500).json('Eroor: '+ err));
}
});
});
module.exports = router;
\ No newline at end of file
......@@ -14,11 +14,9 @@ import Dashboard from "./Components/Admin/Dashboard";
import StudentDashboard from "./Components/Student/StudentDashboard";
import QuestionDetails from "./Components/IT18050240/question_details"
import QuestionLayout from "./Components/IT18050240/question_layout"
import AdminQuestionManagement from "./Components/IT18050240/admin_question_management.js"
//import AdminQuestionManagement from "./Components/IT18050240/admin_question_management.js"
import QuestionBank from "./Components/IT18050240/question_bank"
import LessonAndExam from "./Components/IT18050240/lessonandexampage";
import AutomaticQuestion from "./Components/IT18050240/automatic_question"
import Upload from "./Components/IT18050240/UploadPage";
import TutorProfileView from "./Components/HomePage/TutorProfileView";
function App() {
return (
......@@ -30,7 +28,8 @@ function App() {
<Route path="/SignUp" exact component={SignUp}/>
<Route path="/beforeConfirm" exact component={beforeConfirmation}/>
<Route path="/AccountVerified/:id" exact component={VerifiedAccount}/>
{/*<Route path="/studentDashboard" exact component={StudentDashboard}/>*/}
<Route path="/Home/ViewProfile/:id" exact component={TutorProfileView}/>
<Route path="/studentDashboard" exact component={StudentDashboard}/>
{/*<Route path="/" exact component={Dashboard}/>*/}
......@@ -38,13 +37,10 @@ function App() {
<Route path="/admin"><Dashboard/></Route>
<Route path="/studentDashboard"><StudentDashboard/></Route>
<Route path="/questiondetails" exact component={QuestionDetails}/>
<Route path="/question/:id" exact component={QuestionLayout}/>
<Route path="/questionmanagement/:id" exact component={AdminQuestionManagement}/>
<Route path="/question" exact component={QuestionLayout}/>
{/*<Route path="/questionmanagement" exact component={AdminQuestionManagement}/>*/}
<Route path="/questionbank" exact component={QuestionBank}/>
<Route path="/questionmanagement" exact component={AdminQuestionManagement}/>
<Route path="/lesson" exact component={LessonAndExam}/>
<Route path="/automaticquestion" exact component={AutomaticQuestion}/>
<Route path="/upload" exact component={Upload}/>
{/*<Route path="/edititem/:id" exact component={AdminQuestionManagement}/>*/}
</Switch>
......
......@@ -15,6 +15,7 @@ import * as Icon from 'react-bootstrap-icons';
import axios from "axios";
import * as configs from "../Config/config";
import TutorCard from "./HomePage/TutorCard";
import RightSideAdd from "./HomePage/AdvertisementRightSide";
import swal from "sweetalert";
import Carousel from "react-bootstrap/Carousel";
......@@ -414,20 +415,7 @@ export default class Home extends Component {
let FinalStudentCountScore = (valueForStudentCount * Number(this.state.RVStudentCount)) / 100;
let FinalScore = finalReviewScore + FinalRatingScore + FinalStudentCountScore;
const temp = {
tutor_id: tutor.teacher,
tutor_name: tutor.tutor_name,
tutor_subjects: tutor.tutor_subjects,
tutor_class_type: tutor.tutor_class_type,
tutor_main_district: tutor.tutor_main_district,
tutor_main_city: tutor.tutor_main_city,
tutor_medium: tutor.tutor_medium,
tutor_qualification: tutor.tutor_qualification,
tutor_reviewValue: tutor.tutor_reviewValue,
tutor_avg_rating: tutor.tutor_avg_rating,
tutor_finalScore: FinalScore,
tutor_review_count: tutor.tutor_review_count
}
let oneday = 24 * 60 * 60 * 1000;
let NoOFDays = (todayDate - new Date(tutor.tutor_registered_date));
let NoOFDaysRegistered = Math.ceil(NoOFDays / oneday);
......@@ -437,8 +425,39 @@ export default class Home extends Component {
//
// }
if (NoOFDaysRegistered >= 365 && Number(tutor.tutor_review_count) > 10) {
const temp = {
tutor_id: tutor.teacher,
tutor_name: tutor.tutor_name,
tutor_subjects: tutor.tutor_subjects,
tutor_class_type: tutor.tutor_class_type,
tutor_main_district: tutor.tutor_main_district,
tutor_main_city: tutor.tutor_main_city,
tutor_medium: tutor.tutor_medium,
tutor_qualification: tutor.tutor_qualification,
tutor_reviewValue: tutor.tutor_reviewValue,
tutor_avg_rating: tutor.tutor_avg_rating,
tutor_finalScore: FinalScore,
tutor_review_count: tutor.tutor_review_count,
recommended_ : true
}
TutorRecommendedFinalList.push(temp);
} else {
const temp = {
tutor_id: tutor.teacher,
tutor_name: tutor.tutor_name,
tutor_subjects: tutor.tutor_subjects,
tutor_class_type: tutor.tutor_class_type,
tutor_main_district: tutor.tutor_main_district,
tutor_main_city: tutor.tutor_main_city,
tutor_medium: tutor.tutor_medium,
tutor_qualification: tutor.tutor_qualification,
tutor_reviewValue: tutor.tutor_reviewValue,
tutor_avg_rating: tutor.tutor_avg_rating,
tutor_finalScore: FinalScore,
tutor_review_count: tutor.tutor_review_count,
recommended_ : false
}
TutorOnlyFilterFinalList.push(temp);
}
......@@ -880,50 +899,63 @@ export default class Home extends Component {
}
</div>
<div className="row"
style={{background: '#F5F4ED', marginLeft: '50px', marginRight: '50px', marginTop: '10px'}}>
<h5 style={{margin: '10px'}}>{this.state.TutorFilteredList.length} Results</h5>
style={{background: '#1E4258', marginLeft: '50px', marginRight: '50px', marginTop: '10px'}}>
<h5 style={{color: "white", float: 'left',margin: '15px'}}>{this.state.TutorFilteredList.length} Results</h5>
</div>
{this.state.TutorFilteredRecommendedListFinal.length > 0 ?
<div className="row"
style={{
background: '#F5F4ED',
marginLeft: '50px',
marginRight: '50px',
marginTop: '10px'
}}>
<h4>Recommended List</h4>
</div>
:
<div>
</div>
}
<div className="">
{this.state.TutorFilteredRecommendedListFinal.length > 0 ? this.state.TutorFilteredRecommendedListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
<div className="row">
<div className="col-8">
{this.state.TutorFilteredRecommendedListFinal.length > 0 ?
<div className="row"
style={{
background: '#1E4258',
marginLeft: '50px',
marginRight: '0px',
marginTop: '10px'
}}>
<h4 style={{color: "white", float: 'left',margin: '15px'}}>Recommended List</h4>
</div>
:
<div>
</div>
}
<div className="" style={{marginLeft:'50px',marginRight:'0px'}}>
{this.state.TutorFilteredRecommendedListFinal.length > 0 ? this.state.TutorFilteredRecommendedListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
</div>
</div>
{this.state.TutorOnlyFilteredListFinal.length > 0 ?
<div className="row" style={{
background: '#F5F4ED',
marginLeft: '50px',
marginRight: '50px',
marginTop: '10px'
}}>
<h4>Filtered List</h4>
</div>
:
<div>
</div>
}
{this.state.TutorOnlyFilteredListFinal.length > 0 ?
<div className="row" style={{
background: '#1E4258',
marginLeft: '50px',
marginRight: '0px',
marginTop: '10px'
}}>
<h4 style={{color: "white", float: 'left',margin: '15px'}}>Filtered List</h4>
</div>
:
<div>
</div>
}
<div className="">
{this.state.TutorOnlyFilteredListFinal.length > 0 ? this.state.TutorOnlyFilteredListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
<div className="" style={{marginLeft:'50px',marginRight:'0px'}}>
{this.state.TutorOnlyFilteredListFinal.length > 0 ? this.state.TutorOnlyFilteredListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
</div>
</div>
<div className="col-3">
{this.state.TutorOnlyFilteredListFinal.length > 0 ?
<RightSideAdd></RightSideAdd>
:
<div>
</div>
}
</div>
</div>
<div className="app-main__outer">
<HomeFooter/>
......
import React, {Component} from "react";
import Carousel from "react-bootstrap/Carousel";
import AddR1 from "../../Images/ad_r1.jpg";
import AddR2 from "../../Images/ad_r2.jpg";
export default class AdvertisementRightSide extends Component{
constructor(props) {
super(props);
this.state = {
};
//this.FindTutor = this.FindTutor.bind(this);
}
render() {
return(
<div>
<Carousel style={{width:'100%'}} nextLabel={false} prevLabel={false} indicators={false} >
<Carousel.Item>
<img
className="toast-bottom-full-width"
src={AddR1}
alt="First slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img
className="d-block w-100"
src={AddR2}
alt="Second slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
{/*<Carousel.Item>*/}
{/* <img*/}
{/* className="d-block w-100"*/}
{/* src={AddR1}*/}
{/* alt="Third slide"*/}
{/* />*/}
{/* <Carousel.Caption>*/}
{/* </Carousel.Caption>*/}
{/*</Carousel.Item>*/}
</Carousel>
</div>
)
}
}
\ No newline at end of file
import React, {Component} from "react";
import Carousel from "react-bootstrap/Carousel";
import AddR1 from "../../Images/ad_top_s_01.jpg";
import AddR2 from "../../Images/ad_r2.jpg";
export default class AdvertisementTopSmall extends Component{
constructor(props) {
super(props);
this.state = {
};
//this.FindTutor = this.FindTutor.bind(this);
}
render() {
return(
<div className="row">
<div className="col">
<Carousel style={{width:'100%',height:'100px', margin:'10px'}} nextLabel={false} prevLabel={false} indicators={false} >
<Carousel.Item>
<img style={{width:'90%'}}
className="toast-bottom-full-width"
src={AddR1}
alt="First slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img style={{width:'90%'}}
className="d-block w-100"
src={AddR1}
alt="Second slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
{/*<Carousel.Item>*/}
{/* <img*/}
{/* className="d-block w-100"*/}
{/* src={AddR1}*/}
{/* alt="Third slide"*/}
{/* />*/}
{/* <Carousel.Caption>*/}
{/* </Carousel.Caption>*/}
{/*</Carousel.Item>*/}
</Carousel>
</div>
<div className="col">
<Carousel style={{width:'100%',height:'100px', margin:'10px'}} nextLabel={false} prevLabel={false} indicators={false} >
<Carousel.Item>
<img style={{width:'90%'}}
className="toast-bottom-full-width"
src={AddR1}
alt="First slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img style={{width:'90%'}}
className="d-block w-100"
src={AddR1}
alt="Second slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
{/*<Carousel.Item>*/}
{/* <img*/}
{/* className="d-block w-100"*/}
{/* src={AddR1}*/}
{/* alt="Third slide"*/}
{/* />*/}
{/* <Carousel.Caption>*/}
{/* </Carousel.Caption>*/}
{/*</Carousel.Item>*/}
</Carousel>
</div>
</div>
)
}
}
\ No newline at end of file
......@@ -15,8 +15,8 @@ export default class TutorCard extends Component{
render() {
return(
<div className="main-card mb-3 card">
<div className="row" style={{background:'#F5F4ED', marginLeft:'50px', marginRight:'50px', marginTop:'10px', marginBottom:'10px'}}>
<div className="col-9">
<div className="row" style={{background:'#F5F4ED', marginLeft:'10px', marginRight:'10px', marginTop:'10px', marginBottom:'10px'}}>
<div className="col">
<div className="row" style={{background:'#F8F8F8'}}>
<div className="col-8" style={{margin:'5px', border:'solid', padding:'10px', borderColor:'#216E9B'}}>
<div className="row">
......@@ -61,44 +61,53 @@ export default class TutorCard extends Component{
</div>
<div className="col" style={{margin:'5px', border:'solid', padding:'10px', borderColor:'#216E9B'}}>
<div className="row">
<div className="col-1">
<img src={Star} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col" >
<h5 style={{float:"left"}}>{this.props.data.tutor_avg_rating.toFixed(1)}</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<img src={ReviewImg} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col">
<h5 style={{float:"left"}}>{this.props.data.tutor_review_count} reviews</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<br/>
{/*<img src={Calender} style={{width:'20px', height:'20px'}}/>*/}
<div className="row">
<div className="col-1">
<img src={Star} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col" >
<h5 style={{float:"left"}}>{this.props.data.tutor_avg_rating.toFixed(1)}</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<img src={ReviewImg} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col">
<h5 style={{float:"left"}}>{this.props.data.tutor_review_count} reviews</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<br/>
{/*<img src={Calender} style={{width:'20px', height:'20px'}}/>*/}
</div>
<div className="col">
{/*<h5 style={{float:"left"}}>6y experience</h5>*/}
</div>
</div>
<div className="row">
<Link to={`/Home/ViewProfile/${this.props.data.tutor_id}`}> <button className="form-control"
style={{background:"#216E9B", color:"white", marginLeft:'15px', marginRight:'15px'}}><b>View Profile</b></button></Link>
</div>
</div>
<div className="col">
{/*<h5 style={{float:"left"}}>6y experience</h5>*/}
<div className="col-">
{this.props.data.recommended_ ?
<img src={RecommendIcon} style={{width:'80px', height:'70px', float:'left', margin:'10px'}}/>
:
<div>
</div>
}
</div>
</div>
<div className="row">
<Link to={`/Home/ViewProfile/${this.props.data.tutor_id}`}> <button className="form-control"
style={{background:"#216E9B", color:"white", marginLeft:'15px', marginRight:'15px'}}><b>View Profile</b></button></Link>
</div>
</div>
</div>
</div>
<div className="col" style={{background:'#F8F8F8'}}>
<div>
<br/>
</div>
<img src={RecommendIcon} style={{width:'100px', height:'90px', float:'left', margin:'10px'}}/>
</div>
</div>
</div>
......
......@@ -7,6 +7,12 @@ import * as configs from "../../Config/config";
import * as Icon from "react-bootstrap-icons";
import moment from "moment";
import swal from "sweetalert";
import TopSmallAdd from "./AdvertisementTopSmall";
import {Link} from "react-router-dom";
import {Button, Modal} from "react-bootstrap";
export default class TutorProfileView extends Component{
......@@ -44,6 +50,20 @@ export default class TutorProfileView extends Component{
Institute:'',
tutorManinCities : [],
detailReviewList : [],
show : false,
class_admissionFee : '',
class_batchYear : '',
class_batchNo : '',
class_conductDay : '',
class_conductTime : '',
class_fee : '',
class_feeOption : '',
class_method : '',
class_startingDate : Date,
class_type : '',
class_instituteName : '',
class_subject : '',
class_id : '',
};
......@@ -55,8 +75,14 @@ export default class TutorProfileView extends Component{
this.onTutorID = this.onTutorID.bind(this);
this.submitRating = this.submitRating.bind(this);
this.getTutorRatingAndReviews = this.getTutorRatingAndReviews.bind(this);
this.onClickClassViewButton = this.onClickClassViewButton.bind(this);
this.onHideModal = this.onHideModal.bind(this);
this.onRequestToClass = this.onRequestToClass.bind(this);
this.clearClassLabels = this.clearClassLabels.bind(this);
}
componentDidMount() {
const user_email = localStorage.getItem("email");
......@@ -188,6 +214,129 @@ export default class TutorProfileView extends Component{
})
}
onRequestToClass(e){
const logUser = localStorage.getItem("userID");
console.log(logUser)
if(logUser == null || logUser == ""){
swal("Not Login Yet", "Please Login to the system first.", "warning");
}
else{
const payload = {
_id : e.target.value,
student_id : logUser,
tutor_id : this.state.tutor_id
}
axios.post(configs.BASE_URL + '/createClass/studentRequestList/add', payload)
.then(res => {
console.log(res)
swal("success!!!", res.data, "success").then(() => {
//e.target.reset();
//window.location.reload();
this.clearClassLabels();
});
})
.catch(function (error) {
if (error.response) {
// The request was made and the server responded with a status code
// that falls out of the range of 2xx
//console.log(error.response.data);
//console.log(error.response.status);
//console.log(error.response.headers);
if(error.response.status === 500){
swal("Sorry!!!", "This Student Not Registered", "warning").then(() => {
//e.target.reset();
//window.location.reload();
});
}
else if(error.response.status === 501){
swal("Sorry!!!", "Already Requested to this Class", "warning").then(() => {
//e.target.reset();
//window.location.reload();
});
}
} else if (error.request) {
// The request was made but no response was received
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
// http.ClientRequest in node.js
// console.log(error.request);
} else {
// Something happened in setting up the request that triggered an Error
//console.log('Error', error.message);
}
//console.log(error.config);
});
}
}
clearClassLabels(){
this.setState({
show : false,
class_admissionFee : '',
class_batchYear : '',
class_batchNo : '',
class_conductDay : '',
class_conductTime : '',
class_fee : '',
class_feeOption : '',
class_method : '',
class_startingDate : Date,
class_type : '',
class_instituteName : '',
class_subject : '',
class_id : '',
})
}
onHideModal(){
this.setState({
show:false
})
}
onClickClassViewButton(e){
this.state.TutorClassList.map((tutorClass) => {
if(tutorClass._id === e.target.value){
console.log(tutorClass);
let institute = "";
if(tutorClass.institute_id != null){
institute = tutorClass.institute_id.institute_name
}
this.setState({
show: true,
class_admissionFee : tutorClass.AdmissionFee,
class_batchYear : tutorClass.batchYear,
class_batchNo : tutorClass.batch_no,
class_conductDay : tutorClass.class_conduct_day,
class_conductTime : tutorClass.class_conduct_time,
class_fee : tutorClass.class_fee,
class_feeOption : tutorClass.class_fee_option,
class_method : tutorClass.class_method,
class_startingDate : tutorClass.class_startingDate,
class_type : tutorClass.class_type,
class_instituteName : institute,
class_subject : tutorClass.subject,
class_id : tutorClass._id
});
}
})
}
onClickRatingValue(e) {
console.log(e.target.value);
this.setState({
......@@ -267,13 +416,144 @@ export default class TutorProfileView extends Component{
// console.log("payload");
}
render() {
const ViewClassModal = props => (
<div>
<Modal
{...props}
size="xl"
aria-labelledby="contained-modal-title-vcenter"
centered
show={true}
>
<Modal.Header>
<Modal.Title id="contained-modal-title-vcenter">
<span>
<h3>{this.state.class_type}({this.state.class_batchYear}) - {this.state.class_method === 'Online class'? this.state.class_method : this.state.class_instituteName}</h3>
</span>
</Modal.Title>
</Modal.Header>
<Modal.Body>
<div className="row">
<div className="col">
<div className="row" style={{marginLeft: '10px'}}>
<h4>{this.state.class_subject}</h4>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Class Method </span>
</div>
<div className="col">
<b>: {this.state.class_method}</b>
</div>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Class Type </span>
</div>
<div className="col">
<b>: {this.state.class_type}</b>
</div>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Conducting Day </span>
</div>
<div className="col">
<b>: {this.state.class_conductDay}</b>
</div>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Admission Fee </span>
</div>
<div className="col">
<b>: {this.state.class_admissionFee}</b>
</div>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span><b>Starting Date </b></span>
</div>
<div className="col">
<h5 style={{color:'darkblue'}}>: {moment(this.state.class_startingDate).format("LL")}</h5>
</div>
</div>
</div>
<div className="col">
<div className="row" style={{marginLeft: '10px'}}>
<br/>
<br/>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Year </span>
</div>
<div className="col">
<b>: {this.state.class_batchYear}</b>
</div>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Batch </span>
</div>
<div className="col">
<b>: {this.state.class_batchNo}</b>
</div>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Conducting Day </span>
</div>
<div className="col">
<b>: {this.state.class_conductTime}</b>
</div>
</div>
<div className="row" style={{marginLeft: '10px'}}>
<div className="col-4">
<span>Class Fee </span>
</div>
<div className="col">
<b>: {this.state.class_fee}</b>
</div>
</div>
</div>
</div>
</Modal.Body>
<Modal.Footer>
<Button onClick={this.onRequestToClass} style={{background: "#086232", color: "white", margin: '10px'}} value={this.state.class_id}>Request to Class</Button>
<Button onClick={this.onHideModal} style={{background: "#8D4433", color: "white", margin: '10px'}}>Close</Button>
</Modal.Footer>
</Modal>
</div>
);
return(
<div className="App" style={{padding:'10px',paddingTop:'0px'}}>
<div className="row" style={{width:'100%'}}>
<ItemNav/>
</div>
<div className="App" style={{marginTop:'80px',paddingTop:'0px'}}>
<div className="row" style={{width:'100%'}}>
<TopSmallAdd></TopSmallAdd>
</div>
{this.state.show && ViewClassModal()}
<div className="row">
<div className="col">
<div className="row">
......@@ -441,7 +721,7 @@ export default class TutorProfileView extends Component{
<label>{tutorClass.batchYear}</label>
</div>
<div className="col">
<label>{moment(tutorClass.class_startingDate).format("L") }</label>
<label>{moment(tutorClass.class_startingDate).format("LL") }</label>
</div>
<div className="col">
<label>{tutorClass.subject}</label>
......@@ -450,7 +730,8 @@ export default class TutorProfileView extends Component{
<label>{tutorClass.class_conduct_day} - {tutorClass.class_conduct_time}</label>
</div>
<div className="col">
<button className="rounded" style={{background:'Orange', padding:'3px', width:'60px'}} value={""} >View</button>
<button className="rounded" style={{background:'Orange', padding:'3px', width:'60px'}} value={tutorClass._id}
onClick={this.onClickClassViewButton}>View</button>
</div>
</div>
......@@ -555,7 +836,7 @@ export default class TutorProfileView extends Component{
<label>{tutorClass.batchYear}</label>
</div>
<div className="col">
<label>{moment(tutorClass.class_startingDate).format("L") }</label>
<label>{moment(tutorClass.class_startingDate).format("LL") }</label>
</div>
<div className="col">
<label>{tutorClass.subject}</label>
......@@ -567,7 +848,7 @@ export default class TutorProfileView extends Component{
<label>{tutorClass.class_conduct_day} - {tutorClass.class_conduct_time}</label>
</div>
<div className="col">
<button className="rounded" style={{background:'Orange', padding:'3px', width:'60px'}} value={""} onClick={e => this.onSelectOneClass(e)}>View</button>
<button className="rounded" style={{background:'Orange', padding:'3px', width:'60px'}} value={tutorClass._id} onClick={this.onClickClassViewButton}>View</button>
</div>
</div>
......
......@@ -65,8 +65,9 @@ export default class NavBar extends Component {
top: '15px',
right: '120px',
color: '#EAE4E4',
marginRight: '50px'
}}><h5>{this.state.user_name !== null ? <span style={{cursor:'pointer'}} onClick={()=>{ window.location.replace("/studentDashboard");}}> {this.state.user_name}</span> : <label onClick={() => {
marginRight: '50px',
cursor:'pointer'
}}><h5>{this.state.user_name !== null ? <span style={{cursor:'pointer'}} onClick={()=>{ window.location.replace("/studentDashboard");}}> {this.state.user_name}</span> : <label style={{cursor:'pointer'}} onClick={() => {
// window.location.replace("UserLogin");
window.location = '/UserLogin';
}}>Login</label>} </h5></label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment