Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Details Page - StaySpare 🐞 #16

Merged
merged 28 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6c8acd6
Add detailsPage
evansnyamekye Mar 4, 2024
e30e72f
Add detailsPageSlice to Redux
evansnyamekye Mar 4, 2024
6a780fb
Add CSS styling for DetailsPage
evansnyamekye Mar 4, 2024
0285923
Add DetailsPage component to App.js
evansnyamekye Mar 4, 2024
4e48913
Add Link to View Details in PlaceList component
evansnyamekye Mar 4, 2024
96d649d
Update Places.svg
evansnyamekye Mar 4, 2024
94804cc
Merge branch 'dev' into details_page
evansnyamekye Mar 4, 2024
baa2d0d
Update: modified detailsPage functionalities
evansnyamekye Mar 5, 2024
3144018
fix linters
evansnyamekye Mar 5, 2024
48d6880
Add Details Page component
tsheporamantso Mar 5, 2024
79db1f4
Add Slice
tsheporamantso Mar 5, 2024
8d765bd
Add fetchDetailsPage function and update View Details button
tsheporamantso Mar 5, 2024
337c278
Add classNames for styling
tsheporamantso Mar 5, 2024
5fd68a4
Add basic styles
tsheporamantso Mar 5, 2024
bb4ecd8
Resolve conflicts
tsheporamantso Mar 5, 2024
158d83f
Add price per night and reservation button to DetailsPage
George7h Mar 5, 2024
fd5215e
Update copyright notice in LICENSE file and add readme
George7h Mar 5, 2024
4a4d12e
Update: add media qurries to css-files
evansnyamekye Mar 5, 2024
1b391f1
Merge branch 'details_page' of https://github.com/tsheporamantso/fina…
evansnyamekye Mar 5, 2024
c102cfd
Update: modify css properties
evansnyamekye Mar 5, 2024
c423d33
Add className
tsheporamantso Mar 5, 2024
1d31630
Add styles for view details button and anchor tags
tsheporamantso Mar 5, 2024
0696a75
Remove commented out code in DetailsPage.js
tsheporamantso Mar 5, 2024
da0339c
Update Add Reservation button class name
tsheporamantso Mar 5, 2024
7e5d1c4
Remove unused comments and add style for pricepernight and add res bu…
tsheporamantso Mar 5, 2024
1c16ac0
Merge branch 'details_page' of github.com:tsheporamantso/final-capsto…
tsheporamantso Mar 5, 2024
1012050
Fix alignment issue in AddReservation.css
tsheporamantso Mar 5, 2024
aed1e6f
Add Link to back end repo on README file
tsheporamantso Mar 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Gladwin Tshepo Ramantso
Copyright (c) 2024 Gladwin Tshepo Ramantso & George Hamman & Evans kofi Nyamekye

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
197 changes: 160 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,193 @@
# Getting Started with Create React App
<a name="readme-top"></a>

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
<div align="center">
<img src='./public/images/StaySphere.svg" alt="logo" width="140" height="auto"
<h1><b> StaySphere </b></h1>

## Available Scripts
</div>

In the project directory, you can run:
<!-- TABLE OF CONTENTS -->

