Skip to content

Commit

Permalink
Update ivr-reports.handlebars
Browse files Browse the repository at this point in the history
  • Loading branch information
jkelvie authored Jul 8, 2022
1 parent b2d0536 commit 42ae892
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions web/views/ivr/ivr-reports.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,10 @@
</style>
<script>
window.pageType = '{{ pageType }}'
document.addEventListener('om.Optin.success', function(event) {
Cookies.set('converted', 'true', { expires: 365 })
window.location.href = '/ivr/'
});
const urlParams = new URLSearchParams(window.location.search);
if (!Cookies.get('converted') && pageType === 'detail' && !urlParams.has('full')) {
window.location.href = '/ivr/summary'
}
if (window.pageType === 'summary') {
window.datasets = [['TWILIO', 'Vendor A', '#3324de'], ['AMAZON', 'Vendor B', '#9024de'], ['DIALOGFLOW', 'Vendor C', '#24bfde']]
} else if (window.pageType === 'detail') {
window.datasets = [['AMAZON', 'Amazon Connect', ChartHelper.colorAmazon()],
['DIALOGFLOW', 'Google Dialogflow', ChartHelper.colorDialogflow()],
['TWILIO', 'Twilio Voice', ChartHelper.colorTwilio()]]
}
window.datasets = [['AMAZON', 'Amazon Connect', ChartHelper.colorAmazon()],
['DIALOGFLOW', 'Google Dialogflow', ChartHelper.colorDialogflow()],
['TWILIO', 'Twilio Voice', ChartHelper.colorTwilio()]]
</script>
<div id='ivr-reports' class='container-fluid ivr' >
<div class='row' style='margin-bottom: 5px' >
Expand Down Expand Up @@ -292,4 +279,4 @@
</p>
</div>
</div>
</div>
</div>

0 comments on commit 42ae892

Please sign in to comment.