Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactored not_check_in methods
ij committed Apr 11, 2017
1 parent 4705047 commit e936f11
Showing 2 changed files with 4 additions and 15 deletions.
17 changes: 3 additions & 14 deletions lib/sf/reg_registration.rb
@@ -152,20 +152,9 @@ def self.not_checked_in(code)
self.query_with_reg_item_codes(where_stmt, order_stmt)
end

def self.not_checked_in_a_to_i(code)
where_stmt = "event_code__c = \'#{code}\' and status__c = \'processed\' and check_in_at__c = null and last_name__c < \'J\'"
order_stmt = self.order_by(last_name__c: "ASC")
self.query_with_reg_item_codes(where_stmt, order_stmt)
end

def self.not_checked_in_j_to_r(code)
where_stmt = "event_code__c = \'#{code}\' and status__c = \'processed\' and check_in_at__c = null and last_name__c > \'J\' and last_name__c < \'S\'"
order_stmt = self.order_by(last_name__c: "ASC")
self.query_with_reg_item_codes(where_stmt, order_stmt)
end

def self.not_checked_in_s_to_z(code)
where_stmt = "event_code__c = \'#{code}\' and status__c = \'processed\' and check_in_at__c = null and last_name__c > \'S\'"
def self.not_checked_in_last_name_between(code, a, z)
next_letter = z.downcase + "zzzzzzzzzz"
where_stmt = "event_code__c = \'#{code}\' and status__c = \'processed\' and check_in_at__c = null and last_name__c >= \'#{a.upcase}\' and last_name__c < \'#{next_letter}\'"
order_stmt = self.order_by(last_name__c: "ASC")
self.query_with_reg_item_codes(where_stmt, order_stmt)
end
2 changes: 1 addition & 1 deletion lib/sf/version.rb
@@ -1,3 +1,3 @@
module Sf
VERSION = "0.1.48"
VERSION = "0.1.49"
end

0 comments on commit e936f11

Please sign in to comment.