mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
lk | remove unused fields on bikes & fix some formatting
This commit is contained in:
@@ -51,12 +51,12 @@ class BikesController < ApplicationController
|
||||
end
|
||||
|
||||
def mark_as_sold
|
||||
current_date = Time.new.strftime("%Y-%m-%d")
|
||||
current_date = Time.new.strftime("%Y-%m-%d")
|
||||
@bike = Bike.find(params[:id])
|
||||
if @bike.update_attribute(:date_sold, current_date)
|
||||
redirect_to bikes_url, notice: @bike.name + ' was marked as sold on ' + current_date + '.'
|
||||
else
|
||||
render action: edit, notice: 'Bike sale date could not be updated'
|
||||
render action: edit, notice: 'Bike sale date could not be updated'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -82,7 +82,6 @@ class BikesController < ApplicationController
|
||||
:log_number,
|
||||
:purpose,
|
||||
:serial_number,
|
||||
:notes,
|
||||
:tag_info,
|
||||
:mechanic,
|
||||
:completion_date,
|
||||
|
||||
@@ -22,7 +22,7 @@ class ClientsController < ApplicationController
|
||||
if @client.save
|
||||
redirect_to @client, notice: 'Client was successfully created.'
|
||||
else
|
||||
render action: 'new'
|
||||
render action: 'new'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -67,14 +67,14 @@
|
||||
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], {}, class: "selectpicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Tag Info", class: "col-sm-4 control-label"
|
||||
= f.label "New Parts", class: "col-sm-4 control-label"
|
||||
.col-sm-6
|
||||
= f.text_area :tag_info, class: "form-control", placeholder: "+ New Component ", disabled: disabled
|
||||
= f.text_area :new_parts, class: "form-control", placeholder: "+ New Component ", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Notes", class: "col-sm-4 control-label"
|
||||
= f.label "Work Done", class: "col-sm-4 control-label"
|
||||
.col-sm-6
|
||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||
= f.text_area :work_done, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Date Sold:", class: "col-sm-4 control-label"
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
.col-xs-6
|
||||
.desc
|
||||
.strong Work Done:
|
||||
=bike.notes
|
||||
=simple_format(bike.work_done)
|
||||
.col-xs-6
|
||||
.desc
|
||||
.strong New Parts:
|
||||
=bike.tag_info
|
||||
=simple_format(bike.new_parts)
|
||||
.row
|
||||
.col-xs-9.col-xs-offset-3.small= "Log Number: " + bike.log_number.to_s
|
||||
|
||||
@@ -69,7 +69,8 @@
|
||||
.form-group
|
||||
= f.label "Notes:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Bike Fixed:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
%br
|
||||
= link_to "Log Bikes", new_bike_path
|
||||
%br
|
||||
= link_to "View All Bikes", bikes_path
|
||||
= link_to "View Bikes", bikes_path
|
||||
%br
|
||||
= link_to "Print Sale Bike Labels", print_select_bikes_path
|
||||
= link_to "Print Sale Labels", print_select_bikes_path
|
||||
%br
|
||||
%h2 Freecyclery
|
||||
%br
|
||||
|
||||
Reference in New Issue
Block a user