From 3cc429f2e6965138f672835be3aced2ac8ca549b Mon Sep 17 00:00:00 2001 From: Louis Knapp Date: Sun, 11 Oct 2015 13:51:24 -0500 Subject: [PATCH] lk | removes clients who have been assigned bikes from waiting list --- app/models/client.rb | 3 ++- notes.txt | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/models/client.rb b/app/models/client.rb index 064511e..151119e 100644 --- a/app/models/client.rb +++ b/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 diff --git a/notes.txt b/notes.txt index a640bd8..099835b 100644 --- a/notes.txt +++ b/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