- Fix get_files_by_status query: LATERAL join to get latest extraction
per file, returning vendor_name, vendor_match_confidence, total_amount
- Fix renderUnhandledFiles: use best_vendor_name, convert confidence
0-1 to %, use total_amount field
- Add rerun button for all files (not just failed) via rerunSingleFile()
- rerunSingleFile() calls /reprocess/{file_id} and reloads unhandled tab
- Fix retry_extraction endpoint to actually run extraction immediately
extract_vendor_suggestion now matches found CVR/domain/name against
vendors table for ALL code paths (not just fast path):
- CVR match → score 100
- Domain match → score 80
- Email-domain match → score 75
- Name substring → score 60
Frontend auto-links when match_score >= 80 (was only pdf_extraction source).
Shows score reason: CVR-match/domæne-match/navne-match in success toast.
Also: saves newly found CVR to extracted_vendor_cvr so fast path
works on subsequent calls for old emails too.
- extract_vendor_suggestion: fast path if extracted_vendor_cvr already set
- CVR lookup in vendors table → returns vendor_id if match found
- source='pdf_extraction' with confidence=0.95
- Frontend quickCreateVendor:
- If vendor_id returned → auto-link without modal (no manual input needed)
- New source label '📄 PDF-faktura' for pdf_extraction source
- Added execute_query_single import to emails router
Fixes 'list indices must be integers or slices, not str' error when
uploading a duplicate file. execute_query returns a list, so accessing
existing_file['file_id'] caused TypeError. Now uses execute_query_single
which returns a single dict row.
- Added CaseAnalysisService for analyzing case text using Ollama LLM.
- Integrated AI analysis into the QuickCreate modal for automatic case creation.
- Created HTML structure for QuickCreate modal with dynamic fields for title, description, customer, priority, technician, and tags.
- Implemented customer search functionality with debounce for efficient querying.
- Added priority field to sag_sager table with migration for consistency in case management.
- Introduced caching mechanism in CaseAnalysisService to optimize repeated analyses.
- Enhanced error handling and user feedback in the QuickCreate modal.
- Implemented alert notes JavaScript module for loading and displaying alerts for customers and contacts.
- Created HTML template for alert boxes to display alerts inline on detail pages.
- Developed modal for creating and editing alert notes with form validation and user restrictions.
- Added modal for displaying alerts with acknowledgment functionality.
- Enhanced user experience with toast notifications for successful operations.
- Introduced Technician Dashboard V1 (tech_v1_overview.html) with KPI cards and new cases overview.
- Implemented Technician Dashboard V2 (tech_v2_workboard.html) featuring a workboard layout for daily tasks and opportunities.
- Developed Technician Dashboard V3 (tech_v3_table_focus.html) with a power table for detailed case management.
- Created a dashboard selector page (technician_dashboard_selector.html) for easy navigation between dashboard versions.
- Added user dashboard preferences migration (130_user_dashboard_preferences.sql) to store default dashboard paths.
- Enhanced sag_sager table with assigned group ID (131_sag_assignment_group.sql) for better case management.
- Updated sag_subscriptions table to include cancellation rules and billing dates (132_subscription_cancellation.sql, 134_subscription_billing_dates.sql).
- Implemented subscription staging for CRM integration (136_simply_subscription_staging.sql).
- Added a script to move time tracking section in detail view (move_time_section.py).
- Created a test script for subscription processing (test_subscription_processing.py).
- Removed opportunity detail page route from views.py.
- Deleted opportunity_service.py as it is no longer needed.
- Updated router.py to seed new setting for case_type_module_defaults.
- Enhanced settings.html to include standard modules per case type with UI for selection.
- Implemented JavaScript functions to manage case type module defaults.
- Added RelationService for handling case relations with a tree structure.
- Created migration scripts (128 and 129) for new pipeline fields and descriptions.
- Added script to fix relation types in the database.
- Implement SmsService class for sending SMS via CPSMS API.
- Add SMS sending functionality in the frontend with validation and user feedback.
- Create database migrations for SMS message storage and telephony features.
- Introduce telephony settings and user-specific configurations for click-to-call functionality.
- Enhance user experience with toast notifications for incoming calls and actions.