From 36e7c1624f2429787b5ea530f5d07c4c8504fd59 Mon Sep 17 00:00:00 2001 From: Loos Date: Sun, 21 Sep 2014 17:50:16 -0500 Subject: [PATCH] Louis | Adds bike type requested and will pay options to clients --- app/views/clients/_fields.html.haml | 16 ++++++++++++++-- ...4502_add_bike_type_and_will_pay_to_client.rb | 6 ++++++ db/schema.rb | 17 ++++++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20140921224502_add_bike_type_and_will_pay_to_client.rb diff --git a/app/views/clients/_fields.html.haml b/app/views/clients/_fields.html.haml index d504757..ef4f2b0 100644 --- a/app/views/clients/_fields.html.haml +++ b/app/views/clients/_fields.html.haml @@ -29,15 +29,27 @@ = f.label "Application Date:", class: "col-sm-2 control-label" .col-sm-10 = 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 = f.label "Helmet", class: "col-sm-2 control-label" .col-sm-10 - = f.check_box :helmet, class: "form-control", disabled: disabled + = f.check_box :helmet, disabled: disabled + .form-group = f.label "Lock", class: "col-sm-2 control-label" .col-sm-10 - = f.check_box :lock, class: "form-control", disabled: disabled + = f.check_box :lock, disabled: disabled .form-group = f.label "Agency", class: "col-sm-2 control-label" diff --git a/db/migrate/20140921224502_add_bike_type_and_will_pay_to_client.rb b/db/migrate/20140921224502_add_bike_type_and_will_pay_to_client.rb new file mode 100644 index 0000000..1138e98 --- /dev/null +++ b/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 diff --git a/db/schema.rb b/db/schema.rb index e51cd99..1aaf1a3 100644 --- a/db/schema.rb +++ b/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 enable_extension "plpgsql" @@ -41,6 +54,8 @@ ActiveRecord::Schema.define(version: 20140918211228) do t.datetime "created_at" t.datetime "updated_at" t.integer "bike_id" + t.string "bike_type_requested" + t.boolean "will_pay" end add_index "clients", ["bike_id"], name: "index_clients_on_bike_id", using: :btree