### `npm start`
# 📗 Table of Contents

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
- [📗 Table of Contents](#-table-of-contents)
- [📖 StaySphere ](#-staysphere-)
- [🛠 Built With ](#-built-with-)
- [Tech Stack ](#tech-stack-)
- [Key Features ](#key-features-)
- [🚀 Live Demo ](#-live-demo-)
- [💻 Getting Started ](#-getting-started-)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Install](#install)
- [Usage](#usage)
- [Deployment](#deployment)
- [👥 Authors ](#-authors-)
- [🔭 Future Features ](#-future-features-)
- [🤝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)
- [🙏 Acknowledgments ](#-acknowledgments-)
- [📝 License ](#-license-)

The page will reload when you make changes.\
You may also see any lint errors in the console.
<!-- PROJECT DESCRIPTION -->

### `npm test`
# 📖 StaySphere <a name="about-project"></a>

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
**StaySphere** this app built with Rails and React on two different apps. This application enables users to signin/signup create hotels/AirBnb listings and create reservations on each hotel.

### `npm run build`
## 🛠 Built With <a name="built-with"></a>

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
- **Ruby on Rails**
- **React and Redux**

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
### Tech Stack <a name="tech-stack"></a>

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
- Ruby
- Rails
- Postgresql

### `npm run eject`
<!-- Features -->

**Note: this is a one-way operation. Once you `eject`, you can't go back!**
### Key Features <a name="key-features"></a>

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
- **[React Components]**
- **[Redux]**
- **[Database]**
- **[Rails API]**

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
<p align="right">(<a href="#readme-top">back to top</a>)</p>

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
<!-- LIVE DEMO -->

## Learn More
## 🚀 Live Demo <a name="live-demo"></a>

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
- Coming soon.

To learn React, check out the [React documentation](https://reactjs.org/).
- [Link](https://github.com/tsheporamantso/final-capstone-rails-api) to Stay Sphere back-end repository

### Code Splitting
<p align="right">(<a href="#readme-top">back to top</a>)</p>

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
<!-- GETTING STARTED -->

### Analyzing the Bundle Size
## 💻 Getting Started <a name="getting-started"></a>

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
To get a local copy up and running, follow these steps.

### Making a Progressive Web App
### Prerequisites

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
In order to run this project you need:

### Advanced Configuration
- VScode
- Ruby
- Rails
- Postgres

### Setup

Clone this repository to your desired folder:

Make sure you setup and run the back-end first.

```sh
git clone git@github.com:tsheporamantso/final-capstone-react-front-end.git
cd final-capstone-react-front-end
```

### Install

Install this project with:

```sh
npm install
```

```sh
rails db:create
```

```sh
rails db:migrate
rails db:seed
```

### Usage

To run the project, execute the following command:

```sh
npm start
```

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
Not deployed

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- AUTHORS -->

## 👥 Authors <a name="authors"></a>

👤 **Gladwin Tshepo Ramantso**

- GitHub: [@tsheporamantso](https://github.com/tsheporamantso)
- Twitter: [@ramgt001](https://twitter.com/ramgt001)
- LinkedIn: [Tshepo Gladwin Ramantso](https://www.linkedin.com/in/tshepo-ramantso-b6a35433/)

👤 **George Hamman**

- GitHub: [@githubhandle](https://github.com/George7h)
- LinkedIn: <a href="https://www.linkedin.com/in/george-hamman-95b98224b/">George Hamman</a>

👤 **Evans Kofi Nyamekye**
- GitHub: [evansnyamekye](https://github.com/evansnyamekye)
- Twitter: [@nyamekye2131](https://twitter.com/nyamekye2131)
- LinkedIn: [Evans Kofi Nyamekye](https://www.linkedin.com/in/evans-kofi-nyamekye-1980a4117/)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- FUTURE FEATURES -->

## 🔭 Future Features <a name="future-features"></a>

- [ ] **Improve Styling**
- [ ] **Spesific room selection with each place**
- [ ] **Check to see if a person can book the hotel if they have rooms available**

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTRIBUTING -->

## 🤝 Contributing <a name="contributing"></a>

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/tsheporamantso/final-capstone-react-front-end/issues).

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- SUPPORT -->

## ⭐️ Show your support <a name="support"></a>

If you like this project feel free to leave a star and/or follow me on Github.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- ACKNOWLEDGEMENTS -->

## 🙏 Acknowledgments <a name="acknowledgements"></a>

I would like to thank the code reviewers for taking the time to review our project and for Microverse for supplying it.
Also I would like to thank [Murat Korkmaz](https://www.behance.net/muratk) on Behance for the design inspiration.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- LICENSE -->

## 📝 License <a name="license"></a>

### `npm run build` fails to minify
This project is [MIT](https://github.com/tsheporamantso/final-capstone-react-front-end/blob/1012050f1dd1a177d317f0a8c3b90ab76d956a7f/LICENSE) licensed.

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
<p align="right">(<a href="#readme-top">back to top</a>)</p>
2 changes: 1 addition & 1 deletion public/images/Places.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions src/AddPlace.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,52 @@
color: #fff;
border: none;
}

/* Mobile styles */
@media only screen and (max-width: 600px) {
.form-container {
width: 80vw;
padding: 4vw;
}

.container {
width: 100%;
}

.form-container h2 {
font-size: 30px;
}

.form-container input {
padding: 10px 5px;
}

.button {
padding: 8px;
}

.social-icons {
display: flex;
flex-direction: column;
}
}

/* Desktop styles */
@media only screen and (min-width: 601px) {
.form-container {
width: 50vw;
padding: 5vw;
}

.form-container h2 {
font-size: 35px;
}

.form-container input {
padding: 12px 20px;
}

.button {
padding: 10px;
}
}
35 changes: 34 additions & 1 deletion src/AddReservation.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.form-container {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}

select {
Expand All @@ -12,3 +14,34 @@ select {
border-radius: 5px;
box-sizing: border-box;
}

/* start of Mobile styles */
@media only screen and (max-width: 600px) {
.form-container {
display: flex;
align-items: center;
justify-content: center;
margin: auto;
width: 88%;
height: auto;
}

select {
padding: 10px 10px;
}
}

/* start of Desktop styles */
@media only screen and (min-width: 601px) {
.form-container {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}

select {
padding: 12px 20px;
}
}
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Layout from './Components/Layout';
import PlaceList from './Components/PlaceList';
import MyReservations from './Components/MyReservations';
import './App.css';
import DetailsPage from './Components/DetailsPage';
import AddPlace from './Components/AddPlace';
import AddReservation from './Components/AddReservation';
import DeletePlace from './Components/DeletePlace';
Expand All @@ -31,6 +32,7 @@ function App() {
element={<Layout />}
>
<Route path="placelist" element={<PlaceList />} />
<Route path="detailsPage/:id" element={<DetailsPage />} />
<Route path="myreservations" element={<MyReservations />} />
<Route path="addPlace" element={<AddPlace />} />
<Route path="addReservation" element={<AddReservation />} />
Expand Down
Loading
Loading