Skip to content

Commit

Permalink
Bugs/full/toggle more fix #150566235 (#866)
Browse files Browse the repository at this point in the history
* [#150566235] - Hide/show toggler for eligibility table expansion

* [#150566235] Simplifies logic for showing/hiding AMI toggler based on a listing only having SRO units

* [#150566235] - Hide/show toggler for eligibility table expansion

* [#150566235] Simplifies logic for showing/hiding AMI toggler based on a listing only having SRO units

* [#150566235] alternate method for calculation
  • Loading branch information
kaptron authored Sep 1, 2017
1 parent b121263 commit 8e2c8f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/assets/javascripts/listings/ListingController.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ ListingController = (
l = $scope.listing
l.Leasing_Agent_Phone || l.Leasing_Agent_Email || l.Leasing_Agent_Street

$scope.showAMItoggler = ->
return false if _.isEmpty($scope.AMICharts)
lastHouseholdIncomeLevel = $scope.occupancyIncomeLevels(_.last($scope.AMICharts))
maxNumOfHousehold = _.max(_.map(lastHouseholdIncomeLevel, 'numOfHousehold'))
maxNumOfHousehold > $scope.householdAMIChartCutoff()

$scope.googleMapSrc = (listing) ->
# exygy google places API key -- should be unlimited use for this API
api_key = 'AIzaSyCW_oXspwGsSlthw-MrPxjNvdH56El1pjM'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ accordion-heading.lead
div ng-if="hasMultipleAMICharts()"
ng-include src="'listings/templates/listing/_income-table-multiple.html'"

show-more-toggler inline="true" toggle-state="amiChartExpanded" verb="show"
/ don't show toggler e.g. if the listing is SRO only which will only have 1 row
show-more-toggler inline="true" toggle-state="amiChartExpanded" verb="show" ng-show="showAMItoggler()"

li.custom-counter_item
.content-tile
Expand Down

0 comments on commit 8e2c8f4

Please sign in to comment.