Browse Source

lk | removes clients who have been assigned bikes from waiting list

master
Louis Knapp 9 years ago
parent
commit
3cc429f2e6
  1. 3
      app/models/client.rb
  2. 5
      notes.txt

3
app/models/client.rb

@ -8,7 +8,8 @@ class Client < ActiveRecord::Base
clients = Client.all
non_voided_clients = clients.select{|client| !client.application_voided}
waiting_list_with_null_application_dates = non_voided_clients.select{|client| !client.completion_date}
waiting_list = waiting_list_with_null_application_dates.select{|client| !client.application_date.nil?}
clients_with_bikes = Client.all.select{|c| !c.bike_id.nil?}
waiting_list = waiting_list_with_null_application_dates.select{|client| !client.application_date.nil?} - clients_with_bikes
waiting_list.sort_by!{|client| client.application_date}
end

5
notes.txt

@ -1,9 +1,4 @@
when bike gets picked up, remove it from freecyclery bike list
when visiting user page check if they have a bike and add it to
the list
make sure you can mark bike completion dates
clients should not be on waiting list after they get assigned a bike
Freecyclery Receipts
print sales labels should not show freecyclery bikes

Loading…
Cancel
Save