mirror of
https://github.com/fspc/bike-database.git
synced 2025-04-04 10:03:22 -04:00
lk | removes ready-for-pickup bikes list
This commit is contained in:
parent
8097cd232d
commit
6f435c9ec4
@ -5,10 +5,6 @@ class FreecycleryController < ApplicationController
|
||||
@closed_applications = Client.closed_applications
|
||||
end
|
||||
|
||||
def ready_for_pickup
|
||||
@bikes_for_pickup = Bike.bikes_ready_for_pickup
|
||||
end
|
||||
|
||||
def available_bikes
|
||||
@available_bikes = Bike.available_for_freecyclery
|
||||
end
|
||||
|
@ -33,10 +33,6 @@ class Bike < ActiveRecord::Base
|
||||
self.client && !client.application_voided && self.date_sold.nil?
|
||||
end
|
||||
|
||||
def self.bikes_ready_for_pickup
|
||||
Bike.all.select{|bike| bike.ready_for_pickup?}
|
||||
end
|
||||
|
||||
def self.available_for_freecyclery
|
||||
assigned_bikes = Client.all.select{|c| !c.bike_id.nil?}.map(&:bike)
|
||||
all_freecyclery_bikes = Bike.order(log_number: :desc).select{|bike| bike.purpose == "Freecyclery"}
|
||||
|
@ -1,15 +0,0 @@
|
||||
.container
|
||||
%br
|
||||
|
||||
%h1 Freecyclery Bikes for Pickup
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th Bike
|
||||
%th Client
|
||||
%tbody
|
||||
- @bikes_for_pickup.each do |bike|
|
||||
%tr
|
||||
%td= bike.name
|
||||
%td= bike.client.name
|
||||
|
@ -15,8 +15,6 @@
|
||||
%br
|
||||
= link_to "Freecyclery Agencies", agencies_path
|
||||
%br
|
||||
= link_to "Freecyclery Bikes Ready for Pickup", ready_for_pickup_path
|
||||
%br
|
||||
= link_to "Freecyclery Closed Applications", closed_applications_path
|
||||
%br
|
||||
= link_to "Available Bikes", available_bikes_path
|
||||
|
@ -21,7 +21,6 @@ Bikedb::Application.routes.draw do
|
||||
end
|
||||
|
||||
get 'closed_applications' => 'freecyclery#closed_applications'
|
||||
get 'ready_for_pickup' => 'freecyclery#ready_for_pickup'
|
||||
get 'available_bikes' => 'freecyclery#available_bikes'
|
||||
get 'bikes_sold_per_year' => 'reports#bikes_sold_per_year'
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user