mirror of
https://github.com/fspc/bike-database.git
synced 2025-02-23 09:33:23 -05:00
WIP - begin adding reports
This commit is contained in:
parent
34d4cf27c7
commit
f7de4ea77a
8
app/controllers/reports_controller.rb
Normal file
8
app/controllers/reports_controller.rb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
class ReportsController < ApplicationController
|
||||||
|
before_action :authenticate_user!
|
||||||
|
|
||||||
|
def bikes_sold_per_year
|
||||||
|
@bikes_sold_per_year = Report.bikes_sold_per_year
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
5
app/models/reports.rb
Normal file
5
app/models/reports.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class Report
|
||||||
|
def self.bikes_sold_per_year
|
||||||
|
"KITTIES"
|
||||||
|
end
|
||||||
|
end
|
@ -1,6 +1,10 @@
|
|||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
# Include default devise modules. Others available are:
|
# Include default devise modules. Others available are:
|
||||||
# :confirmable, :lockable, :timeoutable and :omniauthable
|
# :confirmable, :lockable, :timeoutable, :omniauthable, :registerable,
|
||||||
devise :database_authenticatable, :registerable,
|
|
||||||
:recoverable, :rememberable, :trackable, :validatable
|
devise :database_authenticatable,
|
||||||
|
:recoverable,
|
||||||
|
:rememberable,
|
||||||
|
:trackable,
|
||||||
|
:validatable
|
||||||
end
|
end
|
||||||
|
1
app/views/reports/bikes_sold_per_year.html.haml
Normal file
1
app/views/reports/bikes_sold_per_year.html.haml
Normal file
@ -0,0 +1 @@
|
|||||||
|
= @bikes_sold_per_year
|
@ -18,3 +18,6 @@
|
|||||||
= link_to "Freecyclery Closed Applications", closed_applications_path
|
= link_to "Freecyclery Closed Applications", closed_applications_path
|
||||||
%br
|
%br
|
||||||
= link_to "Available Bikes", available_bikes_path
|
= link_to "Available Bikes", available_bikes_path
|
||||||
|
%h2 Reports
|
||||||
|
%br
|
||||||
|
= link_to "Bikes Sold Per Year", bikes_sold_per_year_path
|
||||||
|
@ -19,4 +19,5 @@ Bikedb::Application.routes.draw do
|
|||||||
get 'ready_for_pickup' => 'freecyclery#ready_for_pickup'
|
get 'ready_for_pickup' => 'freecyclery#ready_for_pickup'
|
||||||
get 'available_bikes' => 'freecyclery#available_bikes'
|
get 'available_bikes' => 'freecyclery#available_bikes'
|
||||||
|
|
||||||
|
get 'bikes_sold_per_year' => 'reports#bikes_sold_per_year'
|
||||||
end
|
end
|
||||||
|
@ -14,7 +14,6 @@ mark as picked up from the ready for pickup page
|
|||||||
validations around parameters that break site if incomplete
|
validations around parameters that break site if incomplete
|
||||||
mark as sold should be disabled after bike is sold
|
mark as sold should be disabled after bike is sold
|
||||||
there should be nice feedback indicating that the bike was sold
|
there should be nice feedback indicating that the bike was sold
|
||||||
disable new users
|
|
||||||
Improve form layouts
|
Improve form layouts
|
||||||
make navigation always on the left side of the page
|
make navigation always on the left side of the page
|
||||||
Make customer facing bike index with pitchers
|
Make customer facing bike index with pitchers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user