Commit Graph

59 Commits

Author SHA1 Message Date
52061fa949 feat: Display ALL KRS data in company profile
- Add krs_raw_data, krs_fetched_at, krs_registration_date,
  krs_representation, krs_activities columns to Company model
- Save complete KRS API response for full data access
- Display in company profile:
  - Board members (zarząd) with functions and avatars
  - Shareholders (wspólnicy) with share amounts
  - Representation method (sposób reprezentacji)
  - Business activities (PKD codes)
  - Registration date with years active
  - KRS address with region info
  - OPP (public benefit) status
  - Metadata (stan_z_dnia, data_odpisu)
- Add migration 037_krs_extended_data.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:44:33 +01:00
448937dabd fix: Rename pkd_codes column to ceidg_pkd_list to avoid backref conflict
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:22:32 +01:00
9f2b261df2 feat: Extend CEIDG data storage and enrichment
- Add new Company fields: ceidg_id, ceidg_status, pkd_codes (JSONB),
  correspondence address, owner_citizenships, ceidg_raw_data
- Add enrich_companies_from_ceidg() to fetch full CEIDG details
- Add fetch_full_ceidg_details() for detailed API calls
- Add update_company_from_ceidg() to save all CEIDG fields
- Add --enrich and --apply flags for batch enrichment
- Add migration 036_ceidg_extended_data.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 07:21:21 +01:00
ae70ad326e feat: Add hierarchical role system with delegated permissions
Implements 6-tier role hierarchy:
- ADMIN (100): Full system access
- OFFICE_MANAGER (50): Admin panel without user management
- MANAGER (40): Full company control + user management
- EMPLOYEE (30): Edit company data (with delegated permissions)
- MEMBER (20): Full content access (forum, contacts, chat)
- UNAFFILIATED (10): Public profiles only

Features:
- SystemRole and CompanyRole enums in database.py
- UserCompanyPermissions model for delegation
- New decorators: @role_required(), @company_permission()
- Auto-detection of MANAGER role from KRS data
- Backward compatible with is_admin flag

Migration: 035_add_role_system.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 06:42:39 +01:00
830ef0ea1e feat: Add B2B classifieds interactions (interest, Q&A, context messages)
- Add ClassifiedInterest model for tracking user interest in listings
- Add ClassifiedQuestion model for public Q&A on listings
- Add context_type/context_id to PrivateMessage for B2B linking
- Add interest toggle button and interests list modal
- Add Q&A section with ask/answer/hide functionality
- Update messages to show B2B context badge
- Create migration 034_classified_interactions.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 21:15:30 +01:00
e87ba8ee09 feat: Add read tracking for Forum topics/replies and B2B classifieds
- Add ForumTopicRead, ForumReplyRead, ClassifiedRead models
- Add SQL migration for new tables
- Record reads when user views forum topic (topic + all visible replies)
- Record reads when user views B2B classified
- Display "Seen by" avatars in forum topic and B2B detail pages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 20:50:27 +01:00
f22342ea37 feat: Add forum modernization with reactions, subscriptions, and moderation
- Add edit tracking (24h limit), soft delete, and JSONB reactions to ForumTopic/ForumReply
- Create ForumTopicSubscription, ForumReport, ForumEditHistory models
- Add 15 new API endpoints for user actions and admin moderation
- Implement reactions (👍❤️🎉), topic subscriptions, content reporting
- Add solution marking, restore deleted content, edit history for admins
- Create forum_reports.html and forum_deleted.html admin templates
- Integrate notifications for replies, reactions, solutions, and reports
- Add SQL migration 024_forum_modernization.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 18:55:40 +01:00
0055857df4 feat: Rozbudowa systemu analityki użytkowników
Nowe funkcjonalności:
- GeoIP enrichment (kraj, miasto, region)
- UTM parameters tracking (source, medium, campaign, term, content)
- Bounce rate calculation
- Search queries logging
- Conversion tracking (register, login, contact_click, rsvp)
- Scroll depth tracking (25%, 50%, 75%, 100%)
- JS error tracking (window.onerror)
- Performance metrics (Web Vitals)
- CSV export (sessions, pageviews, searches, conversions)

