Commit Graph

31 Commits

Author SHA1 Message Date
Christian
1ebb1fa2cd fix: Never use time descriptions as case title, only contact+date fallback (v1.3.111) 2026-01-05 16:52:58 +01:00
Christian
d99d542a24 fix: Use contact name + date as case title fallback (v1.3.110) 2026-01-05 16:44:18 +01:00
Christian
1e45ec70bf fix: Better case title fallback logic - use descriptions or 'Arbejde' (v1.3.109) 2026-01-05 16:43:16 +01:00
Christian
dfcb523e12 chore: Update VERSION to 1.3.108 2026-01-05 16:34:23 +01:00
Christian
031212ae82 chore: Update VERSION to 1.3.107 2026-01-05 16:08:51 +01:00
Christian
224ce5ec1a feat: Add timetracking approval columns migration (v1.3.84)
- Add migration 053 for approval columns
- Checks if columns exist before adding (safe)
- Adds: approved_hours, rounded_to, approval_note, billable, is_travel, approved_at, approved_by
- Adds indexes for status and approved_at
- Required for production deployment
2026-01-02 13:03:55 +01:00
Christian
cbc05b52ce fix: Use execute_query_single for case details (v1.3.83)
- Fix get_case_details using execute_query instead of execute_query_single
- execute_query returns list, execute_query_single returns dict
- Prevents 500 error when loading case details
2026-01-02 13:01:20 +01:00
Christian
45d4f78006 debug: Add detailed logging to approval flow (v1.3.82)
- Add logging before approval object creation
- Add logging after approval object creation
- Add logging before database update
- Add logging after database update
- Add time_id to error messages
- This will help diagnose 500 errors on production
2026-01-02 12:58:53 +01:00
Christian
420507027a fix: Remove ge constraint from rounded_to field (v1.3.81)
- Remove ge=0.25 constraint that prevents None values
- Optional fields should accept None without validation
- Fixes approval validation error
2026-01-02 12:56:27 +01:00
Christian
e45b1ed19e fix: Remove float() conversion for Decimal fields (v1.3.78)
- Let Pydantic handle Decimal conversion
- Send approved_hours as Decimal, not float
- Send rounded_to as Decimal, not float
- Add exc_info=True to error logging
2026-01-02 12:51:12 +01:00
Christian
17cd871909 fix: Add Body() annotation to approval endpoint (v1.3.77)
- Add Body(...) to request parameter
- Import Body from fastapi
- Fix FastAPI body parameter handling
2026-01-02 12:49:19 +01:00
Christian
7cb38663bc fix: Timetracking wizard approval endpoint (v1.3.76)
- Fix parameter handling in approve_time_entry endpoint
- Change from query params to body Dict[str, Any]
- Send all required fields to wizard.approve_time_entry()
- Calculate rounded_to if auto-rounding enabled
- Add approval_note, billable, is_travel fields
- Add Dict, Any imports
2026-01-02 12:45:25 +01:00
Christian
6c4042b9b6 feat: Implement SFTP offsite backup functionality (v1.3.75)
- Add SFTP upload support with paramiko
- Add database columns for offsite tracking (status, location, attempts, error)
- Add manual upload endpoint /api/v1/backups/offsite/{job_id}
- Add frontend button for offsite upload
- Add SFTP configuration in config.py
- Fix infinite loop in _ensure_remote_directory for relative paths
- Add upload verification and retry mechanism
- Add progress tracking and logging
2026-01-02 12:35:02 +01:00
Christian
1b84bee868 Add APScheduler dependency and fix scheduler endpoint 2026-01-02 02:28:33 +01:00
Christian
ebf3b1f31c Fix backup jobs query and add missing config 2026-01-02 02:26:33 +01:00
Christian
3ffee6d428 Add backup storage config settings 2026-01-02 02:23:10 +01:00
Christian
58b598058a Enable backup module functionality 2026-01-02 02:13:17 +01:00
Christian
9fb149c02a Fix Mattermost config field names 2026-01-02 02:06:05 +01:00
Christian
3a3d81cf4c Add Mattermost notification settings 2026-01-02 02:02:44 +01:00
Christian
f77e6dc70b Add backup system configuration settings 2026-01-02 01:54:52 +01:00
Christian
7744e71761 Add paramiko dependency for backup module 2026-01-02 01:48:55 +01:00
Christian
60614ae298 Add backup router registration and fix updateto.sh with sudo 2026-01-02 01:21:00 +01:00
Christian
e10bb20e77 Bump version to 1.3.65 for debug endpoint 2026-01-02 00:01:42 +01:00
Christian
8ac3a9db2f v1.3.64 - Redesigned sync architecture with clear field ownership
BREAKING CHANGES:
- vTiger sync: Never overwrites existing vtiger_id
- Contact sync: REPLACES links instead of appending (idempotent)
- E-conomic sync: Only updates fields it owns (address, city, postal, email_domain, website)
- E-conomic sync: Does NOT overwrite name or cvr_number anymore

