ux: always show guidance message for cached 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
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
Shows clear instructions: if cache has more posts than displayed, guide to Analityka. If cache is small (10 posts), guide to "Odswiez wszystkie" first, then Analityka. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
73d7b8f8ee
commit
0b78070113
@ -1325,10 +1325,14 @@
|
||||
if (cachedPosts && cachedPosts.length > 0) {
|
||||
renderFbPosts(companyId, cachedPosts, null, false);
|
||||
var total = {{ cache_data.total_count }};
|
||||
var msg = '';
|
||||
if (total > cachedPosts.length) {
|
||||
document.getElementById('fbPostsContainer-' + companyId).insertAdjacentHTML('beforeend',
|
||||
'<div style="text-align:center;margin-top:var(--spacing-md);color:var(--text-secondary);font-size:var(--font-size-sm);">Wyswietlono ' + cachedPosts.length + ' z ' + total + ' postow. Kliknij <strong>Analityka</strong> aby zobaczyc wszystkie z wykresami.</div>');
|
||||
msg = 'Podglad: ' + cachedPosts.length + ' z ' + total + ' postow z cache. Kliknij <strong>Analityka</strong> aby zobaczyc wykresy.';
|
||||
} else {
|
||||
msg = 'Podglad z cache (' + cachedPosts.length + ' postow). Kliknij <strong>Odswiez wszystkie</strong> aby pobrac pelna historie, potem <strong>Analityka</strong> dla wykresow.';
|
||||
}
|
||||
document.getElementById('fbPostsContainer-' + companyId).insertAdjacentHTML('beforeend',
|
||||
'<div style="text-align:center;margin-top:var(--spacing-md);padding:var(--spacing-sm);color:var(--text-secondary);font-size:var(--font-size-sm);background:var(--surface);border-radius:var(--radius);border:1px dashed var(--border);">' + msg + '</div>');
|
||||
}
|
||||
})();
|
||||
{% endfor %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user