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

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

This commit is contained in:
Louis Knapp 2015-10-11 13:51:24 -05:00
parent 9f9cf5e6ba
commit 3cc429f2e6
2 changed files with 2 additions and 6 deletions

View File

@ -8,7 +8,8 @@ class Client < ActiveRecord::Base
clients = Client.all clients = Client.all
non_voided_clients = clients.select{|client| !client.application_voided} 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_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} waiting_list.sort_by!{|client| client.application_date}
end end

View File

@ -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 make sure you can mark bike completion dates
clients should not be on waiting list after they get assigned a bike
Freecyclery Receipts Freecyclery Receipts
print sales labels should not show freecyclery bikes print sales labels should not show freecyclery bikes