Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a75c458
Update README.md
Sami-Aiyathurai Oct 31, 2023
139242a
Merge pull request #2 from meic-123/Sami
meic-123 Oct 31, 2023
a81a8ea
Update README.md
Sami-Aiyathurai Oct 31, 2023
cd7e28f
Merge pull request #3 from meic-123/Sami
meic-123 Oct 31, 2023
12ad31e
testing
Nov 2, 2023
af1b8c9
Who knows
Nov 2, 2023
9fd2d3e
Merge pull request #4 from meic-123/Sami
meic-123 Nov 2, 2023
77ffc8c
skeleton pages
achristen3386 Nov 2, 2023
bab6c5b
Merge pull request #5 from meic-123/Home-page-and-skeleton-Anna
meic-123 Nov 2, 2023
90819b5
routing and links
achristen3386 Nov 2, 2023
2be0a03
Merge pull request #6 from meic-123/Home-page-and-skeleton-Anna
meic-123 Nov 3, 2023
342e2f4
finish print bikes and stations
Nov 7, 2023
f2d7205
update bikes and stations
Nov 7, 2023
637952f
Merge pull request #7 from meic-123/Sami
meic-123 Nov 7, 2023
7ed8828
Header and Footer
meic123 Nov 7, 2023
7a00663
Header and Footer CSS
meic-123 Nov 7, 2023
a665153
Header and Footer HTML
meic-123 Nov 7, 2023
b8c8774
tables for users, memberships and transactions
Nov 7, 2023
91b8622
Merge pull request #8 from meic-123/Sami
meic-123 Nov 7, 2023
43e47e9
Update Home Page.html.erb
meic-123 Nov 7, 2023
6706d56
Update index.html.erb
meic-123 Nov 7, 2023
5a20337
resolve conflict
Nov 7, 2023
63ec632
Merge branch 'master' of https://github.com/meic-123/valetbike into a…
Nov 7, 2023
0aa7d63
Merge pull request #12 from meic-123/anh-print-data
Anhtran0208 Nov 7, 2023
3d8af12
Update index.html.erb
meic123 Nov 7, 2023
af0f248
Merge branch 'mei' of https://github.com/meic-123/valetbike into mei
meic123 Nov 7, 2023
95560ba
Update index.html.erb
meic123 Nov 7, 2023
9a80fc7
Merge pull request #13 from meic-123/mei
meic-123 Nov 7, 2023
c852917
Fixed href link
Nov 7, 2023
0cbc92a
Merge pull request #14 from meic-123/Sami
meic-123 Nov 7, 2023
f625889
created migrations for trip, favorite and report
Nov 8, 2023
fdd0997
Merge pull request #15 from meic-123/Sami
meic-123 Nov 8, 2023
2652aa2
Move Stylesheets from Application to Global
meic123 Nov 9, 2023
283b39e
made relationship between memberships and users
Nov 9, 2023
52c128c
login and logout skeleton functionality
achristen3386 Nov 9, 2023
baabc6a
Started with the relations for trips
Nov 9, 2023
1aecb6d
Merge pull request #16 from meic-123/login
meic-123 Nov 9, 2023
b533e3b
header + footer on each page
meic123 Nov 11, 2023
2e53998
Merge branch 'master' into Sami
Sami-Aiyathurai Nov 12, 2023
dcc8068
Merge pull request #17 from meic-123/Sami
meic-123 Nov 12, 2023
90310cf
Merge branch 'master' of github.com:meic-123/valetbike into Sami
Sami-Aiyathurai Nov 12, 2023
8966974
something is wrong
Sami-Aiyathurai Nov 12, 2023
b2c8154
Merge pull request #18 from meic-123/Sami
meic-123 Nov 12, 2023
da87593
edited global css
meic123 Nov 12, 2023
cd3aaf4
Merge branch 'master' into mei
meic-123 Nov 12, 2023
a9c6ca8
Merge pull request #19 from meic-123/mei
meic-123 Nov 12, 2023
880dd72
update routes
meic123 Nov 12, 2023
ea42156
update routes
meic123 Nov 12, 2023
f8c8900
Merge branch 'mei' of https://github.com/meic-123/valetbike into mei
meic123 Nov 12, 2023
e2e7bbb
Update routes.rb
meic123 Nov 12, 2023
a99637a
Merge pull request #20 from meic-123/mei
meic-123 Nov 12, 2023
0832fbb
Revert "Mei routes"
meic-123 Nov 12, 2023
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
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ GEM

