From d293a534c3768af1c086015f71fa01ac80e7f87b Mon Sep 17 00:00:00 2001 From: Eduardo Robles Date: Mon, 28 Nov 2022 11:44:19 +0100 Subject: [PATCH] Bugfix: Link to ballot tracker not working (#281) When `election.presentation.extra_options.success_screen__hide_qr_code` is set `true`, the ballot confirmation pdf shows a link to the ballot tracker but the link didn't work. This fixes https://github.com/sequentech/roadmap/issues/40 --- .../success-screen-directive.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/avBooth/success-screen-directive/success-screen-directive.js b/avBooth/success-screen-directive/success-screen-directive.js index d42c18a0..4b42f458 100644 --- a/avBooth/success-screen-directive/success-screen-directive.js +++ b/avBooth/success-screen-directive/success-screen-directive.js @@ -410,13 +410,6 @@ angular.module('avBooth') ) { var typeNumber = 0; var errorCorrectionLevel = 'L'; - scope.ballotTrackerUrl = window.location.protocol + - '//' + - window.location.host + - '/election/' + - scope.election.id + - '/public/ballot-locator/' + - scope.stateData.ballotHash; var qr = QrCodeService(typeNumber, errorCorrectionLevel); qr.addData(scope.ballotTrackerUrl); qr.make(); @@ -454,6 +447,14 @@ angular.module('avBooth') scope.successText = text({electionId: scope.election.id}); + scope.ballotTrackerUrl = window.location.protocol + + '//' + + window.location.host + + '/election/' + + scope.election.id + + '/public/ballot-locator/' + + scope.stateData.ballotHash; + generateQrCode(); if (