Commit Graph

33 Commits

Author SHA1 Message Date
5893645c46 fix(fees): naprawiono klik w kwadrat miesiąca (konflikt cudzysłowów w onclick)
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
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>
2026-04-14 19:29:06 +02:00
f274d59ae6 feat(fees): klikalne kwadraciki miesięcy w panelu składek — quick payment registration
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
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>
2026-04-14 19:07:17 +02:00
ea8b622903 feat: fee underpayment indicator + premium color on month tiles
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
- paid 200 zł (stawka 200): green (standard)
- paid 300 zł (stawka 300): teal (paid-premium)
- paid 200 zł (stawka 300): red outline + ! badge (underpaid)
Applied to both board/skladki and admin/fees views.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:46:37 +02:00
6a94386ee7 feat: port fee analysis (parent/child brands, stawka) to admin fees view
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
- 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>
2026-04-10 16:40:42 +02:00
110d971dca feat: migrate prod docs to OVH VPS + UTC→Warsaw timezone in all templates
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
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>
2026-04-06 13:41:53 +02:00
d36781a8d7 fix(fees): usunięto zbędne pozycje z legendy (Zaległe, Brak danych)
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
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 15:38:00 +01:00
ec60b50496 fix(fees): usunięto przykładową kwotę 500 zł z legendy zaległości
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
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 15:37:09 +01:00
a612c45526 improve(fees): kompaktowa tabela — zmniejszone komórki, cyfry rzymskie, ikony
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
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>
2026-03-20 15:17:46 +01:00
dda77e9176 improve(fees): lepszy UX kolumny zaległości z lat poprzednich
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
- 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>
2026-03-20 15:15:03 +01:00
3736065dda feat(fees): kolumna zaległości z lat poprzednich z edycją inline
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
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>
2026-03-20 15:11:34 +01:00
8488a6448f feat(fees): badge z liczbą wyświetlanych firm przy nagłówku listy
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
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:59:32 +01:00
cdbd89a792 fix(fees): uproszczone filtry składek — 3 jasne kategorie
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
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>
2026-03-20 14:57:48 +01:00
1e36fd98a3 fix(fees): poprawione polskie znaki i opisy filtrów na stronie składek
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
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>
2026-03-20 14:54:19 +01:00
dc4b6d0d64 improve(fees): grey 'Ponów' button to distinguish from orange 'Przypomnij'
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
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:09:42 +01:00
d7006ba9f7 fix(fees): show hour:minute in reminder status
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
2026-03-20 09:09:12 +01:00
101aa40894 improve(fees): auto-reload page after sending reminder
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
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:03:54 +01:00
069280870f feat(fees): reminder status column — sent/read tracking
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
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>
2026-03-20 08:48:52 +01:00
49fcdbdfb5 improve(fees): multi-email support in payment reminders
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
- 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>
2026-03-20 08:44:17 +01:00
496a651c45 improve(fees): selectable recipient and email in payment reminder
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
- 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>
2026-03-20 08:40:46 +01:00
8d4c4333cf feat(fees): payment reminder with preview — portal message + email
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
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>
2026-03-19 22:09:54 +01:00
2407ce25b4 improve(fees): separate companies with/without fee data
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
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>
2026-03-19 21:51:14 +01:00
637113a94a improve(fees): red badge with amount on partial payments
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 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>
2026-03-19 21:39:58 +01:00
2113ee6e61 fix(fees): add blue color for partial payment status in fee grid
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
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>
2026-03-19 21:35:19 +01:00
345fc175eb improve(fees): show rate badge for higher membership fees (300 zł)
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
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>
2026-03-19 21:15:30 +01:00
5fc1582b80 improve(fees): add color legend for month status icons
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
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:14:05 +01:00
ccd8e5c052 improve(fees): smaller stats, no decimals, yearly status filter
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
- 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>
2026-03-19 20:47:34 +01:00
f6ce83372b improve(fees): auto-submit filters, extend year range to 2022
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
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>
2026-03-19 20:45:42 +01:00
094379d95e fix(templates): Add blueprint prefix to url_for calls across admin templates
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
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>
2026-02-09 13:44:50 +01:00
978481ec00 refactor: Użycie pełnych nazw blueprintów w szablonach admin
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>
2026-01-31 08:33:25 +01:00
cebe52f303 refactor: Rebranding i aktualizacja modelu AI
- 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>
2026-01-29 14:08:39 +01:00
6e00291a88 feat: AI usage user details + styled modals across app
- 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>
2026-01-11 10:30:35 +01:00
6e4e7c2240 Sync: Current production state
- Added CompanyRecommendation system
- Made company pages public (removed @login_required)
- CSS refactor: inline styles instead of external fluent CSS
- Added release notes page
- Added admin recommendations panel
- Company logos (webp format)
- Docker compose configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 12:26:22 +01:00
6d589407be Sync local repo with production state
- 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>
2026-01-06 22:23:28 +01:00