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

Multiple spaces #87

Open
des-des opened this issue Dec 12, 2018 · 0 comments
Open

Multiple spaces #87

des-des opened this issue Dec 12, 2018 · 0 comments
Assignees

Comments

@des-des
Copy link
Contributor

des-des commented Dec 12, 2018

We want to use the room-booker in south gaza, so we need multiple spaces we can use in the system

Backend

  • add venue/campus table (name, address, image_url, id)
  • add foreign key to rooms table (campusId)
  • update the sql query for selecting all rooms. Do a join to get the campus name
    Frontend
  • Edit this file: src/frontEnd/components/Rooms.jsx

We will have an array of rooms from the backend
we need to transform this array

// const campuses = rooms.reduce (...)
// will look like:
[
  {
    campusName,
    rooms: [room]
  }
]

then the render code

campuses.map(campus => {
 return <h2> campus.name </h2> {campus.rooms.map(room => <RoomCard {...room}> )}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants