1
0
mirror of https://github.com/fspc/bike-database.git synced 2025-02-22 17:23:22 -05:00

lk | time spent is now a decimal with precision 2

This commit is contained in:
Louis Knapp 2017-08-24 10:53:12 -05:00
parent df54b59b95
commit dcb91db596
4 changed files with 9 additions and 3 deletions

View File

@ -64,7 +64,7 @@
.form-group
= f.label "Time Spent (Hours)", class: "col-sm-4 control-label"
.col-sm-6
= f.text_field :time_spent, class: "form-control", type: "number", disabled: disabled
= f.text_field :time_spent, class: "form-control", type: "number", step: "0.01", disabled: disabled
.row
.col-sm-6

View File

@ -0,0 +1,5 @@
class ConvertTimeWorkedToDecimal < ActiveRecord::Migration
def change
change_column :bikes, :time_spent, :decimal, precision: 10, scale: 2
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170713233459) do
ActiveRecord::Schema.define(version: 20170824154325) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -46,7 +46,7 @@ ActiveRecord::Schema.define(version: 20170713233459) do
t.datetime "date_sold"
t.integer "bike_index_id"
t.datetime "fixed_at"
t.integer "time_spent"
t.decimal "time_spent", precision: 10, scale: 2
end
create_table "clients", force: :cascade do |t|

View File

@ -1,4 +1,5 @@
# Features
- price is a string
- search bikes via brand, make, or serial number.
- add mechanics table and change text input to a dropdown
- printing a single freecyclery receipt from the client page uses the