mirror of
				https://github.com/fspc/bike-database.git
				synced 2025-10-31 08:45:34 -04:00 
			
		
		
		
	Louis | Adds fields to client
This commit is contained in:
		
							parent
							
								
									2a33493ff2
								
							
						
					
					
						commit
						5bfe7365ae
					
				| @ -61,6 +61,12 @@ class ClientsController < ApplicationController | |||||||
|         :lock, |         :lock, | ||||||
|         :completion_date, |         :completion_date, | ||||||
|         :bike_id, |         :bike_id, | ||||||
|         :agency_id)  |         :agency_id, | ||||||
|  |         :notes, | ||||||
|  |         :bike_fixed, | ||||||
|  |         :number_of_calls, | ||||||
|  |         :application_voided, | ||||||
|  |         :pickup_date, | ||||||
|  |         :volunteer_at_pickup)  | ||||||
|     end |     end | ||||||
| end | end | ||||||
|  | |||||||
| @ -66,3 +66,34 @@ | |||||||
|     .col-sm-10 |     .col-sm-10 | ||||||
|       = f.select(:agency_id, Agency.all.collect {|b| [ b.agency_name, b.id ] }, {include_blank: 'None'}) |       = f.select(:agency_id, Agency.all.collect {|b| [ b.agency_name, b.id ] }, {include_blank: 'None'}) | ||||||
| 
 | 
 | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Notes:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_area :notes, class: "form-control", disabled: disabled  | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Bike Fixed:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.check_box :bike_fixed, disabled: disabled | ||||||
|  | 
 | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Number of Calls Made:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :number_of_calls, class: "form-control", disabled: disabled | ||||||
|  | 
 | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Application Voided:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.check_box :application_voided, disabled: disabled | ||||||
|  | 
 | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Bike Picked Up On:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :pickup_date, class: "form-control datepicker", disabled: disabled | ||||||
|  | 
 | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Volunteer Present at Pickup:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :volunteer_at_pickup, class: "form-control", disabled: disabled | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								db/migrate/20140923000417_add_fields_to_client.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								db/migrate/20140923000417_add_fields_to_client.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | class AddFieldsToClient < ActiveRecord::Migration | ||||||
|  |   def change | ||||||
|  |     add_column(:clients, :notes, :text) | ||||||
|  |     add_column(:clients, :bike_fixed, :boolean) | ||||||
|  |     add_column(:clients, :number_of_calls, :integer) | ||||||
|  |     add_column(:clients, :application_voided, :boolean) | ||||||
|  |     add_column(:clients, :pickup_date, :date) | ||||||
|  |     add_column(:clients, :volunteer_at_pickup, :string) | ||||||
|  |   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: 20140922233036) do | ActiveRecord::Schema.define(version: 20140923000417) 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" | ||||||
| @ -67,6 +67,12 @@ ActiveRecord::Schema.define(version: 20140922233036) do | |||||||
|     t.string   "bike_type_requested" |     t.string   "bike_type_requested" | ||||||
|     t.boolean  "will_pay" |     t.boolean  "will_pay" | ||||||
|     t.integer  "agency_id" |     t.integer  "agency_id" | ||||||
|  |     t.text     "notes" | ||||||
|  |     t.boolean  "bike_fixed" | ||||||
|  |     t.integer  "number_of_calls" | ||||||
|  |     t.boolean  "application_voided" | ||||||
|  |     t.date     "pickup_date" | ||||||
|  |     t.string   "volunteer_at_pickup" | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   add_index "clients", ["agency_id"], name: "index_clients_on_agency_id", using: :btree |   add_index "clients", ["agency_id"], name: "index_clients_on_agency_id", using: :btree | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user