Commit Graph

84 Commits

Author SHA1 Message Date
Christian
770f822fc6 feat: Implement bug reporting feature with screenshot support
- Added a new modal for reporting bugs, including fields for describing the issue and attaching optional files.
- Integrated automatic screenshot capture functionality when the bug report modal is opened.
- Created a new API endpoint for submitting bug reports, including validation and rate limiting.
- Added database migration for tracking bug report submissions.
- Updated frontend scripts to handle bug report submissions and display status messages.
- Enhanced contact search functionality with improved error handling and backward compatibility.
- Introduced a new button in the UI for accessing the bug report modal.
2026-05-06 07:01:43 +02:00
Christian
71f6372496 feat: Implement bug reporting feature with screenshot support
- Added a new modal for reporting bugs, including fields for describing the issue and attaching files.
- Implemented backend API for creating bug reports, including rate limiting and metadata logging.
- Introduced a new database table to track bug report submissions for auditing purposes.
- Enhanced the frontend to capture screenshots automatically and allow manual file uploads.
- Added error handling and user feedback for the bug reporting process.
- Updated existing templates and scripts to integrate the new bug reporting functionality.
2026-05-05 19:13:54 +02:00
Christian
f2c8af4680 feat(task-templates): implement task template MVP with modal selector and tag actions
- Added task template and task template items tables to the database.
- Introduced case template runs and run items tables for tracking template executions.
- Created a new JavaScript module for task template selection with a modal interface.
- Integrated tag actions to open the task template selector modal upon tag addition.
- Updated backend to resolve tag actions and return them in the response when adding tags.
- Enhanced the tag picker to handle actions and trigger the appropriate modal.
- Added permissions and group permissions for managing task templates.
2026-05-01 20:58:13 +02:00
Christian
785a2d3ffe feat: Enhance FedEx service with pricing information and update UI for shipping address selection 2026-05-01 07:08:28 +02:00
Christian
bd44771738 feat: Update sag links to include versioning in URLs across multiple templates and services
- Updated links in index_old.html, varekob_salg.html, log.html, opportunities.html, detail.html, and various frontend files to point to the new versioned sag URLs.
- Modified reminder_notification_service.py to reflect the new sag URL structure in notifications.
- Added FedEx shipment management functionality, including API client, service layer, and router for handling FedEx bookings, tracking, and cancellations.
- Created database migration for FedEx shipments, including tables for shipments, packages, and tracking events.
2026-04-30 23:06:00 +02:00
Christian
3452472ba9 Add migrations for recent cases, time tracking pause/resume, and user notes
- Created `sag_recent_cases` table to persist recently opened cases per user for quick access in the bottom bar.
- Added pause/resume support in `tmodule_times` by introducing `paused_at` and `pause_total_seconds` columns.
- Established `user_notes` table for personal user notes with indexing for active and updated notes, along with a trigger to update the `updated_at` timestamp on modifications.

Co-authored-by: Copilot <copilot@github.com>
2026-04-24 11:28:12 +02:00
Christian
4a52bdb5d6 feat: Implement quick-rent functionality for hardware assets
- Added QuickRentCreateInput model to handle quick-rent requests.
- Introduced quick_rent_preview endpoint to check existing subscriptions.
- Created quick_rent_hardware endpoint to manage rental subscriptions, asset bindings, and startup order drafts.
- Updated SQL queries to ensure proper data retrieval and handling.
- Added default rental price columns to hardware_assets table via migration.
- Enhanced UI in sag templates for better user experience and accessibility.
- Refactored existing code for improved readability and maintainability.
2026-04-21 01:34:40 +02:00
Christian
8e8616c835 feat: Enhance vendor and customer linking functionality
- Added endpoints to link and unlink customers to vendors, including validation for relationship types.
- Implemented a UI for managing linked customers in the vendor detail view.
- Introduced a search feature for customers when linking to vendors.
- Updated database schema to support customer-vendor relationships with necessary constraints and indices.
- Added migration scripts for new tables and fields related to supplier invoices and customer-vendor links.
- Modified bottom bar visibility in the frontend for improved user experience.
2026-04-15 09:34:26 +02:00
Christian
13dc1736b4 feat: Implement supplier invoice case traceability and purchase line classification 2026-04-12 09:26:35 +02:00
Christian
ceb560e2f2 feat: Add bottom bar functionality with real-time updates and manual endpoint tests
- Implemented a new bottom bar feature in `bottom-bar.js` that fetches and displays various notifications and statuses in real-time.
- Added functions for handling visibility, state updates, and user interactions within the bottom bar.
- Introduced WebSocket connection for real-time updates and fallback polling mechanism.
- Created a manual testing script `test_manual.py` to validate API endpoints for the manual module.
- Included tests for various paths to ensure expected responses from the server.
2026-04-12 02:27:01 +02:00
Christian
270af0e277 feat(anydesk): Implement multi-ID support for AnyDesk cases
- Added endpoints to list, upsert, and delete AnyDesk IDs associated with cases.
- Introduced normalization for AnyDesk IDs and ensured case existence checks.
- Enhanced session management with quick-connect functionality and local session synchronization.
- Created a new job for syncing AnyDesk sessions from a local endpoint.
- Added database migration for the new `sag_anydesk_ids` table to store AnyDesk IDs per case.
2026-04-06 12:46:04 +02:00
Christian
ee8c517acc feat(manual): add admin interface for creating and editing manuals
- Implemented admin page for manual articles with fields for title, module, difficulty, tags, summary, content, steps, and relations.
- Added preview functionality for markdown content.
- Created list view for recent manuals with edit and view options.
- Developed detail view for individual manuals displaying content, steps, and related guides.
- Established database schema for manual articles, steps, and relations with appropriate indexing.
- Seeded initial manual articles and steps for core functionalities.
- Normalized newline characters in existing manual content.
- Added additional manuals and steps for enhanced user guidance.
2026-04-05 21:48:59 +02:00
Christian
fb2243f0d4 Preserve email body in auto-created cases and backfill missing content 2026-04-03 00:50:34 +02:00
Christian
267f7e716c Add idempotent migration to repair SAG email threading schema 2026-04-02 23:01:31 +02:00
Christian
30d1be61eb feat: Add global search functionality and email results section
- Introduced a global search button and modal for enhanced user experience.
- Added a new section for displaying email results in the global search modal.
- Implemented functionality to fetch and display emails based on user queries.
- Updated the UI to include a reminders button and improved accessibility features.

