when choosing a Tab, make the new bill drop-down be of that type. When we save a new bill, change the last-tab to be the type of bill we just added

This commit is contained in:
2025-08-28 20:47:12 +10:00
parent 2bdd1348b8
commit e84faffd79
3 changed files with 8 additions and 3 deletions

View File

@@ -345,6 +345,8 @@
function SaveTab( last_tab )
{
// set the drop-down for new bill to be this tab now...
$("#new-bill-data-type").val( $('.nav-tabs .nav-link.active').prop('id').replace("tab-but-", "") )
$.ajax( { type: 'POST', url: '/saveui', contentType: 'application/json', data: JSON.stringify( { 'last_tab': last_tab } ), success: function() { } } )
}
@@ -367,6 +369,8 @@
{% else %}
$('#tab-but-1').tab('show');
{% endif %}
// make the new bill drop-down default to the same as the current tab
$("#new-bill-data-type").val( {{bill_ui.last_tab}} )
} )
</script>
</body>