Skip to content

Commit

Permalink
Had to override the suppressPickup method for temp Covid locations
Browse files Browse the repository at this point in the history
  • Loading branch information
tworrall committed Jun 30, 2020
1 parent 940625a commit 13fc0c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ requests =
# Suppress pickup location based on location of selected copy
suppressPickup: (excludedPickups, selectedPickup) ->
$.each excludedPickups, (i, location_id) ->
targetedPickup = '#pickup-locations option[value="' + location_id + '"]'
$(targetedPickup).remove()
# temporary Covid-19 hack for limited pickup locations. We do not want any of these 5 getting removed from the select
if location_id != 172 and location_id != 159 and location_id != 188 and location_id != 151 and location_id != 157
console.log(location_id)
targetedPickup = '#pickup-locations option[value="' + location_id + '"]'
$(targetedPickup).remove()

# Track whether one of the excluded pickups was already selected
if location_id == parseInt(selectedPickup)
Expand Down
2 changes: 1 addition & 1 deletion lib/blacklight_cornell_requests/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BlacklightCornellRequests
VERSION = "3.1.7"
VERSION = "3.1.8"
end
3 changes: 3 additions & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Notes - blacklight-cornell-requests

## v3.1.8
- Temporarily ensure that the five valid COVID-19 pickup locations all display.

## v3.1.7
- Modified the list of delivery libraries presented when requesting, in response to COVID-19 pickup location changes.

Expand Down

0 comments on commit 13fc0c4

Please sign in to comment.