feat(reports): add Envelope, Phone Book (address+phone) and Rolodex Info reports
- PDF builders in app/reporting.py (envelope, phone+address, rolodex info) - Endpoints in app/main.py with auth, filtering, logging, Content-Disposition - New HTML template report_phone_book_address.html - Rolodex bulk actions updated with buttons/links - JS helper to submit selections to alternate endpoints Tested via docker compose build/up and health check.
This commit is contained in:
@@ -81,6 +81,25 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
});
|
||||
|
||||
// Submit selection to alternate endpoints using data-action
|
||||
document.querySelectorAll('.js-submit-to').forEach(function(link) {
|
||||
link.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
var container = link.closest('.table-responsive') || document;
|
||||
var form = container.querySelector('form.js-answer-table');
|
||||
if (!form) form = document.querySelector('form.js-answer-table');
|
||||
if (!form) return;
|
||||
var original = form.getAttribute('action');
|
||||
var action = link.getAttribute('data-action');
|
||||
if (action) form.setAttribute('action', action);
|
||||
try {
|
||||
form.submit();
|
||||
} finally {
|
||||
if (original) form.setAttribute('action', original);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Field help: show contextual help from data-help on focus
|
||||
function attachFieldHelp(container) {
|
||||
if (!container) return;
|
||||
|
||||
Reference in New Issue
Block a user