Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ath1l022 committed Dec 3, 2022
2 parents 38f9af8 + 6e8e93f commit db9984a
Show file tree
Hide file tree
Showing 14 changed files with 34,920 additions and 15,716 deletions.
50,282 changes: 34,586 additions & 15,696 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"axios": "^0.27.2",
"bootstrap": "^5.2.1",
"dayjs": "^1.11.6",
"npm": "^9.1.3",
"react": "^18.2.0",
"react-bootstrap": "^2.5.0",
"react-dom": "^18.2.0",
Expand All @@ -23,6 +24,7 @@
"react-lottie": "^1.2.3",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"update": "^0.7.4",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified src/assets/team/adithya.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/components/ReviewDialog/ReviewDialog.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.review_form__container{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 3rem;
}
.review_main_form{
display: flex;
flex-direction: column;
gap: 2rem;
}
59 changes: 59 additions & 0 deletions src/components/ReviewDialog/ReviewDialog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React, { useState } from 'react'
import './ReviewDialog.css'
import Dialog from '@mui/material/Dialog';
import axiosInstance from '../../utils/axios';
import { useEffect } from 'react';
import baseUrl from '../../utils/Urls';
const ReviewDialog = ({open,handleClose}) => {
const[description,setDescription]=useState('')
const[rate,setRate]=useState(0)
const[currUser,setCurrUser]=useState('')
const[currUserId,setCurrUserId]=useState()

useEffect(()=>{
axiosInstance.get(`${baseUrl}/current-user/`).then((response)=>{
setCurrUser(response.data.username)
setCurrUserId(response.data.id)
},(error)=>{

})
},[])
const handleSubmit=()=>{
axiosInstance.post(`${baseUrl}/reviews/`,{
desc: description,
rate: rate,
user_name: currUser,
user_foreign: currUserId
}).then((response)=>{
console.log(response)
},(error)=>{

})
}
return (
<div>
<Dialog
fullWidth={true}
maxWidth={"md"}
PaperProps={{
sx: { width: "100%", borderRadius: 5, m: 2, minHeight: "60vh" },
}}
open={open}
onClose={handleClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description">
<div className="review_form__container">
<form className='review_main_form' onSubmit={handleSubmit}>
<input type='text' placeholder='Description'value={description} onChange={(e)=>{setDescription(e.target.value)}}/>
<input type="number" placeholder='Enter your rating out of 10' value={rate} onChange={(e)=>{setRate(e.target.value)}}/>
<button type='submit'>Submit</button>
</form>
</div>


</Dialog>
</div>
)
}

export default ReviewDialog
22 changes: 19 additions & 3 deletions src/pages/Dashboard/Dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
}
.profile__pic{
border-radius: 15rem;
width: 10rem;
width: 12rem;
height: 12rem;
}
.contact_img img {
width: 100%;
Expand Down Expand Up @@ -143,8 +144,23 @@ background: linear-gradient(45deg, rgba(16,115,149,0.8608485630580357) 95%, rgba
font-weight: 500;
margin-bottom: 1.25rem;
}


.profile_name{
display: flex;
color: #ffff;
gap: 2rem;
padding: 2px;
margin-top: 2rem;
border-radius: 10px;
background-color: #002B5B;
}
.each_detail_profile{
display: flex;
flex-direction: row;
gap: 2rem;
}
.profile_name_content{
margin-top: 2rem;
}

@media screen and(min-width:200px) {
.container {
Expand Down
29 changes: 25 additions & 4 deletions src/pages/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import baseUrl from '../../utils/Urls'
import { useNavigate } from 'react-router-dom'
import Lottie from 'react-lottie'
import train_anim from '../../animations/88977-metro-rail.json'
import { AiFillEdit } from 'react-icons/ai'
import Editprofileform from '../../components/Editprofileform/Editprofileform'
import {Modal,Button} from 'react-bootstrap'
const Dashboard = () => {
const navigate=useNavigate()
const[curr_username,setCurr_username]=useState('')
Expand All @@ -17,6 +20,8 @@ const Dashboard = () => {
const[phno,setPhno]=useState('')
const[userimg,setUserimg]=useState()
const[frame,setFrame]=useState('places')
const [show, setShow] = useState(false);
const handleClose = () => setShow(false);

const parachuteEffect={
loop: true,
Expand Down Expand Up @@ -59,13 +64,29 @@ const Dashboard = () => {

<img className='profile__pic' src="https://avatars.githubusercontent.com/u/43471295?v=4" alt="your_image" />
<div className="profile__details">
<p className='profile_name'>Name: </p>
<p>Phno: {actualname}</p>
<p>username: {curr_username}</p>
<p>Email: {currEmail}</p>
<div className="each_detail_profile"><div className='profile_name'>Name: </div><span className='profile_name_content'>{actualname}</span> </div>
<div className="each_detail_profile"><div className='profile_name'>Phone no: </div><p className='profile_name_content'>{phno}</p></div>
<div className="each_detail_profile"><div className='profile_name'>Username: </div><p className='profile_name_content'>{curr_username}</p></div>
<div className="each_detail_profile"><div className='profile_name'>Email: </div><p className='profile_name_content'>{currEmail}</p></div>
<AiFillEdit onClick={()=>{ setShow(true) }}/>
</div>
<Lottie options={parachuteEffect} style={{width:'20%' ,height:'30%'}}/>
</div>
<Modal show={show} onHide={handleClose}>
<Modal.Header closeButton>
<Modal.Title>
Edit profile
</Modal.Title>
</Modal.Header>
<Modal.Body>
<Editprofileform />
</Modal.Body>
<Modal.Footer>
<Button variant="secondary" onClick={handleClose}>
Close Button
</Button>
</Modal.Footer>
</Modal>
{/* profile main ends here */}
<div className="booking__main">
<div className="booked__header_container">
Expand Down
29 changes: 20 additions & 9 deletions src/pages/PlaceDetailPage/PlaceDetailPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const PlaceDetailPage = () => {
const[travelId,setTravelId]=useState(0)
const[things,setThings]=useState([])
const[flights,setFlights]=useState([])
const[hotel,setHotel]=useState([])
useEffect(()=>{
axios.get(`${baseUrl}/flights/`).then((response)=>{
setFlights(response.data)
Expand All @@ -25,11 +26,15 @@ const PlaceDetailPage = () => {
},[])
useEffect(()=>{
axios.get(`${baseUrl}/trains/`).then((response)=>{
console.log(response)
setTrains(response.data)
},(error)=>{

})


},[])

useEffect(()=>{
axios.get(`${baseUrl}/things-to-do/`).then((res)=>{
console.log(res)
Expand All @@ -38,6 +43,12 @@ const PlaceDetailPage = () => {
console.log(error)
})
},[])

useEffect(()=>{
axios.get(`${baseUrl}/hotels/`).then((response)=>{
setHotel(response.data)
})
},[])
const nextFrame=()=>{
setState(state+1)
}
Expand Down Expand Up @@ -109,16 +120,16 @@ const PlaceDetailPage = () => {

<div className="place__header_name">Hotels in {placeName}
<ul>
{trains.map((train)=>{
return(
<li className='flight_details'>
<p>Train Name: {train.train_name}</p>
<p>Train Time: {train.flight_time}</p>
<p>Cost: {train.cost}</p>
<p>Next Date: {train.next_date}</p>
{hotel.map((hotels)=>
hotel.place_foreign===parseInt(id)?
(<li className='flight_details'>
<p>Hotel Name: {hotels.hotel_name}</p>
<p>Train Time: {hotels.near_point}</p>
<p>Cost: {hotels.famous_foods}</p>

</li>
)
})}
):null
)}
</ul>
</div>

Expand Down
32 changes: 32 additions & 0 deletions src/pages/ReviewPage/ReviewCards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react'
import './ReviewPage.css'
function ReviewCards({ desc,rate,name }) {
return (
<section class="t-bq-section" id="paul">
<div class="t-bq-wrapper t-bq-wrapper-boxed">
<div class="t-bq-quote t-bq-quote-paul">
<div class="t-bq-quote-paul-userpic"></div>
<div class="t-bq-quote-paul-qmark">
&#10077;
</div>
<div class="t-bq-quote-paul-pattern">
</div>
<div class="t-bq-quote-paul-base">
<blockquote class="t-bq-quote-paul-text" cite="Strugatsky Brothers">
{desc}
</blockquote>
<div class="t-bq-quote-paul-meta">
<div class="t-bq-quote-paul-meta-info">
<div class="t-bq-quote-paul-author"><cite>{name}</cite></div>
<div class="t-bq-quote-paul-source"><span className='rating__text'>Rating {rate}</span></div>
</div>
</div>
</div>
</div>
</div>
</section>

)
}

export default ReviewCards
Loading

0 comments on commit db9984a

Please sign in to comment.