Browse Source

Louis | Adds bike type requested and will pay options to clients

master
Loos 10 years ago
parent
commit
36e7c1624f
  1. 16
      app/views/clients/_fields.html.haml
  2. 6
      db/migrate/20140921224502_add_bike_type_and_will_pay_to_client.rb
  3. 17
      db/schema.rb

16
app/views/clients/_fields.html.haml

@ -29,15 +29,27 @@
= f.label "Application Date:", class: "col-sm-2 control-label" = f.label "Application Date:", class: "col-sm-2 control-label"
.col-sm-10 .col-sm-10
= f.text_field :application_date, class: "form-control datepicker", disabled: disabled = f.text_field :application_date, class: "form-control datepicker", disabled: disabled
.form-group
= f.label "Type of Bike Requested:", class: "col-sm-2 control-label"
.col-sm-10
= f.text_field :bike_type_requested, class: "form-control", disabled: disabled
.form-group
= f.label "Will Pay 25$ for Lock & Helmet:", class: "col-sm-2 control-label"
.col-sm-10
= f.check_box :bike_type_requested, disabled: disabled
.form-group .form-group
= f.label "Helmet", class: "col-sm-2 control-label" = f.label "Helmet", class: "col-sm-2 control-label"
.col-sm-10 .col-sm-10
= f.check_box :helmet, class: "form-control", disabled: disabled = f.check_box :helmet, disabled: disabled
.form-group .form-group
= f.label "Lock", class: "col-sm-2 control-label" = f.label "Lock", class: "col-sm-2 control-label"
.col-sm-10 .col-sm-10
= f.check_box :lock, class: "form-control", disabled: disabled = f.check_box :lock, disabled: disabled
.form-group .form-group
= f.label "Agency", class: "col-sm-2 control-label" = f.label "Agency", class: "col-sm-2 control-label"

6
db/migrate/20140921224502_add_bike_type_and_will_pay_to_client.rb

@ -0,0 +1,6 @@
class AddBikeTypeAndWillPayToClient < ActiveRecord::Migration
def change
add_column(:clients, :bike_type_requested, :string)
add_column(:clients, :will_pay, :boolean)
end
end

17
db/schema.rb

@ -1,4 +1,17 @@
ActiveRecord::Schema.define(version: 20140918211228) do # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140921224502) 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"
@ -41,6 +54,8 @@ ActiveRecord::Schema.define(version: 20140918211228) do
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.integer "bike_id" t.integer "bike_id"
t.string "bike_type_requested"
t.boolean "will_pay"
end end
add_index "clients", ["bike_id"], name: "index_clients_on_bike_id", using: :btree add_index "clients", ["bike_id"], name: "index_clients_on_bike_id", using: :btree

Loading…
Cancel
Save