Błąd: onclick="fn({{ name|tojson }})" — Jinja tojson generuje wartość
z cudzysłowami, które łamały atrybut HTML (zewnętrzne też cudzysłowy).
Efekt: klik w kwadrat nie robił nic.
Naprawa: przejście na data-* atrybuty + DOMContentLoaded event listener
z document.querySelectorAll. Zero escapingu, zero konfliktów.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Przed: w widoku rocznym /admin/fees kwadraciki miesięcy były tylko
dekoracyjne (span z tooltipem). Żeby wpisać płatność trzeba było
przełączyć widok na konkretny miesiąc przez dropdown i dopiero wtedy
pojawiał się przycisk „Opłać". Magdalena (kierownik biura) spędziła
8 minut próbując klikać w kwadraciki — nic się nie działo.
Teraz: każdy kwadrat miesiąca jest klikalny, otwiera okienko płatności
dla konkretnej firmy × miesiąca. Jeśli rekord MembershipFee nie istnieje
— backend sam go tworzy z wyliczoną stawką (200/300 zł wg zasad brand).
Zmiany:
- Nowy endpoint /admin/fees/ensure-and-mark-paid — tworzy rekord
jeśli brak, potem mark-paid. Odrzuca firmy-córki (parent_company_id)
z komunikatem „Płatność rejestruj przy firmie matce"
- openPaymentModalSmart() w JS — wybór między /mark-paid (istniejący fee)
a /ensure-and-mark-paid (nowy fee) na podstawie obecności feeId
- Hidden fields company_id, fee_year, fee_month w formularzu modala
- Modal pokazuje teraz osobno „Stawka" (disabled) i „Kwota wpłacona"
(editable) — jeden pole amount zmyliło Magdalenę
- Żółty info-box nad tabelą roczną: „Kliknij kwadrat miesiąca, aby
zarejestrować wpłatę"
- Hover: kwadrat się powiększa, pokazuje cień — afordancja kliknięcia
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Admin fees yearly view now shows all active companies (including child brands)
- Child brand rows are indented with striped month cells and "firma córka" badge
- Parent companies show expandable brand list, Stawka column with 200/300 zł logic
- Expected fee per month computed from number of active child brands
- Rate change month shown when brand joins mid-year (e.g. "I-III: 200 zł / od IV: 300 zł")
- Sorting groups children directly under their parent
- Reminder logic skipped for child companies
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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>
Tabela mieści się na ekranie: table-layout fixed, mniejsze month-cell (26px),
cyfry rzymskie zamiast 3-literowych skrótów, przypomnienie jako ikona z tooltip,
skrócony przycisk. Kolumna zaległości 70px.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Nagłówek dwuliniowy: "Zaległości / z lat poprz."
- Placeholder "+ wpisz" z ramką dashed zamiast kreski
- Po zapisie tylko czysta kwota w kolorze czerwonym
- Zaktualizowana legenda
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dodano pole previous_years_debt w modelu Company. Kolumna widoczna w widoku
rocznym składek — kliknięcie kwoty otwiera pole edycji. Legenda zaktualizowana.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Zamiast mylących "mają nieopłacone" vs "częściowo opłacone":
- Opłacone za cały rok
- Częściowo opłacone (mix opłaconych/nieopłaconych + niepełne wpłaty)
- Brak wpłat (żaden miesiąc nie opłacony)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dodano brakujące polskie znaki diakrytyczne (ł, ś, ź, ć, ó, ń) w całym
szablonie składek członkowskich. Ulepszono opisy w dropdownie filtrów
i dodano kontekst do kart statystyk.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New "Przypomnienie" column in yearly fee view shows:
- Empty: no reminder sent yet → button "Przypomnij"
- "✉ Wysłano 20.03": sent but not read → button "Ponów"
- "✓ Odczytano 20.03": sent and read → button "Ponów"
Status derived from last PrivateMessage with "przypomnienie o składce".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Checkboxes for each available email (company, contacts, users)
- Multiple emails can be selected simultaneously
- Additional manual email input field
- Backend sends to all selected addresses in one email
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Portal recipient: dropdown with all users linked to company + role
- Email: dropdown with company email, contacts, user emails
- Editable email field for manual override
- Roles shown: Właściciel, Zarządzający, Pracownik
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Admin can click "Przypomnij" next to any company with unpaid fees.
Opens modal with full message preview including:
- Amount due and period
- Bank account details (KBS Wejherowo)
- Auto-generated transfer title
Admin reviews the message before sending. Sends as portal private
message + optional email to company contact.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Companies with fee records shown first, then a separator row
"Firmy bez danych o składkach", then companies without data
shown in muted style.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows actual paid amount as a small red rotated badge in top-right
corner of partial payment cells (e.g. "180" when 180/200 paid).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Piotrex paid 180 PLN instead of 200 PLN — status "partial" now shows
as blue instead of unstyled black text.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Companies with monthly rate above standard 200 PLN get a small blue
badge next to their name showing the actual rate (e.g. "300 zł").
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Stat cards: smaller font and padding
- Amounts displayed as whole PLN (no decimals)
- Status filter works in yearly view: "Uregulowane cały rok",
"Oczekujące", "Częściowo opłacone"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Filter selects now auto-submit on change (no "Filtruj" button needed).
Year range extended from 2022 to current+1.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After refactoring to blueprints, templates still used bare endpoint names
(e.g., url_for('admin_zopk')) instead of prefixed names (e.g.,
url_for('admin.admin_zopk')). While most worked via backward-compat aliases,
api_zopk_search_news was missing from the alias list causing 500 on /admin/zopk.
Fixed 19 template files and added missing alias for api_zopk_search_news.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Zamieniono url_for('admin_*') na url_for('admin.admin_*') dla tras
już przeniesionych do blueprintu admin. Zgodnie z metodologią
bezpiecznego wdrażania - pełne nazwy blueprintów są niezawodne,
aliasy mogą nie działać dla tras w oddzielnych plikach.
Zaktualizowane pliki:
- base.html (4 linki)
- dashboard.html (2 linki)
- calendar/admin.html (2 linki)
- calendar/admin_new.html (3 linki)
- calendar/index.html (1 link)
- admin/fees.html (2 linki)
- admin/analytics_dashboard.html (1 link)
Zapobiega awariom produkcji przy dalszym refaktoringu.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Zmiana nazwy: "Norda Biznes Hub" → "Norda Biznes Partner"
- Aktualizacja modelu AI: Gemini 2.0 Flash → Gemini 3 Flash
- Zachowano historyczne odniesienia w timeline i dokumentacji
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add /admin/ai-usage/user/<id> route for detailed AI usage per user
- Add ai_usage_user.html template with stats, usage breakdown, logs
- Make user names clickable in AI usage dashboard ranking
- Replace all native browser dialogs (alert, confirm) with styled modals/toasts:
- admin/fees.html, forum.html, recommendations.html, announcements.html, debug.html
- calendar/admin.html, event.html
- company_detail.html, company/recommend.html
- forum/new_topic.html, topic.html
- classifieds/view.html
- auth/reset_password.html
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add MembershipFee and MembershipFeeConfig models
- Add /health endpoint for monitoring
- Add Microsoft Fluent Design CSS
- Update templates with new CSS structure
- Add Announcement model
- Update .gitignore to exclude analysis files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>