Nowe tabele SQL:
- search_queries
- conversion_events
- js_errors
- popular_searches_daily
- hourly_activity

Dashboard rozszerzony o nowe sekcje i metryki.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:52:18 +01:00
f5050b92cc feat(announcements): Obsługa wielu kategorii dla aktualności
- Dodanie kolumny categories (ARRAY) do tabeli announcements
- Nowe metody: categories_labels, has_category()
- Migracja 029: dodanie kolumny i mapowanie danych
- Zachowanie kompatybilności wstecznej z polem category

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:14:15 +01:00
dbf55d02cb feat(announcements): Reorganizacja kategorii aktualności
- Zmiana 'general'/'member_news' na 'internal'/'external'
- Kategorie: Wewnętrzne, Zewnętrzne, Wydarzenie, Okazja biznesowa, Partnerstwo
- Polskie znaki w tytułach i meta description
- "Aktualności Norda Biznes Partner"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:10:39 +01:00
1eb1d26772 fix(ui): Zmiana etykiety 'Od członka' na 'Od firm'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:05:00 +01:00
bc58d31c4d fix: Aktualizacja pozostałych odniesień do Gemini 3
- zopk_knowledge_service.py: model dla kategoryzacji milestone'ów
- database.py: przykłady modeli w komentarzach kolumn

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:21:00 +01:00
e2ceba4310 feat(privacy): Dodanie preferencji kanałów kontaktu
Użytkownicy mogą teraz wskazać preferowane kanały komunikacji:
- Email, telefon, wiadomości w portalu (toggle)
- Dodatkowa notatka (np. najlepsze godziny kontaktu)

Migracja: 031_add_contact_preferences.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:06:15 +01:00
4b38f8953c feat(categories): Hierarchiczna struktura kategorii
- Dodanie parent_id do tabeli categories
- Model Category z relacją parent/subcategories
- 4 główne grupy: Usługi, Budownictwo, Handel, Produkcja
- Skrypt assign_category_parents.py do przypisania podkategorii
- Migracja 030_add_category_hierarchy.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:51:15 +01:00
1fb938feb3 feat(blocks): System blokowania użytkowników
- Nowa tabela user_blocks do przechowywania blokad
- Model UserBlock w database.py
- Sprawdzanie blokad przed wysłaniem wiadomości (messages_send, messages_reply)
- UI zarządzania blokadami w /settings/blocks
- Nawigacja między ustawieniami (prywatność, blokady, 2FA)
- Blokada działa w obie strony

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:44:38 +01:00
66f6c1d60e feat(privacy): Ustawienia prywatności użytkownika
- Nowe pola: privacy_show_phone, privacy_show_email w tabeli users
- Nowy route /settings/privacy z UI do zarządzania prywatnością
- Link "Ustawienia" w menu użytkownika
- Toggle switches do włączania/wyłączania widoczności danych
- Migracja SQL: 028_add_user_privacy_settings.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:35:50 +01:00
21a78befad feat(contacts): Baza kontaktów zewnętrznych dla członków Norda
- Nowy model ExternalContact z pełnymi danymi kontaktowymi, social media, related_links (JSONB)
- Migracja SQL 020_external_contacts.sql z full-text search
- Routes: /kontakty (lista), /kontakty/dodaj, /kontakty/<id>, /kontakty/<id>/edytuj
- Szablony: lista z filtrami, karta szczegółów, formularz CRUD
- Nawigacja: link "Kontakty zewnętrzne" w dropdown Społeczność
- Poprawka: aktualizacja liczby firm z 80 na 111

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 08:35:06 +01:00
a172f7af49 feat(announcements): Śledzenie odczytów ogłoszeń (seen by)
- Nowa tabela announcement_reads do śledzenia kto przeczytał
- Avatary użytkowników z inicjałami (tooltip z nazwiskiem)
- Statystyki: liczba i procent użytkowników którzy przeczytali
- Progress bar wizualizujący zasięg ogłoszenia
- Automatyczny zapis odczytu przy otwarciu ogłoszenia