PLATFORMS
arm64-darwin-20
arm64-darwin-22
x86_64-linux

DEPENDENCIES
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# ValetBike
Calicoders
local version testing

Smith College CSC223: Software Engineering\
Starter App for ValetBike project
Expand Down Expand Up @@ -155,3 +157,5 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses.


Sami Aiyathurai
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
*= require_tree .
*= require_self
*/

Empty file modified app/assets/stylesheets/flexbox-ultralight.css
100755 → 100644
Empty file.
71 changes: 71 additions & 0 deletions app/assets/stylesheets/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,74 @@ body {
color: var(--black-color);
background: var(--white-color);
}

/* Apply styles to the header element */
header {
background-color: #9698fc; /* Background color for the header */
color: #fff; /* Text color for the header */
padding: 10px; /* Padding around the header content */
width: 100%; /* Make the header take up the whole width */
margin: 0; /* Remove default margin */
}

/* Style the navigation links */
header nav ul {
list-style: none;
padding: 20px 0;
margin: 0;
text-align: right; /* Align the links to the right */
}

header nav ul li {
display: inline;
margin-right: 20px;
}

header nav ul li a {
text-decoration: none;
color: #fff;
}

/* Style for the header links on hover */
header nav ul li a:hover {
text-decoration: underline;
}

/* Apply styles to the footer element */
footer {
background-color: #9698fc; /* Background color for the footer */
color: #fff; /* Text color for the footer */
padding: 10px; /* Padding around the footer content */
width: 100%; /* Make the footer take up the whole width */
margin: 0; /* Remove default margin */
position: fixed; /* Position the footer as fixed */
bottom: 0; /* Stick it to the bottom of the viewport */
left: 0; /* Align to the left of the viewport */
right: 0; /* Align to the right of the viewport */
}

/* Style the footer links */
footer ul {
list-style: none; /* Remove bullet points from the list */
padding: 20px 0;
margin: 0;
text-align: right; /* Align the links to the right */
}

footer li {
display: inline; /* Display the list items horizontally */
margin-right: 20px; /* Add space between list items */
}

footer a {
text-decoration: none; /* Remove underlines from the links */
color: #fff; /* Text color for the links */
}

/* Style for the footer links on hover */
footer a:hover {
text-decoration: underline; /* Underline the links on hover */
}



4 changes: 4 additions & 0 deletions app/controllers/about_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class AboutController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/account_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class AccountController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/active_trip_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class ActiveTripController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/add_more_time_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class AddMoreTimeController < ApplicationController
def index
end
end
11 changes: 11 additions & 0 deletions app/controllers/bikes_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class BikesController < ApplicationController
def index
@bikes = Bike.all.order(identifier: :asc)
end

def show
@bike = Bike.find(params[:id])
rescue ActiveRecord::RecordNotfound
redirect_to root_path
end
end
4 changes: 4 additions & 0 deletions app/controllers/edit_current_trip_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class EditCurrentTripController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/help_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class HelpController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/home_page_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class HomePageController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/how_it_works_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class HowItWorksController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/login_sign_up_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class LoginSignUpController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/membership_plans_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class MembershipPlansController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/past_trips_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class PastTripsController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/payment_information_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class PaymentInformationController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/report_a_problem_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class ReportAProblemController < ApplicationController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/settings_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class SettingsController < ApplicationController
def index
end
end
6 changes: 6 additions & 0 deletions app/controllers/stations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@ class StationsController < ApplicationController
def index
@stations = Station.all.order(identifier: :asc)
end

def show
@station = Station.find(params[:id])
rescue ActiveRecord::RecordNotfound
redirect_to root_path
end

