mirror of
https://github.com/fspc/bike-database.git
synced 2025-02-23 09:33:23 -05:00
WIP | Louis | Adding client receipts
This commit is contained in:
parent
9fad8ded1b
commit
67ae0bf04b
1
Gemfile
1
Gemfile
@ -23,6 +23,7 @@ group :test, :development do
|
|||||||
gem 'pry-rails'
|
gem 'pry-rails'
|
||||||
gem 'better_errors'
|
gem 'better_errors'
|
||||||
gem 'assert_difference'
|
gem 'assert_difference'
|
||||||
|
gem 'binding_of_caller'
|
||||||
|
|
||||||
# Uncomment this line on OS X.
|
# Uncomment this line on OS X.
|
||||||
gem 'growl', '1.0.3'
|
gem 'growl', '1.0.3'
|
||||||
|
@ -33,6 +33,8 @@ GEM
|
|||||||
better_errors (1.1.0)
|
better_errors (1.1.0)
|
||||||
coderay (>= 1.0.0)
|
coderay (>= 1.0.0)
|
||||||
erubis (>= 2.6.6)
|
erubis (>= 2.6.6)
|
||||||
|
binding_of_caller (0.7.2)
|
||||||
|
debug_inspector (>= 0.0.1)
|
||||||
bootstrap-sass (2.3.2.0)
|
bootstrap-sass (2.3.2.0)
|
||||||
sass (~> 3.2)
|
sass (~> 3.2)
|
||||||
builder (3.1.4)
|
builder (3.1.4)
|
||||||
@ -52,6 +54,7 @@ GEM
|
|||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.6.3)
|
coffee-script-source (1.6.3)
|
||||||
|
debug_inspector (0.0.2)
|
||||||
devise (3.2.4)
|
devise (3.2.4)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
@ -192,6 +195,7 @@ DEPENDENCIES
|
|||||||
assert_difference
|
assert_difference
|
||||||
bcrypt-ruby (= 3.1.2)
|
bcrypt-ruby (= 3.1.2)
|
||||||
better_errors
|
better_errors
|
||||||
|
binding_of_caller
|
||||||
bootstrap-sass (= 2.3.2.0)
|
bootstrap-sass (= 2.3.2.0)
|
||||||
capybara (= 2.1.0)
|
capybara (= 2.1.0)
|
||||||
devise
|
devise
|
||||||
|
@ -19,22 +19,18 @@ class ClientsController < ApplicationController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
@client = Client.new(client_params)
|
@client = Client.new(client_params)
|
||||||
respond_to do |format|
|
if @client.save
|
||||||
if @client.save
|
redirect_to @client, notice: 'Client was successfully created.'
|
||||||
format.html { redirect_to @client, notice: 'Client was successfully created.' }
|
else
|
||||||
else
|
render action: 'new'
|
||||||
format.html { render action: 'new' }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
respond_to do |format|
|
if @client.update(client_params)
|
||||||
if @client.update(client_params)
|
redirect_to @client, notice: 'Client was successfully updated.'
|
||||||
format.html { redirect_to @client, notice: 'Client was successfully updated.' }
|
else
|
||||||
else
|
render action: 'edit'
|
||||||
format.html { render action: 'edit' }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -13,4 +13,8 @@ class FreecycleryController < ApplicationController
|
|||||||
@available_bikes = Bike.available_for_freecyclery
|
@available_bikes = Bike.available_for_freecyclery
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def receipt
|
||||||
|
@client = Client.find(params[:client_id])
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
1
app/views/freecyclery/receipt.html.haml
Normal file
1
app/views/freecyclery/receipt.html.haml
Normal file
@ -0,0 +1 @@
|
|||||||
|
KITTENS
|
@ -11,7 +11,9 @@ Bikedb::Application.routes.draw do
|
|||||||
|
|
||||||
resources :volunteers
|
resources :volunteers
|
||||||
resources :agencies
|
resources :agencies
|
||||||
resources :clients
|
resources :clients do
|
||||||
|
get 'receipt' => 'freecyclery#receipt'
|
||||||
|
end
|
||||||
|
|
||||||
get 'closed_applications' => 'freecyclery#closed_applications'
|
get 'closed_applications' => 'freecyclery#closed_applications'
|
||||||
get 'ready_for_pickup' => 'freecyclery#ready_for_pickup'
|
get 'ready_for_pickup' => 'freecyclery#ready_for_pickup'
|
||||||
|
@ -9,6 +9,7 @@ Reports
|
|||||||
Number of bikes donated according to agency. (Graph?)
|
Number of bikes donated according to agency. (Graph?)
|
||||||
Average bike price for year.
|
Average bike price for year.
|
||||||
|
|
||||||
|
|
||||||
assign a bike from the available freecyclery bikes page
|
assign a bike from the available freecyclery bikes page
|
||||||
mark as picked up from the ready for pickup page
|
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
|
||||||
@ -24,4 +25,7 @@ refactor index - move unsold bikes to model
|
|||||||
make ‚recyclery‘ its own view folder, controller, etc.
|
make ‚recyclery‘ its own view folder, controller, etc.
|
||||||
add a request-a-feature feature
|
add a request-a-feature feature
|
||||||
|
|
||||||
|
add pics of bikes for sale
|
||||||
|
add recyclery logos & bike memorabilia pics all over app
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user