Autor: Maciej Pienczyn
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 08:19:39 +01:00
e14d95394d feat(announcements): System ogłoszeń i aktualności dla członków
- Model Announcement z kategoriami, statusami, slugami URL
- Panel admina /admin/announcements (CRUD, filtry, AJAX)
- Strona /ogloszenia tylko dla zalogowanych członków
- Szczegóły ogłoszenia /ogloszenia/<slug>
- Migracja SQL rozszerzająca istniejącą tabelę
- Testowe ogłoszenia: ARP baza noclegowa, Tytani Przedsiębiorczości
- Pliki PDF regulaminu i harmonogramu konkursu Tytani

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 22:10:54 +01:00
40116d3321 feat(zopk): Timeline auto-populate + fix /zopk 500 + rozszerzony health check
- Dodano funkcje automatycznego uzupełniania Timeline z bazy wiedzy:
  - get_timeline_suggestions() - pobiera milestone facts jako sugestie
  - create_milestone_from_suggestion() - tworzy milestone z faktu
  - categorize_milestones_with_ai() - kategoryzacja AI (nuclear/offshore/etc)
  - Auto-detekcja kategorii, dat i statusu z tekstu polskiego

- API endpoints:
  - GET /api/zopk/timeline/suggestions - lista sugestii z bazy wiedzy
  - POST /api/zopk/timeline/suggestions/approve - zatwierdź sugestię

- Fix: /zopk zwracał 500 (nieistniejąca kolumna is_verified)
  - Dodano kolumnę is_verified do modelu ZOPKMilestone
  - Usunięto filtr is_verified z query (do migracji)

- Health check rozszerzony z 15 do 55+ endpointów:
  - Public pages, Raporty, ZOPK, Chat, IT Audit
  - API publiczne, Admin Core, Admin Audits, Admin ZOPK

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 17:32:54 +01:00
96fa0058c2 feat(zopk): Rozbudowa bazy wiedzy ZOPK
- Dodano skrypt cron do automatycznej ekstrakcji wiedzy (scripts/cron_extract_knowledge.py)
- Dodano panel deduplikacji faktów (/admin/zopk/knowledge/fact-duplicates)
- Dodano API i funkcje auto-weryfikacji encji i faktów
- Dodano panel Timeline ZOPK (/admin/zopk/timeline) z CRUD
- Rozszerzono dashboard bazy wiedzy o statystyki weryfikacji i przyciski auto-weryfikacji
- Dodano migrację 016_zopk_milestones.sql dla tabeli kamieni milowych
- Naprawiono duplikat modelu ZOPKMilestone w database.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:57:11 +01:00
d0dda10bd7 feat(zopk): Panel admina bazy wiedzy, poprawa odpowiedzi AI, timeline
Priorytet 1 - Panel admina bazy wiedzy ZOPK:
- /admin/zopk/knowledge - dashboard ze statystykami
- /admin/zopk/knowledge/chunks - lista chunks z filtrowaniem
- /admin/zopk/knowledge/facts - lista faktów z typami
- /admin/zopk/knowledge/entities - lista encji z mentions
- CRUD operacje: weryfikacja, usuwanie

Priorytet 2 - Poprawa jakości odpowiedzi NordaGPT:
- Linki markdown do źródeł w kontekście ZOPK
- Ulepszone formatowanie (bold, listy, nagłówki)
- Sekcja "Źródła" na końcu odpowiedzi
- Instrukcje w system prompt dla lepszej prezentacji

Priorytet 3 - Timeline ZOPK:
- Model ZOPKMilestone w database.py
- Migracja 016_zopk_milestones.sql z sample data
- Sekcja "Roadmapa ZOPK" na stronie /zopk
- Pionowa oś czasu z markerami lat
- Statusy: completed, in_progress, planned, delayed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:56:55 +01:00
1b4cd31c41 feat(zopk): Knowledge Base + NordaGPT integration (FAZY 0-3)
FAZA 0 - Web Scraping:
- Migracja 015: pola full_content, scrape_status w zopk_news
- zopk_content_scraper.py: scraper z rate limiting i selektorami

