Commit Graph

4 Commits

Author SHA1 Message Date
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
b405fdd810 auto-claude: subtask-7-3 - Handle edge cases for IT audit
Edge cases handled:
1. Partial submission:
   - Added is_partial flag to save response
   - Dynamic success message based on completeness score
   - Completeness threshold messages (< 30%, 30-70%, > 70%)

2. Company without audit:
   - Fixed template to show "Brak audytu" for companies without audit
   - Added "Utwórz audyt" button (+ icon) for companies without audit
   - Fixed data structure mismatch between route and template

3. Multiple audit history:
   - Added get_company_audit_history() convenience function
   - Added has_company_audit() helper function
   - Added /api/it-audit/history/<company_id> API endpoint
   - Returns history_count in save response

Other fixes:
- Fixed stats variable naming in admin_it_audit route
- Fixed collaboration_matches data structure for template
- Fixed url_for to use slug instead of company_id
- Fixed match_type filter (shared_licensing not shared_m365_licensing)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 09:30:50 +01:00
5cdd33857f auto-claude: subtask-2-2 - Implement security scoring algorithm (50% weight)
Security scoring implementation with 7 security elements:
- EDR: +15 pts (highest security value)
- MFA: +10 pts (identity security)
- Firewall: +10 pts (network protection)
- Backup: +10 pts (data protection)
- DR Plan: +10 pts (disaster recovery readiness)
- VPN: +5 pts (secure remote access)
- Monitoring: +5 pts (security visibility)

Max raw score: 65 points. Returns raw score directly.
Normalization to 0-100 happens in overall score calculation.

Verification: has_edr + has_mfa returns 25 (15 + 10).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:30:37 +01:00
e929a9e825 auto-claude: subtask-2-1 - Create it_audit_service.py with ITAuditResult dataclass
Added IT audit service module with:
- ITAuditResult dataclass with all required fields (overall_score, security_score,
  collaboration_score, completeness_score, maturity_level, fields, recommendations)
- FieldStatus dataclass for individual field status tracking
- CollaborationMatch dataclass for collaboration matching results
- ITAuditService class with complete structure:
  - Scoring methods: _calculate_security_score, _calculate_collaboration_score,
    _calculate_completeness_score, calculate_scores
  - CRUD methods: save_audit, get_latest_audit, get_audit_history
  - Matching methods: find_collaboration_matches, save_collaboration_match,
    get_matches_for_company
- Helper functions: get_maturity_level, get_maturity_level_label
- Scoring configuration constants following spec:
  - Security (50% weight): EDR, MFA, firewall, backup, DR plan, VPN, monitoring
  - Collaboration (30% weight): 6 flags + Azure AD, M365, PBS, Zabbix bonuses
  - Completeness (20% weight): weighted field completion percentage
- Maturity levels: basic (0-39), developing (40-59), established (60-79), advanced (80-100)

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