ARCHITECTURE:
- Each data source owns specific fields
- Sync operations are now idempotent (can run multiple times)
- Clear documentation of field ownership in sync_router.py
- Contact links deleted and recreated on sync to match vTiger state

FIXED:
- Contact relationships now correct after re-sync
- No more mixed customer data from different sources
- Sorting contacts by company_count DESC (companies first)
2025-12-24 10:34:13 +01:00
Christian
a867a7f128 fix: sync address field from e-conomic (v1.3.63)
- Added address field to UPDATE query in economic sync
- Added address field to INSERT query for new customers
- Fixes issue where address from e-conomic was not synced
- Prevents mixed data (København address with Lundby city/postal)
- Address is now synced along with city, postal_code, country
2025-12-24 09:41:51 +01:00
Christian
0dd24c6420 fix: better error handling for order generation (v1.3.62)
- Added more specific error message when customer not found
- Added debug logging to check customer object type
- Changed error from 'Customer not found' to include customer_id
- Helps diagnose 'string indices must be integers' error
2025-12-24 09:39:31 +01:00
Christian
d228362617 fix: parse customer_rate as float in wizard (v1.3.61)
- Fixed customer_rate being returned as string from DB (NUMERIC type)
- Added parseFloat() when using customer_rate in calculations
- Fixes customer stats showing '-' instead of actual hourly rate
- Applied to loadCustomerContext(), displayCaseEntries(), and approveEntry()
2025-12-24 09:35:46 +01:00
Christian
097f0633f5 fix: settings sync stats loading (v1.3.60)
- Fixed loadSyncStats() to correctly parse API response
- Customers API returns {customers: [...]} not array directly
- Added const data = await response.json() and data.customers
- Fixes sync stats counters showing NaN or incorrect values
2025-12-23 15:50:20 +01:00
Christian
4c2593b99c feat: search e-conomic for customers by name (v1.3.59)
- Added EconomicService.search_customer_by_name() method
- Added GET /api/v1/customers/{id}/search-economic endpoint
- Returns matching e-conomic customers by name (partial match)
- Helps find economic customer number for customers without CVR
- Shows customerNumber, name, CVR, email, city in results
2025-12-23 15:39:35 +01:00
Christian
1b0217ef7b feat: manual link customer to e-conomic (v1.3.58)
- Added POST /api/v1/customers/{id}/link-economic endpoint
- Allows manually setting economic_customer_number for customers without CVR
- Useful for vTiger customers that can't auto-match via CVR or name
- Updates last_synced_at timestamp when linking
2025-12-23 15:36:17 +01:00
Christian
c254e7cb76 feat: dynamic version from VERSION file (v1.3.57)
- Created VERSION file with current version
- Health endpoints now read version from VERSION file instead of hardcoded
- Fixes issue where health check showed wrong version
- main.py /health and /api/v1/system/health now show correct version
2025-12-23 15:32:34 +01:00