Skip to content

Commit

Permalink
Add illiad service when preservation and conservation
Browse files Browse the repository at this point in the history
  • Loading branch information
christinach committed May 18, 2023
1 parent f5e8997 commit 7e80122
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/requests/requestable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def initialize(bib:, holding: nil, item: nil, location: nil, patron:)

delegate :pick_up_location_id, :pick_up_location_code, :item_type, :enum_value, :cron_value, :item_data?,
:temp_loc?, :in_resource_sharing?, :on_reserve?, :inaccessible?, :hold_request?, :enumerated?, :item_type_non_circulate?, :partner_holding?,
:id, :use_statement, :collection_code, :missing?, :charged?, :status, :status_label, :barcode?, :barcode, to: :item
:id, :use_statement, :collection_code, :missing?, :charged?, :status, :status_label, :barcode?, :barcode, :preservation_conservation?, to: :item

# non alma options
def thesis?
Expand Down
4 changes: 4 additions & 0 deletions app/models/requests/requestable/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def hold_request?
status_label == 'Hold Shelf'
end

def preservation_conservation?
status_label == "Preservation and Conservation"
end

def enumerated?
enum_value.present?
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/requests/router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def calculate_recap_services
def calculate_unavailable_services
return [] unless cas_provider?
services = []
# for mongraphs - title level check OR for serials - copy level check
services << 'ill' if !any_loanable? || requestable.enumerated?
# for monographs - title level check OR for serials - copy level check
services << 'ill' if !any_loanable? || requestable.enumerated? || requestable.preservation_conservation?
services
end

Expand Down
Loading

0 comments on commit 7e80122

Please sign in to comment.