diff --git a/lemarche/static/js/utils.js b/lemarche/static/js/utils.js index e78531062..76ee7c76e 100644 --- a/lemarche/static/js/utils.js +++ b/lemarche/static/js/utils.js @@ -82,14 +82,19 @@ const initSuperBadges = () => { $('#siaes_tabs .nav-item').on('click', function (event) { event.preventDefault() let tabContent = this.parentElement.parentElement.querySelector(".tab-content"); - let hasSuperBadgeTab = this.children[0].classList.contains("super-badge-tab"); + let childLink = this.children[0]; - if (hasSuperBadgeTab) { - tabContent.classList.add("super-badge-tab"); + if (childLink.classList.contains("nav-link-external")) { //edge case for external links + window.location = childLink.href; } else { - tabContent.classList.remove("super-badge-tab"); + let hasSuperBadgeTab = childLink.classList.contains("super-badge-tab"); + + if (hasSuperBadgeTab) { + tabContent.classList.add("super-badge-tab"); + } else { + tabContent.classList.remove("super-badge-tab"); + } } - $(this).tab('show'); }) } diff --git a/lemarche/templates/dashboard/home_siae.html b/lemarche/templates/dashboard/home_siae.html index a3f89c2d7..400c739f8 100644 --- a/lemarche/templates/dashboard/home_siae.html +++ b/lemarche/templates/dashboard/home_siae.html @@ -53,7 +53,7 @@

Tableau de bord

{% endfor %}