fix: Update docker-compose to allow reload configuration

- Changed ENABLE_RELOAD environment variable to default to true for easier development.

chore: Update requirements for new dependencies

- Added brother_ql, pyzbar, and pypdfium2 to requirements for label printing and PDF processing.

feat: Implement Brother label printing service

- Created a new service for printing labels using Brother QL printers.
- Supports direct printing of case hardware labels with customizable layouts.

feat: Add Vaultwarden service for credential management

- Implemented a service to interact with Vaultwarden for secure credential storage and retrieval.

sql: Add migrations for email thread keys and document tokens

- Created migrations to backfill email thread keys and manage document tokens for work orders.
- Introduced new tables and updated existing structures to support token-based linking of scanned documents.

sql: Import links into the database

- Added a script to import a predefined set of links into the database with associated categories.
2026-04-01 21:34:58 +02:00
Christian
bc504b9257 feat: Add subscription management functionality and AnyDesk API integration
- Implemented subscription creation, updating, and rendering in script_9.js.
- Added functions for handling subscription line items, product selection, and total calculations.
- Integrated AnyDesk API for session management in test_anydesk.py.
- Created REST client test requests for API endpoints in api.http.
- Developed a script to check ESET machine status and save details in tmp_check_eset_machine.py.
2026-03-30 07:50:15 +02:00
Christian
5b24c5d978 fix: stabilize call->case prefill and migration status routing 2026-03-26 00:32:54 +01:00
Christian
205c0dab07 feat(timetracking): start sag tidsforbrug v1 backend+ui 2026-03-25 16:33:49 +01:00
Christian
43fd651723 Release v2.2.67: mission touch UX, camera/webhook, env temperature feed 2026-03-25 13:46:03 +01:00
Christian
daf2f29471 feat: improve billing, sag, orders, and email workflows 2026-03-23 20:35:15 +01:00
Christian
92b888b78f Add migrations for seeding tags and enhancing todo steps
- Created migration 146 to seed case type tags with various categories and keywords.
- Created migration 147 to seed brand and type tags, including a comprehensive list of brands and case types.
- Added migration 148 to introduce a new column `is_next` in `sag_todo_steps` for persistent next-task selection.
- Implemented a new script `run_migrations.py` to facilitate running SQL migrations against the PostgreSQL database with options for dry runs and error handling.
2026-03-20 00:24:58 +01:00
Christian
695854a272 feat(email): add functionality to send emails with attachments from case tab 2026-03-17 21:51:43 +01:00
Christian
ed01f07f86 Release v2.2.49: sag relation tree UX, type dropdown, 12x quick-action modals, email service 2026-03-05 08:41:59 +01:00
Christian
2bd5a3e057 Release v2.2.46: mission schema resilience and repair migration 2026-03-04 07:12:29 +01:00
Christian
8b863a3b68 feat(mission): add Mission Control MVP with realtime webhooks and fullscreen dashboard 2026-03-03 22:12:05 +01:00
Christian
b0a51f1919 release: v2.2.36 helpdesk sag routing 2026-03-02 23:58:56 +01:00
Christian
c6d310e96d feat: analyze PDF attachments for invoice extraction v2.2.18
- email_analysis_service: extract PDF text from attachments as PRIMARY source
  - _build_invoice_extraction_context: reads PDF bytes (in-memory or DB)
  - _extract_pdf_texts_from_attachments: pdfplumber on in-memory bytes
  - _get_attachment_texts_from_db: fallback to content_data/file_path
  - _build_extraction_prompt: comprehensive schema (vendor, CVR, lines, dates)
  - num_predict 300→3000, timeout 30→120s, format=json
