mirror of
				https://github.com/fspc/bike-database.git
				synced 2025-11-03 16:45:35 -05:00 
			
		
		
		
	lk | time spent is now a decimal with precision 2
This commit is contained in:
		
							parent
							
								
									df54b59b95
								
							
						
					
					
						commit
						dcb91db596
					
				@ -64,7 +64,7 @@
 | 
				
			|||||||
      .form-group
 | 
					      .form-group
 | 
				
			||||||
        = f.label "Time Spent (Hours)", class: "col-sm-4 control-label"
 | 
					        = f.label "Time Spent (Hours)", class: "col-sm-4 control-label"
 | 
				
			||||||
        .col-sm-6
 | 
					        .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
 | 
					  .row
 | 
				
			||||||
    .col-sm-6
 | 
					    .col-sm-6
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					class ConvertTimeWorkedToDecimal < ActiveRecord::Migration
 | 
				
			||||||
 | 
					  def change
 | 
				
			||||||
 | 
					    change_column :bikes, :time_spent, :decimal, precision: 10, scale: 2
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
@ -11,7 +11,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# It's strongly recommended that you check this file into your version control system.
 | 
					# 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
 | 
					  # These are extensions that must be enabled in order to support this database
 | 
				
			||||||
  enable_extension "plpgsql"
 | 
					  enable_extension "plpgsql"
 | 
				
			||||||
@ -46,7 +46,7 @@ ActiveRecord::Schema.define(version: 20170713233459) do
 | 
				
			|||||||
    t.datetime "date_sold"
 | 
					    t.datetime "date_sold"
 | 
				
			||||||
    t.integer  "bike_index_id"
 | 
					    t.integer  "bike_index_id"
 | 
				
			||||||
    t.datetime "fixed_at"
 | 
					    t.datetime "fixed_at"
 | 
				
			||||||
    t.integer  "time_spent"
 | 
					    t.decimal  "time_spent",     precision: 10, scale: 2
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  create_table "clients", force: :cascade do |t|
 | 
					  create_table "clients", force: :cascade do |t|
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
# Features
 | 
					# Features
 | 
				
			||||||
 | 
					- price is a string
 | 
				
			||||||
- search bikes via brand, make, or serial number.
 | 
					- search bikes via brand, make, or serial number.
 | 
				
			||||||
- add mechanics table and change text input to a dropdown
 | 
					- add mechanics table and change text input to a dropdown
 | 
				
			||||||
- printing a single freecyclery receipt from the client page uses the
 | 
					- printing a single freecyclery receipt from the client page uses the
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user