Christian
82ecfda404
Debug: Tilføjet logging af account_id værdier for kontakter
2025-12-22 14:34:07 +01:00
Christian
6398a7ca5f
Debug: Ændret logging level for kontakt linking fejl (debug → info)
2025-12-22 14:25:41 +01:00
Christian
ddcf64ae78
Fix: Tjek for duplicate vtiger_id før update (undgår constraint violation)
2025-12-22 14:15:17 +01:00
Christian
0b6d286332
Debug: Tilføjet bedre logging til vTiger matching for at identificere problem
2025-12-22 14:13:44 +01:00
Christian
64935b5808
Fix: Tilføjet pagination til kontakter + forbedret relation linking
2025-12-22 13:24:41 +01:00
Christian
62fc3cb4dd
Fix: Check for existing customer by CVR også (undgå duplicate key error)
2025-12-22 13:18:36 +01:00
Christian
198c6c56f4
Fix: Truncate country code til max 2 chars (ISO format)
2025-12-22 13:17:03 +01:00
Christian
4042c466f8
Fix: Rettet podman logs syntax og tilføjet sync commands til output
2025-12-22 13:15:13 +01:00
Christian
6917bbff68
Fix: Opdateret guide - download script fra Gitea i stedet for git pull
2025-12-22 13:13:45 +01:00
Christian
c08ebedaf5
Add: Quick update guide til første deployment af updateto.sh
2025-12-22 13:12:06 +01:00
Christian
bcd7f7384a
Add: Deployment script med server validation check
2025-12-22 13:07:32 +01:00
Christian
a9f5714662
Feature: Omstruktureret sync - e-conomic er nu primær kilde, vTiger linker bagefter
2025-12-22 13:02:24 +01:00
Christian
e5dc0f64d3
Fix: Rettet vTiger pagination - bruger ID-baseret filtering i stedet for LIMIT OFFSET
2025-12-22 12:59:12 +01:00
Christian
94781227b2
Fix: Implementeret pagination i vTiger sync for at hente ALLE kunder (batch size 200)
2025-12-22 12:53:11 +01:00
Christian
af6e868828
Fix: Tilføjet manglende VTIGER_ENABLED og ECONOMIC_ENABLED fields i Settings
2025-12-22 11:44:13 +01:00
Christian
187b72238d
Fix: Fjernet LIMIT fra vTiger sync for at hente ALLE kunder og kontakter
2025-12-22 11:39:07 +01:00
Christian
e8be92d187
Fix: CVR unique constraint - tillad multiple kunder uden CVR nummer
2025-12-22 11:35:16 +01:00
Christian
41f7ae991c
Fix: Rettet test-economic endpoint - fjernet ikke-eksisterende get_self() kald
2025-12-22 11:17:36 +01:00
Christian
7fd596612c
Feature: Tilføjet /api/v1/system/test-economic endpoint til at teste e-conomic API forbindelse
2025-12-22 11:15:16 +01:00
Christian
35447cbd4f
Feature: Tilføjet /api/v1/settings/sync-from-env endpoint til at synkronisere .env værdier ind i settings database
2025-12-22 11:04:09 +01:00
Christian
180ae7f650
Fix: Tilføjet manglende msal dependency til email service
2025-12-22 11:01:30 +01:00
Christian
c5ce819a15
Fix: Rettet typo i e-conomic sync (verifiot_matched_count → verified_count) og tilføjet not_matched til return value
2025-12-22 10:48:04 +01:00
Christian
8b71524437
Add verified count to e-conomic sync (separate new matches from existing verifications)
2025-12-19 16:56:39 +01:00
Christian
030071e8d5
Improve e-conomic sync: Only match new customers, verify existing ones
2025-12-19 16:54:57 +01:00
Christian
5d8617bed3
Fix: Add pagination for e-conomic customers (max 1000 per page)
2025-12-19 16:53:39 +01:00
Christian
f6303fa804
Fix: Change Customer schema datetime fields to str for proper serialization
2025-12-19 16:45:22 +01:00
Christian
c9af509e1c
Implement e-conomic customer sync and CVR search (get_customers + search_customer_by_cvr)
2025-12-19 16:41:11 +01:00
Christian
55478c20d3
Add detailed sync logging with precise changes (oprettet/opdateret/linket med firma/CVR info)
2025-12-19 16:36:41 +01:00
Christian
c8e005dd07
Fix: Only fetchall() when query has RETURNING clause or is SELECT
2025-12-19 16:30:03 +01:00
Christian
3f66bd07e6
Fix: Remove WHERE clauses and cf_854 field from vTiger queries (API doesn't support empty string comparison)
2025-12-19 15:34:49 +01:00
Christian
8bc633d59c
Fix: Convert vTiger SQL queries to single-line (API requires no line breaks)
2025-12-19 15:28:25 +01:00
Christian
c2cf8cf5a3
Enhance sync logging with detailed stats (behandlet/oprettet/opdateret/sprunget over)
2025-12-19 15:19:36 +01:00
Christian
ed0491c567
Add showNotification function for sync alerts
2025-12-19 13:24:16 +01:00
Christian
6e2a32165e
Fix: Close tags grid div properly in settings
...
Missing closing div tag and malformed comment caused sync tab to be empty
2025-12-19 13:12:33 +01:00
Christian
7c69cb22e7
Feature: Add sync page to settings
...
- Add Sync navigation tab in settings
- Sync UI with status cards (total, vTiger, e-conomic)
- Action cards for vTiger and e-conomic sync
- Sync log with real-time updates
- JavaScript functions for sync operations
- Backend sync router with vTiger account sync
- Backend vTiger contacts sync with customer linking
- Placeholder for e-conomic sync (needs get_customers method)
- Name normalization for company matching
- CVR number matching and validation
2025-12-19 13:09:42 +01:00
Christian
a011f36385
Feature: Add tags administration to settings page
...
- Add Tags navigation tab in settings
- Modern card-based grid layout for tags
- Quick stats dashboard (6 KPI cards)
- Smart filtering (type + inactive toggle)
- Create/Edit/Delete functionality
- Color picker with hex input sync
- Auto-color suggestion based on tag type
- Bootstrap Icons selector
- Responsive 3-column layout
2025-12-19 08:06:56 +01:00
Christian
15f39f13ce
Fix: Replace execute_query_single with execute_query in email router
...
execute_query_single function does not exist in database module.
All calls should use execute_query instead.
2025-12-19 07:56:05 +01:00
Christian
fedcbd816c
Fix: Add missing settings router to main.py
...
Settings API and frontend were implemented but never registered in FastAPI app.
This caused /settings page to return 404.
2025-12-19 07:51:49 +01:00
Christian
abc763d135
Fix: Remove PostgreSQL port mapping in production
...
Database is only accessed via Docker network, not externally.
This prevents port 5432 conflicts on production servers.
2025-12-17 21:15:11 +01:00
Christian
15905d676a
Fix: Install dependencies from Gitea release, not local cache
...
Problem: Dockerfile copied local requirements.txt before downloading from Gitea,
causing it to use old dependencies without aiohttp.
Solution: Download release first, THEN install requirements from the release.
2025-12-17 21:10:31 +01:00
Christian
1b1045a0c7
Fix: Add aiohttp dependency to requirements.txt
...
CVR service requires aiohttp for API calls
2025-12-17 21:03:36 +01:00
Christian
fdac8b855e
Fix: Strip whitespace from env vars before validation
...
Pydantic cannot parse 'true ' (with trailing spaces) as boolean.
Added field_validator to automatically strip whitespace from all string inputs.
2025-12-17 20:58:01 +01:00
Christian
dfe2bed11f
Docs: Update deployment guide with v1.0.3 and inline comment warning
2025-12-17 17:29:09 +01:00
Christian
2361bd2277
Fix: Add missing env vars to Settings class and remove inline comments from .env
...
- Added API_RELOAD, CORS_ORIGINS to Settings
- Added deployment-specific vars: POSTGRES_*, RELEASE_VERSION, GITEA_URL, GITHUB_TOKEN, GITHUB_REPO
- Removed inline comments from boolean values (Pydantic can't parse them)
- Updated CORS middleware to use CORS_ORIGINS with fallback to ALLOWED_ORIGINS
2025-12-17 17:28:50 +01:00
Christian
87c729a4c6
Fix: Add build dependencies for psycopg2-binary, update CORS to IP address
2025-12-17 17:21:03 +01:00
Christian
34e1faf91d
Production deployment setup: Add deployment scripts, update paths to /srv/podman/bmc_hub_v1.0, add GITEA_URL config
2025-12-17 17:12:10 +01:00
Christian
fda8319e8e
Production deployment setup complete
2025-12-17 16:47:35 +01:00
Christian
84485bd294
feat: Implement ticket contacts management with flexible roles and CRUD operations
2025-12-17 16:38:08 +01:00
Christian
0502a7b080
feat: Implement central tagging system with CRUD operations, entity tagging, and workflow management
...
- Added API endpoints for tag management (create, read, update, delete).
- Implemented entity tagging functionality to associate tags with various entities.
- Created workflow management for tag-triggered actions.
- Developed frontend views for tag administration using FastAPI and Jinja2.
- Designed HTML template for tag management interface with Bootstrap styling.
- Added JavaScript for tag picker component with keyboard shortcuts and dynamic tag filtering.
- Created database migration scripts for tags, entity_tags, and tag_workflows tables.
- Included default tags for initial setup in the database.
2025-12-17 07:56:33 +01:00
Christian
fadf7258de
feat: Implement internal comments for customer subscriptions with database support
2025-12-16 22:07:20 +01:00