Skip to content

Commit

Permalink
Merge branch 'main' into DAH-1906-descriptive-link-text
Browse files Browse the repository at this point in the history
  • Loading branch information
tallulahkay authored Dec 21, 2023
2 parents 1ddd685 + 7d99f6e commit 92769ec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/config/angularInitialize.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
AccountService.signOut()
$state.go('dahlia.sign-in', {timeout: true})
else if ShortFormApplicationService.isShortFormPage($state.current)
# we don't want to show the beforeunload dialog, because it would allow the applicant to stay on the page after session expiration
$window.removeEventListener('beforeunload', ShortFormApplicationService.onExit)
$state.go('dahlia.listing', {timeout: true, id: ShortFormApplicationService.listing.Id})

$rootScope.$on '$stateChangeStart', (e, toState, toParams, fromState, fromParams) ->
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/shared/SharedService.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ SharedService = ($http, $state, $window, $document) ->
'dahlia.listings-for-sale':
buildUrl: (state, params) -> Service._addLanguageAndParamsToUrl(params.lang, "/listings/for-sale")
shouldRailsRoute: (isFirstLoad) -> !isFirstLoad && $window.DIRECTORY_PAGE_REACT is "true"
'dahlia.listing':
buildUrl: (state, params) -> Service._addLanguageAndParamsToUrl(params.lang, "/listings/#{params.id}")
shouldRailsRoute: (isFirstLoad) -> !isFirstLoad && $window.LISTING_DETAIL_PAGE_REACT is "true"
'dahlia.redirect-home':
buildUrl: (state, params) -> Service._addLanguageAndParamsToUrl(params.lang, "")
shouldRailsRoute: (isFirstLoad) -> true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ div
| {{::$ctrl.applicant.genderOther ? $ctrl.applicant.genderOther : $ctrl.applicant.gender }}
review-summary-item label="{{'label.sexual_orientation_or_sexual_identity' | translate}}" ng-if="::$ctrl.applicant.sexualOrientation"
| {{::$ctrl.applicant.sexualOrientationOther ? $ctrl.applicant.sexualOrientationOther : $ctrl.applicant.sexualOrientation }}
review-summary-item label="{{'label.applicant_veteran' | translate}}" ng-if="::$ctrl.applicant.isVeteran && !::$ctrl.showVeteransApplicationQuestion"
review-summary-item label="{{'label.applicant_veteran' | translate}}" ng-if="::$showVeteransDemographics()"
| {{::$ctrl.getIsVeteran()}}
review-summary-item label="{{'label.household_veteran' | translate}}" ng-if="::$ctrl.application.isNonPrimaryMemberVeteran && !::$ctrl.showVeteransApplicationQuestion"
review-summary-item label="{{'label.household_veteran' | translate}}" ng-if="::$ctrl.showNonPrimaryVeteransDemographics()"
| {{::$ctrl.getIsNonPrimaryMemberVeteran()}}

review-summary-item label="{{'label.how_you_heard_about_this_listing' | translate}}" ng-if="::$ctrl.applicant.referral"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ angular.module('dahlia.components')
ctrl.applicant.referral
)

ctrl.showVeteransDemographics = ->
ctrl.application.isVeteran && !ctrl.showVeteransApplicationQuestion

ctrl.showNonPrimaryVeteransDemographics = ->
ctrl.application.isNonPrimaryMemberVeteran && !ctrl.showVeteransApplicationQuestion

ctrl.translatedYesNoNoAnswer = (val) ->
if val == 'Yes'
$translate.instant('t.yes')
Expand Down

0 comments on commit 92769ec

Please sign in to comment.