feat: auto-load first page of Facebook posts on page load
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Posts now appear immediately when visiting Social Media Dashboard
instead of requiring manual button click.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-20 08:31:40 +01:00
parent e60f545b11
commit 0d3c925338

View File

@ -1214,4 +1214,17 @@
showToast('Błąd połączenia', 'error');
});
}
// Auto-load first page of posts on page load
document.addEventListener('DOMContentLoaded', function() {
{% if fb_stats %}
{% for company_id_key, fb in fb_stats.items() %}
(function() {
var companyId = {{ company_id_key }};
var btn = document.querySelector('#fbPostsSection-' + companyId + ' .btn-secondary');
if (btn) loadFbPosts(companyId, btn);
})();
{% endfor %}
{% endif %}
});
{% endblock %}