Production moved from on-prem VM 249 (10.22.68.249) to OVH VPS
(57.128.200.27, inpi-vps-waw01). Updated ALL documentation, slash
commands, memory files, architecture docs, and deploy procedures.
Added |local_time Jinja filter (UTC→Europe/Warsaw) and converted
155 .strftime() calls across 71 templates so timestamps display
in Polish timezone regardless of server timezone.
Also includes: created_by_id tracking, abort import fix, ICS
calendar fix for missing end times, Pros Poland data cleanup.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jsdelivr.net returns 503 from production network (behind FortiGate).
Downloaded Chart.js 4.4.7 UMD bundle locally to eliminate CDN dependency.
Updated all 4 templates that used the CDN link.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sections now have collapsible headers with localStorage persistence.
Layout order: FB page stats > Analityka (charts) > Top 5 > App posts > FB posts.
Each section can be independently expanded/collapsed by clicking the header.
Collapse state persists across page loads via localStorage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
perPage=0 (show all) was being overridden to 10 by || operator.
Changed to explicit key-in-object check to preserve 0 value.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
renderFbPosts no longer unconditionally resets page to 1.
Only resets when dataset size changes (new data loaded).
Preserves user's dropdown selection during auto-load.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Default 10 posts per page with dropdown (10/20/50/100/Wszystkie).
"Pokaż więcej" button loads next page incrementally.
Pagination bar shows count and controls at bottom of posts list.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added 200px fixed height container and maintainAspectRatio:false
to "Typy postów" doughnut chart so second row matches first row height.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaced ASCII Polish strings with proper diacritics: postow→postów,
Odswiez→Odśwież, Sredni→Średni, Blad→Błąd, Ladowanie→Ładowanie,
Nastepna→Następna, Usun→Usuń, Utworz→Utwórz, and ~30 more.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removed redundant Analityka button since charts auto-load on page load.
"Odswiez wszystkie" now also renders charts after fetching.
Two buttons remain: "Najnowsze 10" (quick preview) and "Odswiez wszystkie"
(full fetch + cache + charts).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Charts now render automatically on page load via AJAX from DB cache
(no click needed). Info bar above charts shows post count, cache date,
and hint to refresh. GET cache endpoint now returns cached_at date.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Facebook Graph API can return cycling cursors causing infinite fetch loops.
Added: post ID deduplication, seen-cursor detection, max 100 pages limit.
Applied to both loadAllFbPosts and refreshAllFbPosts functions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
"Najnowsze 10" no longer saves to DB cache.
New "Odswiez wszystkie" button fetches all posts via FB API pagination
and saves to cache. "Analityka" uses cache for instant charts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes slow page load for non-admin users (919KB inline JSON).
Route now sends max 10 posts inline with total_count metadata.
New GET endpoint serves full cache via AJAX for Analityka button.
loadAllFbPosts tries DB cache first (instant), falls back to FB API.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Migration 071: Add cached_posts (JSONB) and posts_cached_at to social_media_config
- Service: get_cached_posts() and save_all_posts_to_cache() methods
- Route: New POST endpoint to save posts cache, pass cached data to template
- Template: Render cached posts+charts instantly on page load from DB,
save to DB after "Load all" or "Refresh", remove AJAX auto-load
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
New charts: post types (doughnut), best day of week (bar with dual axis),
best hour (bar with dual axis), top 5 posts (stacked horizontal bar).
Replace redundant likes metric with weighted engagement score per post.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds auto-pagination that fetches all Facebook posts and renders 3 Chart.js
visualizations: engagement per post (line), publication activity per month (bar),
and average engagement trend per month (line with fill).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display last 10 posts from connected Facebook page with engagement
data (likes, comments, shares, reactions). On-demand insights button
loads impressions, reach, engaged users, and clicks per post.
In-memory cache with 5-min TTL prevents API rate limit issues.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Expandable help section on Integracje page explaining when connection
may stop working (password change, app removal, role loss)
- Troubleshooting link on Social Publisher stats panel
- Actionable error message on failed posts pointing to Integracje
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Social Publisher: blue gradient panel with followers, engagement,
completeness, contact pills, and refresh button.
Integracje: "Synchronizuj dane" button next to Disconnect for Facebook.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Social Publisher now supports multi-company FB publishing via OAuth.
Each company can connect its own Facebook page through the existing
OAuth framework. Includes discover-pages/select-page endpoints,
per-company settings UI, and publishing_company_id on posts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Admin panel module for publishing posts on NORDA chamber Facebook page.
Includes AI content generation (Gemini), post workflow (draft/approved/
scheduled/published), Facebook Graph API publishing, and engagement tracking.
New: migration 070, SocialPost/SocialMediaConfig models, publisher service,
admin routes with AJAX, 3 templates (list/form/settings).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>