FAZA 1 - Knowledge Extraction:
- zopk_knowledge_service.py: chunking, facts, entities extraction
- Endpointy /admin/zopk/knowledge/extract

FAZA 2 - Embeddings:
- gemini_service.py: generate_embedding(), generate_embeddings_batch()
- Model text-embedding-004 (768 dimensions)

FAZA 3 - NordaGPT Integration:
- nordabiz_chat.py: _is_zopk_query(), _get_zopk_knowledge_context()
- System prompt z bazą wiedzy ZOPK
- Semantic search w kontekście chatu

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:15:30 +01:00
223bc91cfa fix: Rename reserved 'metadata' attribute in ZOPKKnowledgeEntity
SQLAlchemy reserves 'metadata' attribute name. Changed to 'entity_metadata'.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 05:08:34 +01:00
db02d3660f feat(zopk): Improve AI scoring and auto-approve threshold
Changes:
- Lower auto-approve threshold from 4★ to 3★ (verified 2026-01-15)
- Add detailed progress bar for ZOPK search process
- Add auto-approved articles list with star ratings
- Document ZOPK topics (ZOP Kaszubia) in CLAUDE.md
- Add 8-second countdown before auto-refresh

Technical:
- zopk_news_service.py: Changed score threshold from >=4 to >=3
- Templates: New CSS for progress phases and results display
- CLAUDE.md: Added "ZOP Kaszubia News" section with topic guidelines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 05:05:41 +01:00
0dba52e9c4 feat: Add security features - 2FA, audit log, alerting
Security enhancements:
- Two-Factor Authentication (TOTP) for all users
  - Enable/disable 2FA in settings
  - Backup codes for recovery
  - Login flow with 2FA verification
- Audit log for admin actions
  - Track all sensitive operations
  - IP address and user agent logging
- Security alerts system
  - Alert types: brute_force, honeypot_hit, account_locked, geo_blocked
  - Email notifications for high/critical alerts
  - Dashboard for alert management
- Admin security dashboard (/admin/security)
  - View/acknowledge/resolve alerts
  - Unlock locked accounts
  - 2FA status overview

