diff --git a/web/static/custom/custom.js b/web/static/custom/custom.js index ee8452845..51fe0504e 100644 --- a/web/static/custom/custom.js +++ b/web/static/custom/custom.js @@ -3276,3 +3276,18 @@ function convertToCamelCase(inputString) { return camelCaseString; } + +function handleHashInUrl(){ + // this function handles hash in url used to tab navigation + const hash = window.location.hash; + if (hash) { + const targetId = hash.substring(1); + const tabLink = $(`a[href="#${targetId}"][data-bs-toggle="tab"]`); + if (tabLink.length) { + tabLink.tab('show'); + setTimeout(() => { + tabLink.click(); + }, 100); + } + } +} diff --git a/web/templates/base/base.html b/web/templates/base/base.html index eff87e5e9..a3d5ac984 100644 --- a/web/templates/base/base.html +++ b/web/templates/base/base.html @@ -109,6 +109,14 @@

{% block page_title %}{% endblock page_title %}