1
0
mirror of https://github.com/fspc/bike-database.git synced 2025-02-23 01:23:24 -05:00

Louis | Add new parts, work done, and date sold to bikes

This commit is contained in:
Loos 2014-09-18 17:19:44 -04:00
parent 93b44952f7
commit 693ca3c760
6 changed files with 34 additions and 3 deletions

View File

@ -1,6 +1,7 @@
.print-select{
.print-label{
width: 400px;
height: 600px;
padding: 10px;
margin: 10px;
display: inline-block;

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,5 @@
.print-select
- @bikes.each do |bike|
.print-label
%h2=bike.price
%h2=bike.name
%h2=bike.price + ' ' + bike.name
%br

View File

@ -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

View File

@ -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|