New files:
- security_service.py: Security utilities
- templates/auth/verify_2fa.html
- templates/auth/2fa_settings.html
- templates/auth/2fa_setup.html
- templates/auth/2fa_backup_codes.html
- templates/admin/security_dashboard.html

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:23:27 +01:00
10dcbde7a8 feat: Account lockout after 5 failed login attempts
- Lock account for 30 minutes after 5 failed attempts
- Reset counter on successful login
- Log ACCOUNT_LOCKED events to security log
2026-01-14 21:11:33 +01:00
a09203ef55 feat: Add email logging and monitoring system
- Add EmailLog model to database.py for tracking sent emails
- Modify email_service.py to log all sent emails to database
- Track email type (welcome, password_reset, notification)
- Record sender, recipient, subject, status, timestamps
- Supports monitoring email delivery success/failure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:26:48 +01:00
3221740502 feat: Dodanie daty przystąpienia do Izby NORDA na profilu firmy
- Nowa kolumna member_since w tabeli companies
- Karta "Członek Izby NORDA od" na profilu firmy (niebieski kolor #3b82f6)
- Wyświetlanie liczby lat w Izbie
- Import 57 dat przystąpienia z pliku Excel od Artura
- Skrypt import_member_since.py do importu dat

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 06:57:00 +01:00
a148d464af feat: Add user analytics panel (/admin/analytics)
- Track user sessions, page views, clicks
- Measure engagement score and session duration
- Device breakdown (desktop/mobile/tablet)
- User rankings by activity
- Popular pages statistics
- Recent sessions feed
- SQL migration for analytics tables
- JavaScript tracker for frontend events

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:40:37 +01:00
de52e6991c feat: Add KRS Audit panel with full PDF parsing
- New admin panel /admin/krs-audit for KRS data extraction
- Full PDF parser extracting: company data, capital, shares, PKD codes,
  management board, shareholders, procurators, financial reports
- API endpoints for single/batch audits and PDF download
- Company profile shows "Odpis PDF" button and last audit date
- Database migration for krs_audits, company_pkd, company_financial_reports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:46:54 +01:00
abe1cd38a1 feat: Add PKD codes and CEIDG owner data to company profiles
- Add pkd_code, pkd_description columns for business activity classification
- Add business_start_date column from CEIDG
- Add owner_first_name, owner_last_name for JDG companies
- Create import script scripts/import_ceidg_to_db.py
- Add PKD card display in company profile template
- Add owner section for JDG companies without KRS
- Track SQL migrations in git (database/migrations/*.sql)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:07:03 +01:00
f174f4d4da feat: Link Users to Persons (KRS data)
- Add person_id column to users table
- Template shows person profile link when person_id exists
- Add script to match and link users to persons by name

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 15:07:02 +01:00
ffc6d8219f feat: Add toggle button to hide/show test items on B2B board
- Add is_test field to Classified model
- Add test-item styling (opacity + gray border + badge)
- Add yellow toggle button with localStorage persistence
- Add script to mark existing classifieds as test
2026-01-13 13:08:11 +01:00
08d6c0b069 feat: Add 'test' category for forum topics to separate test content
- Add 'test' to ForumTopic.CATEGORIES with Polish label 'Testowy'
- Add gray styling for test topics (badge + card opacity)
- Add scripts to list and mark test topics
2026-01-13 11:48:08 +01:00
9eae623d3e feat: Add source tracking to events + import scripts
- Add source and source_note fields to NordaEvent model
- Create import_calendar_2026.py for NORDA calendar events
- Create import_excel_members_2026_01_13.py for new members
- Add .private/ to .gitignore (confidential materials)

Imported 26 events from Kalendarz Izby NORDA 2026 (Artur Wiertel)
Imported 31 new member companies from Excel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 10:22:24 +01:00
c3d86c996a fix: Add unique constraint on ZOPKStakeholder.name to prevent duplicates
- Added UniqueConstraint on 'name' column
- Constraint already applied to production database
- Prevents duplicate stakeholder entries in the future

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 09:52:33 +01:00
986360f7d5 feat: Add URL normalization and inline audit sections
- Add normalize_social_url() function to database.py to prevent
  www vs non-www duplicates in social media records
- Update update_social_media.py to normalize URLs before insert
- Update social_media_audit.py to normalize URLs before insert
- Add inline GBP Audit section to company profile
- Add inline Social Media Audit section to company profile
- Add inline IT Audit section to company profile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 23:07:03 +01:00
c7a46c5ada feat: Add /api/connections endpoint and people in company detail
- API endpoint for connections graph visualization
- Include Person/CompanyPerson data in company profile
- Support for Zarząd, Wspólnicy, Prokurenci, JDG relationships

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 14:10:04 +01:00
bfe1cd897c feat: Add AI usage monitoring dashboard
- Add AIUsageLog, AIUsageDaily, AIRateLimit models to database.py
- Update gemini_service.py to log to new AIUsageLog table
- Create /admin/ai-usage dashboard with stats and charts
- Show daily/weekly/monthly requests, tokens, costs
- Track usage by type (chat, news_evaluation, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 08:21:07 +01:00
e399022223 feat: Add 1-5 star rating to ZOPK news AI evaluation
- Add ai_relevance_score column (1-5) to zopk_news table
- Update AI prompt to return score with detailed criteria:
  * 1 star = very weak (loose connection to region/industry)
  * 2 stars = weak (general industry news)
  * 3 stars = medium (relates to ZOPK industry but not directly)
  * 4 stars = strong (directly about ZOPK investments/companies)
  * 5 stars = perfect (main topic is ZOPK, Kongsberg, offshore Baltic)
- Display star ratings in admin dashboard with color-coded badges
- Score >= 3 marks news as relevant, < 3 as not relevant

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:34:36 +01:00
a0db0af6c8 feat: AI-based news relevance evaluation using Gemini
- Add ai_relevant, ai_evaluation_reason, ai_evaluated_at columns to zopk_news
- Add evaluate_news_relevance() and evaluate_pending_news() functions
- Add /admin/zopk/news/evaluate-ai endpoint
- Add AI filter tiles (Pasuje wg AI, Nie pasuje wg AI)
- Add "Oceń przez AI" button with progress feedback
- Show AI evaluation badge on news items
- Add new sources: Norda FM, Twoja Telewizja Morska, Nadmorski24.pl, Facebook (Samsonowicz)

AI evaluates news against ZOPK topics: offshore wind, nuclear plant,
Kongsberg investment, data centers, hydrogen labs, key people.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:13:08 +01:00
46ef40950f feat: Add multi-source news search with cross-verification for ZOPK
- Add ZOPKNewsService with multiple RSS sources (12 feeds)
- Implement cross-verification logic (3+ sources = auto_approved)
- Add title hash normalization for fuzzy deduplication
- Include government sources: MON, Ministerstwo Rozwoju
- Include Google News searches for key topics and people
- Add confidence scoring (1-5 based on source count)
- Update SQL migration with cross-verification columns

Sources: Brave API, trojmiasto.pl, Dziennik Bałtycki, Google News,
gov.pl/obrona-narodowa, gov.pl/rozwoj-technologia

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 06:41:31 +01:00
d51637a226 feat: Add ZOPK (Zielony Okręg Przemysłowy Kaszubia) knowledge base
- Add database models for ZOPK projects, stakeholders, news, resources
- Add migration with initial data (5 projects, 7 stakeholders)
- Implement admin dashboard with news moderation workflow
- Add Brave Search API integration for automated news discovery
- Create public knowledge base pages (index, project detail, news list)
- Add navigation links in main menu and admin bar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 06:32:27 +01:00
e8714ac6b0 feat: Add AI-generated content indicators
- Add is_ai_generated column to ForumTopic, ForumReply, NordaEvent, Classified
- Display AI badge next to author name for AI-generated content
- Purple gradient badge with tooltip 'Wygenerowano przez AI'
2026-01-11 06:16:35 +01:00
61e70ad67c feat: Forum categories, statuses, and multi-file attachments
- Add category selection (feature_request, bug, question, announcement)
- Add status tracking (new, in_progress, resolved, rejected) with admin controls
- Add file attachments support (JPG, PNG, GIF up to 5MB)
- Multi-file upload (up to 10 files per reply) with drag & drop and paste
- New FileUploadService with EXIF stripping for privacy
- Admin panel with status statistics and change modal
- Grid display for multiple attachments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:26:20 +01:00
6e9f1a4e4d auto-claude: 2.1 - Replace hardcoded password in database.py with safe fallback
- Replaced hardcoded password 'NordaBiz2025Secure' with placeholder 'CHANGE_ME'
- Added comprehensive warning comment about CWE-798 (Use of Hard-coded Credentials)
- Production credentials must now be set via DATABASE_URL environment variable
2026-01-10 12:47:23 +01:00
71b2928bc5 fix: Eager load Company relationship to fix DetachedInstanceError
Zmiana lazy='joined' dla relationship w modelu User
aby uniknąć błędu podczas dostępu do current_user.company w szablonach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:32:24 +01:00
c1d033a9e2 feat: Panel użytkowników - dodawanie użytkowników i wyświetlanie firm
- Dodano endpoint POST /admin/users/add z generowaniem hasła
- Naprawiono wyświetlanie przypisanych firm (relationship Company)
- Dodano przycisk "Dodaj użytkownika" z modalem
- Naprawiono obcinanie nazw użytkowników w tabeli
- UI: modal z formularzem, wyświetlanie wygenerowanego hasła

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:31:50 +01:00
721e313549 auto-claude: subtask-1-3 - Add ITCollaborationMatch SQLAlchemy model to datab
Added ITCollaborationMatch model to database.py for storing company match pairs:
- company_a_id, company_b_id: Foreign keys to companies table
- match_type: Type of collaboration (shared_licensing, backup_replication, etc.)
- match_reason: Human-readable explanation of the match
- match_score: 0-100 strength score
- status: suggested, contacted, in_progress, completed, declined
- shared_attributes: JSONB for flexible attribute storage
- Helper properties for Polish labels (match_type_label, status_label)
- UniqueConstraint on (company_a_id, company_b_id, match_type)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:20:08 +01:00