mirror of
https://github.com/fspc/bike-database.git
synced 2025-02-23 01:23:24 -05:00
lk | removes clients who have been assigned bikes from waiting list
This commit is contained in:
parent
9f9cf5e6ba
commit
3cc429f2e6
@ -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
|
||||
|
||||
|
@ -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…
x
Reference in New Issue
Block a user