- email_processor_service: _update_extracted_fields saves vendor_name, CVR, invoice_date
- migration 140: extracted_vendor_name, extracted_vendor_cvr, extracted_invoice_date columns

Sender (forwarder/external bookkeeper) is now ignored for vendor detection.
The actual invoice PDF determines vendor/amounts/lines.
2026-03-02 00:17:41 +01:00
Christian
84c837f303 fix: store PDF bytes in DB (content_data) + re-save existing email attachments v2.2.11 2026-03-01 16:36:05 +01:00
Christian
14b13b8239 fix: migration 138 use string-concat EXECUTE, no nested dollar-quoting 2026-03-01 03:05:34 +01:00
Christian
a33da15550 fix: migration 138 nested dollar-quote bug for integer column 2026-03-01 02:59:26 +01:00
Christian
abd5014eb0 Release v2.2.3: migration 138 integer compatibility hotfix 2026-02-22 03:35:56 +01:00
Christian
e772311a86 Release v2.2.2: sync safety hardening 2026-02-22 03:27:40 +01:00
Christian
bef5c20c83 feat: Implement AI-powered Case Analysis Service and QuickCreate Modal
- 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.
2026-02-20 07:10:06 +01:00
Christian
e6b4d8fb47 feat: add alert notes functionality with inline and modal display
- 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.
2026-02-17 12:49:11 +01:00
Christian
3cddb71cec feat: Add Technician Dashboard V1, V2, and V3 with enhanced UI and functionality
- 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).
2026-02-17 08:29:05 +01:00
Christian
891180f3f0 Refactor opportunities and settings management
- 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.
2026-02-15 11:12:58 +01:00
Christian
0831715d3a feat: add SMS service and frontend integration
- 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.
2026-02-14 02:26:29 +01:00
Christian
297a8ef2d6 feat: Implement ESET integration for hardware management
- Added ESET sync functionality to periodically fetch devices and incidents.
- Created new ESET service for API interactions, including authentication and data retrieval.
- Introduced new database tables for storing ESET incidents and hardware contacts.
- Updated hardware assets schema to include ESET-specific fields (UUID, specs, group).
- Developed frontend templates for ESET overview, import, and testing.
- Enhanced existing hardware creation form to auto-generate AnyDesk links.
- Added global logout functionality to clear user session data.
- Improved error handling and logging for ESET API interactions.
2026-02-11 13:23:32 +01:00
Christian
3d7fb1aa48 feat(migrations): add AnyDesk session management and customer wiki slug updates
- Created migration scripts for AnyDesk sessions and hardware assets.
- Implemented apply_migration_115.py to execute migration for AnyDesk sessions.
- Added set_customer_wiki_slugs.py script to update customer wiki slugs based on a predefined folder list.
- Developed run_migration.py to apply AnyDesk migration schema.
- Added tests for Service Contract Wizard to ensure functionality and dry-run mode.
2026-02-10 14:40:38 +01:00
Christian
693ac4cfd6 feat: Add case types to settings if not found
feat: Update frontend navigation and links for support and CRM sections

fix: Modify subscription listing and stats endpoints to support 'all' status

feat: Implement subscription status filter in the subscriptions list view

feat: Redirect ticket routes to the new sag path

feat: Integrate devportal routes into the main application

feat: Create a wizard for location creation with nested floors and rooms

feat: Add product suppliers table to track multiple suppliers per product

feat: Implement product audit log to track changes in products

feat: Extend location types to include kantine and moedelokale

