...
Add the following code to the js/custom1.js
file in your local customization package before the final })();
tags
Code Block |
---|
// Hidehide redundant sign in alert for Rapido app.component('prmServiceNgrsAfter', { bindings: { parentCtrl: '<' }, controller: function($document,$timeout$interval) { var vm = this; var guest = vm.parentCtrl.jwtUtilService.isGuest(); $timeout var out; out = $interval(function() { if (guest) { var rapidosignin = $document[0].querySelector('prm-service-ngrs > prm-alert-bar'); if (rapidosignin != undefined){ rapidosignin.style.display = "none"; $interval.cancel(out); } } }, 3000100); } }); |
Notes:
The script waits 3 seconds until the GetIt section is loaded into the browser so it can catch the html part and modify it.
If the browser loads GetIt section more than 3 seconds, the code will not hide the additional sign-in; if the browser loads the GetIt section faster than 3 seconds, the code will work but sometimes will still display the second sign-in button for a second before hiding it.