mirror of
https://github.com/fspc/bike-database.git
synced 2025-02-23 01:23:24 -05:00
lk | remove unused fields on bikes & fix some formatting
This commit is contained in:
parent
f30e9c6fed
commit
2c98232f46
@ -51,12 +51,12 @@ class BikesController < ApplicationController
|
||||
end
|
||||
|
||||
def mark_as_sold
|
||||
current_date = Time.new.strftime("%Y-%m-%d")
|
||||
current_date = Time.new.strftime("%Y-%m-%d")
|
||||
@bike = Bike.find(params[:id])
|
||||
if @bike.update_attribute(:date_sold, current_date)
|
||||
redirect_to bikes_url, notice: @bike.name + ' was marked as sold on ' + current_date + '.'
|
||||
else
|
||||
render action: edit, notice: 'Bike sale date could not be updated'
|
||||
render action: edit, notice: 'Bike sale date could not be updated'
|
||||
end
|
||||
end
|
||||
|
||||
@ -82,7 +82,6 @@ class BikesController < ApplicationController
|
||||
:log_number,
|
||||
:purpose,
|
||||
:serial_number,
|
||||
:notes,
|
||||
:tag_info,
|
||||
:mechanic,
|
||||
:completion_date,
|
||||
|
@ -22,7 +22,7 @@ class ClientsController < ApplicationController
|
||||
if @client.save
|
||||
redirect_to @client, notice: 'Client was successfully created.'
|
||||
else
|
||||
render action: 'new'
|
||||
render action: 'new'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -67,14 +67,14 @@
|
||||
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], {}, class: "selectpicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Tag Info", class: "col-sm-4 control-label"
|
||||
= f.label "New Parts", class: "col-sm-4 control-label"
|
||||
.col-sm-6
|
||||
= f.text_area :tag_info, class: "form-control", placeholder: "+ New Component ", disabled: disabled
|
||||
= f.text_area :new_parts, class: "form-control", placeholder: "+ New Component ", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Notes", class: "col-sm-4 control-label"
|
||||
= f.label "Work Done", class: "col-sm-4 control-label"
|
||||
.col-sm-6
|
||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||
= f.text_area :work_done, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Date Sold:", class: "col-sm-4 control-label"
|
||||
|
@ -15,10 +15,10 @@
|
||||
.col-xs-6
|
||||
.desc
|
||||
.strong Work Done:
|
||||
=bike.notes
|
||||
=simple_format(bike.work_done)
|
||||
.col-xs-6
|
||||
.desc
|
||||
.strong New Parts:
|
||||
=bike.tag_info
|
||||
=simple_format(bike.new_parts)
|
||||
.row
|
||||
.col-xs-9.col-xs-offset-3.small= "Log Number: " + bike.log_number.to_s
|
||||
|
@ -69,7 +69,8 @@
|
||||
.form-group
|
||||
= f.label "Notes:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Bike Fixed:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
|
@ -5,9 +5,9 @@
|
||||
%br
|
||||
= link_to "Log Bikes", new_bike_path
|
||||
%br
|
||||
= link_to "View All Bikes", bikes_path
|
||||
= link_to "View Bikes", bikes_path
|
||||
%br
|
||||
= link_to "Print Sale Bike Labels", print_select_bikes_path
|
||||
= link_to "Print Sale Labels", print_select_bikes_path
|
||||
%br
|
||||
%h2 Freecyclery
|
||||
%br
|
||||
|
6
db/migrate/20150918220734_remove_unused_bike_fields.rb
Normal file
6
db/migrate/20150918220734_remove_unused_bike_fields.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class RemoveUnusedBikeFields < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :bikes, :work_done
|
||||
remove_column :bikes, :new_parts
|
||||
end
|
||||
end
|
5
db/migrate/20150918220913_remove_unused_client_fields.rb
Normal file
5
db/migrate/20150918220913_remove_unused_client_fields.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class RemoveUnusedClientFields < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :clients, :weight
|
||||
end
|
||||
end
|
6
db/migrate/20150918221119_update_bike_field_names.rb
Normal file
6
db/migrate/20150918221119_update_bike_field_names.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class UpdateBikeFieldNames < ActiveRecord::Migration
|
||||
def change
|
||||
rename_column :bikes, :notes, :work_done
|
||||
rename_column :bikes, :tag_info, :new_parts
|
||||
end
|
||||
end
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150807011518) do
|
||||
ActiveRecord::Schema.define(version: 20150918221119) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -34,8 +34,8 @@ ActiveRecord::Schema.define(version: 20150807011518) do
|
||||
t.string "bike_type"
|
||||
t.string "color"
|
||||
t.string "serial_number"
|
||||
t.text "notes"
|
||||
t.text "tag_info"
|
||||
t.text "work_done"
|
||||
t.text "new_parts"
|
||||
t.string "completion_date"
|
||||
t.string "price"
|
||||
t.datetime "created_at"
|
||||
@ -45,8 +45,6 @@ ActiveRecord::Schema.define(version: 20150807011518) do
|
||||
t.integer "log_number"
|
||||
t.text "purpose"
|
||||
t.text "mechanic"
|
||||
t.text "new_parts"
|
||||
t.text "work_done"
|
||||
t.date "date_sold"
|
||||
t.integer "bike_index_id"
|
||||
end
|
||||
@ -57,7 +55,6 @@ ActiveRecord::Schema.define(version: 20150807011518) do
|
||||
t.date "application_date"
|
||||
t.string "gender"
|
||||
t.integer "age"
|
||||
t.integer "weight"
|
||||
t.boolean "helmet"
|
||||
t.boolean "lock"
|
||||
t.date "completion_date"
|
||||
|
@ -2,6 +2,8 @@ Integrate with autocomplete to get manufacturers & models
|
||||
|
||||
Freecyclery Receipts
|
||||
|
||||
enable posting to bike index when a bike is created
|
||||
|
||||
Reports
|
||||
General Reports
|
||||
bikes donated per year
|
||||
@ -10,7 +12,7 @@ Reports
|
||||
bikes donated by year or month. (With bar graph!?)
|
||||
bikes donated according to agency. (Graph?)
|
||||
|
||||
Add some way to navigate to client receipts
|
||||
Add way to navigate to client receipts
|
||||
style client receipts
|
||||
|
||||
assign a bike from the available freecyclery bikes page
|
||||
|
Loading…
x
Reference in New Issue
Block a user