end
4 changes: 4 additions & 0 deletions app/controllers/trip_planning_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class TripPlanningController < ApplicationController
def index
end
end
2 changes: 2 additions & 0 deletions app/helpers/about_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AboutHelper
end
2 changes: 2 additions & 0 deletions app/helpers/accoutn_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AccoutnHelper
end
2 changes: 2 additions & 0 deletions app/helpers/active_trip_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ActiveTripHelper
end
2 changes: 2 additions & 0 deletions app/helpers/add_more_time_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AddMoreTimeHelper
end
2 changes: 2 additions & 0 deletions app/helpers/edit_current_trip_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module EditCurrentTripHelper
end
2 changes: 2 additions & 0 deletions app/helpers/help_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module HelpHelper
end
2 changes: 2 additions & 0 deletions app/helpers/home_page_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module HomePageHelper
end
2 changes: 2 additions & 0 deletions app/helpers/how_it_works_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module HowItWorksHelper
end
2 changes: 2 additions & 0 deletions app/helpers/login_sign_up_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module LoginSignUpHelper
end
2 changes: 2 additions & 0 deletions app/helpers/membership_plans_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module MembershipPlansHelper
end
2 changes: 2 additions & 0 deletions app/helpers/past_trips_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module PastTripsHelper
end
2 changes: 2 additions & 0 deletions app/helpers/payment_information_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module PaymentInformationHelper
end
2 changes: 2 additions & 0 deletions app/helpers/report_a_problem_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ReportAProblemHelper
end
2 changes: 2 additions & 0 deletions app/helpers/settings_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module SettingsHelper
end
2 changes: 2 additions & 0 deletions app/helpers/trip_planning_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module TripPlanningHelper
end
2 changes: 2 additions & 0 deletions app/models/favorite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Favorite < ApplicationRecord
end
3 changes: 3 additions & 0 deletions app/models/membership.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Membership < ApplicationRecord
has_many :users, class_name: :User, foreign_key: :membership_id
end
2 changes: 2 additions & 0 deletions app/models/report.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Report < ApplicationRecord
end
4 changes: 3 additions & 1 deletion app/models/station.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ class Station < ApplicationRecord
validates_uniqueness_of :identifier

has_many :docked_bikes, class_name: :Bike, foreign_key: :current_station_id

has_many :started_trips, class_name: :Trip, foreign_key: :start_station_id
has_many :ended_trips, class_name: :Trip, foreign_key: :end_station_id

end
2 changes: 2 additions & 0 deletions app/models/transaction.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Transaction < ApplicationRecord
end
6 changes: 6 additions & 0 deletions app/models/trip.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Trip < ApplicationRecord
# belongs_to :bike, class_name: :Bike, foreign_key: :trip_id
belongs_to :starting_station, class_name: :Station, foreign_key: :start_station_id
belongs_to :ending_station, class_name: :Station, foreign_key: :end_station_id
belongs_to :user, class_name: :User, foreign_key: :user_id
end
5 changes: 5 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class User < ApplicationRecord
belongs_to :membership, class_name: :Membership, foreign_key: :membership_id, optional: true

has_many :trips, class_name: :Trip, foreign_key: :user_id
end
42 changes: 42 additions & 0 deletions app/views/about/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="application.css">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="home_page.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="how_it_works.html">How It Works</a></li>
<li><a href="trip_planning.html">Plan a Trip</a></li>
<li><a href="membership_plans.html">Membership Plans</a></li>
<li><a href="login_sign_up.html">Login</a></li>

</ul>
</nav>
</header>
</body>
</html>


<div>
<h1 class="font-bold text-4xl">About#index</h1>
<p>Find me in app/views/about/index.html.erb</p>
</div>


<html>
<head>
<link rel="stylesheet" type="text/css" href="application.css">
</head>
<body>
<footer>
<ul>
<li><a href="help.html">Help</a></li>
<li><a href="contact_us.html">Contact Us</a></li>
<li><a href="report_a_problem.html">Report an Issue</a></li>
</ul>
</footer>
</body>
</html>
42 changes: 42 additions & 0 deletions app/views/active_trip/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="application.css">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="home_page.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="how_it_works.html">How It Works</a></li>
<li><a href="trip_planning.html">Plan a Trip</a></li>
<li><a href="membership_plans.html">Membership Plans</a></li>
<li><a href="login_sign_up.html">Login</a></li>

</ul>
</nav>
</header>
</body>
</html>


<div>
<h1 class="font-bold text-4xl">ActiveTrip#index</h1>
<p>Find me in app/views/active_trip/index.html.erb</p>
</div>


<html>
<head>
<link rel="stylesheet" type="text/css" href="application.css">
</head>
<body>
<footer>
<ul>
<li><a href="help.html">Help</a></li>
<li><a href="contact_us.html">Contact Us</a></li>
<li><a href="report_a_problem.html">Report an Issue</a></li>
</ul>
</footer>
</body>
</html>
Loading