feat: Add last_2fa_at column to users table for 2FA grace period tracking
2026-02-09 15:30:07 +01:00
Christian
6320809f17 feat: Add subscriptions and products management
- Implemented frontend views for products and subscriptions using FastAPI and Jinja2 templates.
- Created API endpoints for managing subscriptions, including creation, listing, and status updates.
- Added HTML templates for displaying active subscriptions and their statistics.
- Established database migrations for sag_subscriptions, sag_subscription_items, and products, including necessary indexes and triggers for automatic subscription number generation.
- Introduced product price history tracking to monitor changes in product pricing.
2026-02-08 12:42:19 +01:00
Christian
e4b9091a1b feat: Implement fixed-price agreements frontend views and related templates
- Added views for listing fixed-price agreements, displaying agreement details, and a reporting dashboard.
- Created HTML templates for listing, detailing, and reporting on fixed-price agreements.
- Introduced API endpoint to fetch active customers for agreement creation.
- Added migration scripts for creating necessary database tables and views for fixed-price agreements, billing periods, and reporting.
- Implemented triggers for auto-generating agreement numbers and updating timestamps.
- Enhanced ticket management with archived ticket views and filtering capabilities.
2026-02-08 01:45:00 +01:00
Christian
b43e9f797d feat: Add reminder system for sag cases with user preferences and notification channels
- Implemented user notification preferences table for managing default notification settings.
- Created sag_reminders table to define reminder rules with various trigger types and recipient configurations.
- Developed sag_reminder_queue for processing reminder events triggered by status changes or scheduled times.
- Added sag_reminder_logs to track reminder notifications and user interactions.
- Introduced frontend notification system using Bootstrap 5 Toast for displaying reminders.
- Created email template for sending reminders with case details and action links.
- Implemented rate limiting for user notifications to prevent spamming.
- Added triggers and functions for automatic updates and reminder processing.
2026-02-06 10:47:14 +01:00
Christian
56d6d45aa2 feat(sag): Add Varekøb & Salg module with database migration and frontend template
- Created a new SQL migration for the sag_salgsvarer table to manage sales and purchase items.
- Implemented a new HTML template for the Varekøb & Salg module, including summary cards and tables for sales and purchases.
- Added JavaScript functions for loading and rendering order data dynamically.
- Introduced a new backend search module for customers, contacts, hardware, and locations with autocomplete functionality.
- Developed an email templates API for managing system and customer-specific email templates.
- Created multiple migrations for Nextcloud instances, cache, audit logs, email templates, sag comments, hardware locations, and billing methods.
- Enhanced the sag module with solutions, order lines, work types, and 2FA support for user authentication.
2026-02-02 20:23:56 +01:00
Christian
29acdf3e01 Add tests for new SAG module endpoints and module deactivation
- Implement test script for new SAG module endpoints BE-003 (Tag State Management) and BE-004 (Bulk Operations).
- Create test cases for creating, updating, and bulk operations on cases and tags.
- Add a test for module deactivation to ensure data integrity is maintained.
- Include setup and teardown for tests to clear database state before and after each test.
2026-01-31 23:16:24 +01:00
Christian
4b467aeeec Release v2.1.0 2026-01-29 00:36:32 +01:00
Christian
f059cb6c95 feat: Add product search endpoint and enhance opportunity management
- Implemented a new endpoint for searching webshop products with filters for visibility and configuration.
- Enhanced the webshop frontend to include a customer search feature for improved user experience.
- Added opportunity line items management with CRUD operations and comments functionality.
- Created database migrations for opportunity line items and comments, including necessary triggers and indexes.
2026-01-28 14:37:47 +01:00
Christian
c2a265d5f9 Add local pipeline opportunities 2026-01-28 07:48:10 +01:00
Christian
3dcd04396e feat(webshop): Initial implementation of webshop module with views, migrations, and templates
- Added views for webshop admin interface using FastAPI and Jinja2 templates.
- Created initial SQL migration for webshop configurations, products, orders, and order items.
- Defined module metadata in module.json for webshop.
- Implemented HTML template for the webshop index page.
- Documented frontend requirements and API contracts in WEBSHOP_FRONTEND_PROMPT.md.
- Introduced scripts for generating conversation summaries and testing Whisper capabilities.
2026-01-25 03:29:28 +01:00
Christian
eacbd36e83 feat: Implement Transcription Service for audio files using Whisper API
- Added `transcription_service.py` to handle audio transcription via Whisper API.
- Integrated logging for transcription processes and error handling.
- Supported audio format checks based on configuration settings.

docs: Create Ordre System Implementation Plan

- Drafted comprehensive implementation plan for e-conomic order integration.
- Outlined business requirements, database changes, backend and frontend implementation details.
- Included testing plan and deployment steps for the new order system.

feat: Add AI prompts and regex action capabilities

- Created `ai_prompts` table for storing custom AI prompts.
- Added regex extraction and linking action to email workflow actions.

feat: Introduce conversations module for transcribed audio

- Created `conversations` table to store transcribed conversations with relevant metadata.
- Added indexing for customer, ticket, and user linkage.
- Implemented full-text search capabilities for Danish language.

fix: Add category column to conversations for classification

- Added `category` column to `conversations` table for better conversation classification.
2026-01-11 19:23:21 +01:00