ata-tab-name attribute based on the inner text of the tab links
    $('.nav-tabs .nav-link').each(function () {
        var tabName = $(this).text().toLowerCase().replace(/ /g, '-');
        $(this).attr('data-tab-name', tabName);
    });

    function activaTab(tabName, container = document) {
        var tabLink = $(container).find('.nav-tabs .nav-link[data-tab-name="' + tabName + '"]');
        if (tabLink.length) {
            tabLink.tab('show');
            tabLink.trigger('click'); // Explicitly trig