diff --git a/app/assets/stylesheets/print_select.css.scss b/app/assets/stylesheets/print_select.css.scss index f86c604..d18f8a8 100644 --- a/app/assets/stylesheets/print_select.css.scss +++ b/app/assets/stylesheets/print_select.css.scss @@ -1,6 +1,7 @@ .print-select{ .print-label{ width: 400px; + height: 600px; padding: 10px; margin: 10px; display: inline-block; diff --git a/app/controllers/bikes_controller.rb b/app/controllers/bikes_controller.rb index 93409f5..d904911 100644 --- a/app/controllers/bikes_controller.rb +++ b/app/controllers/bikes_controller.rb @@ -69,6 +69,9 @@ class BikesController < ApplicationController :price, :top_tube_size, :seat_tube_size, + :new_parts, + :work_done, + :date_sold, :created_at, :updated_at) end diff --git a/app/views/bikes/_fields.html.haml b/app/views/bikes/_fields.html.haml index cfdb98d..796f7f7 100644 --- a/app/views/bikes/_fields.html.haml +++ b/app/views/bikes/_fields.html.haml @@ -54,7 +54,19 @@ = 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 "Work Done:", class: "col-sm-2 control-label" + .col-sm-10 + = f.text_area :work_done, class: "form-control", disabled: disabled + + + .form-group + = f.label "New Parts:", class: "col-sm-2 control-label" + .col-sm-10 + = f.text_area :new_parts, class: "form-control", disabled: disabled + .form-group = f.label "Tag Info", class: "col-sm-2 control-label" .col-sm-10 @@ -70,6 +82,12 @@ .col-sm-10 = f.text_field :completion_date, class: "form-control datepicker", disabled: disabled + .form-group + = f.label "Date Sold:", class: "col-sm-2 control-label" + .col-sm-10 + = f.text_field :date_sold, class: "form-control datepicker", disabled: disabled + + .form-group = f.label "Price", class: "col-sm-2 control-label" .col-sm-10 diff --git a/app/views/bikes/print_labels.html.haml b/app/views/bikes/print_labels.html.haml index cb5522a..cbfb951 100644 --- a/app/views/bikes/print_labels.html.haml +++ b/app/views/bikes/print_labels.html.haml @@ -1,6 +1,5 @@ .print-select - @bikes.each do |bike| .print-label - %h2=bike.price - %h2=bike.name + %h2=bike.price + ' ' + bike.name %br diff --git a/db/migrate/20140918211228_add_new_parts_work_done_and_date_sold_to_bikes.rb b/db/migrate/20140918211228_add_new_parts_work_done_and_date_sold_to_bikes.rb new file mode 100644 index 0000000..af999fd --- /dev/null +++ b/db/migrate/20140918211228_add_new_parts_work_done_and_date_sold_to_bikes.rb @@ -0,0 +1,7 @@ +class AddNewPartsWorkDoneAndDateSoldToBikes < ActiveRecord::Migration + def change + add_column :bikes, :new_parts, :text + add_column :bikes, :work_done, :text + add_column :bikes, :date_sold, :date + end +end diff --git a/db/schema.rb b/db/schema.rb index 6f9ed88..5598619 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140917020156) do +ActiveRecord::Schema.define(version: 20140918211228) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -35,6 +35,9 @@ ActiveRecord::Schema.define(version: 20140917020156) do t.integer "log_number" t.text "purpose" t.text "mechanic" + t.text "new_parts" + t.text "work_done" + t.date "date_sold" end create_table "clients", force: true do |t|