Commit Graph

870 Commits

Author SHA1 Message Date
Dries Peeters 00f1f18abb Improve build scripts and CI/CD workflows
- Enhance build scripts with better error handling and Windows support
- Add Windows-specific build scripts and PowerShell utilities
- Add asset preparation and verification scripts
- Update GitHub Actions workflows for desktop and mobile builds
- Add build configuration and troubleshooting utilities
- Improve cross-platform build compatibility
2026-01-11 20:51:13 +01:00
Dries Peeters 7195a4e43e Enhance desktop app with improved branding and features
- Update package.json version to 4.10.1 with enhanced metadata
- Add splash screen with branding
- Improve window management and preload security
- Enhance renderer styles with brand colors
- Add asset preparation tracking
- Update desktop README with comprehensive documentation
2026-01-11 20:51:07 +01:00
Dries Peeters 25b8d928b0 Update templates with new branding and logo integration
- Integrate new logo assets across all templates
- Update base template with improved favicon and meta tags
- Add logo support to login, admin, and inventory templates
- Update web manifest with new branding
- Enhance PDF layouts with logo support
2026-01-11 20:51:03 +01:00
Dries Peeters 79200f0760 Add branding assets: logo SVGs and brand color stylesheets
- Add TimeTracker logo variants (dark, light, horizontal, icon)
- Add brand-colors.css for consistent color theming
- Include desktop app logo assets
2026-01-11 20:50:59 +01:00
Dries Peeters 15b0c2c2b4 chore: bump version to 4.10.1 2026-01-11 12:15:37 +01:00
Dries Peeters 7332928958 fix: add boundary checking for PDF elements and page numbers
- Add page dimension validation in PDF generators to prevent content
  from being drawn outside page boundaries
- Fix page number positioning in fallback PDF generator to ensure
  they stay within page margins
- Add boundary constraints for absolutely positioned elements in
  ReportLab template renderer
- Prevent rendering errors when elements exceed page dimensions
2026-01-11 12:15:34 +01:00
Dries Peeters ebf6126fe2 chore(docker): change Redis default to disabled
- Change REDIS_ENABLED default from 'true' to 'false' in docker-compose.yml
- This prevents Redis connection attempts when Redis is not needed
- Applications will use in-memory cache fallback instead
2026-01-11 10:06:24 +01:00
Dries Peeters 059b8dba1f perf(cache): optimize Redis connection timeouts for faster failures
- Reduce socket_connect_timeout from 5s to 1s for faster failure detection
- Reduce socket_timeout from 5s to 1s for faster operation timeouts
- Disable socket_keepalive to avoid connection delays
- Disable retry_on_timeout to fail fast instead of retrying
- Improve fallback to in-memory cache when Redis is unavailable
2026-01-11 10:06:20 +01:00
Dries Peeters 8de734458c perf(auth): defer analytics tracking to avoid blocking login redirects
- Move track_event calls to background threads for both local and OIDC login
- Prevent PostHog timeouts from blocking user login flow
- Add error handling to prevent analytics errors from affecting login
- Maintain fast log_event calls while deferring slower track_event calls
2026-01-11 10:06:16 +01:00
Dries Peeters c9df042d2b feat(integrations): add CalendarEvent sync support to Google Calendar connector
- Add bidirectional sync for CalendarEvent objects (similar to CalDAV)
- Import Google Calendar events as CalendarEvent instead of TimeEntry
- Sync CalendarEvent objects to Google Calendar with proper markers
- Add methods to create/update Google Calendar events from CalendarEvent
- Track imports using description markers instead of IntegrationExternalEventLink
- Prevent circular sync by checking for import markers
- Update logging to include calendar event counts alongside time entries
2026-01-11 10:06:13 +01:00
Dries Peeters bd7798129b feat(pdf): add page border visualization and zoom display
- Add blue page border to clearly mark page boundaries in PDF editor
- Add zoom percentage display next to zoom controls
- Update overlap detection to exclude page border
- Ensure page border is recreated after canvas clear and page size changes
- Filter out page border from exported templates
- Fix totals text styling by finding element by name instead of index
2026-01-11 10:06:01 +01:00
Dries Peeters 03d912038e docs: Update mobile and desktop apps implementation plan 2026-01-11 08:38:39 +01:00
Dries Peeters 36483648bb chore: Update Docker configuration and infrastructure setup
- Update Dockerfile with improved build configuration
- Refactor docker-compose.yml with better service definitions
- Update setup.py for package installation
- Improve .dockerignore to exclude unnecessary files
- Clean up template files (whitespace and formatting)
2026-01-11 08:38:10 +01:00
Dries Peeters 0178ef03ad feat: Increase invoice prefix length from 10 to 50 characters
- Add database migration to extend invoice_prefix column length
- Support longer invoice prefixes for better customization
- Migration includes SQLite compatibility handling
2026-01-11 08:37:59 +01:00
Dries Peeters bad397fbdb feat: Enhance invoice management, expenses, and PDF generation
- Improve invoice model with enhanced prefix handling and validation
- Enhance expense routes with better error handling and validation
- Refactor PDF generator with improved template support and formatting
- Update Google Calendar integration with improved error handling
- Enhance scheduled tasks with better logging and reliability
- Update admin routes with improved permission checks
- Improve email utility with better template handling
2026-01-11 08:37:48 +01:00
Dries Peeters d1d5b819a9 ci: Add CI/CD workflows for mobile and desktop app builds
- Add GitHub Actions workflow for building Flutter mobile apps
- Add GitHub Actions workflow for building Electron desktop apps
- Update release workflow to include mobile and desktop build jobs
- Support cross-platform builds (Android, iOS, Windows, macOS, Linux)
- Add artifact publishing for built applications
2026-01-11 08:37:37 +01:00
Dries Peeters 1419712a60 feat: Add mobile (Flutter) and desktop (Electron) applications
- Add Flutter mobile app with authentication, timer, projects, and time entries
- Add Electron desktop app with system tray integration and offline support
- Implement offline storage with sync queue for both platforms
- Add comprehensive build scripts for cross-platform builds
- Include documentation and README files for both apps
- Add test suites for mobile and desktop applications
2026-01-11 08:37:28 +01:00
Dries Peeters 4a8607f400 feat: Add major feature updates - integrations, services, and utilities
- Add Google Calendar integration with OAuth 2.0 support
- Implement integration service and workflow engine
- Add new routes: auth, clients, custom_reports, integrations, invoices, team_chat
- Add utility modules: config_manager, email, excel_export, file_upload, permissions_seed
- Add integration view template
- Add Docker permission fixes and enhanced start scripts
- Add migration management utilities and legacy schema migration
- Add validation and version management scripts
- Update setup.py version to 4.9.16

This release significantly expands the application's integration capabilities,
adds new business logic services, and improves infrastructure tooling.
2026-01-09 22:42:53 +01:00
Dries Peeters 98bc9af56b chore: bump version to 4.9.15 2026-01-09 14:16:50 +01:00
Dries Peeters 9a1e770c8c feat(auth): allow users to set initial password during login
Previously, users without a password set were denied login and required administrator intervention. This change allows users to set their initial password directly during the login process if they provide one.

The password is validated (minimum 8 characters) and set before logging the user in. If no password is provided, users are prompted to enter one. This improves the user experience by reducing the need for administrator assistance for password setup.
2026-01-09 14:16:45 +01:00
Dries Peeters a97e6b4537 chore: Bump version to 4.9.14 2026-01-09 11:44:36 +01:00
Dries Peeters 4cd8acbbf1 chore: Update Docker entrypoint scripts for local testing
- Improve entrypoint scripts for local test environments
- Fix entrypoint script issues and enhance reliability
- Update test environment setup and configuration
2026-01-09 11:44:26 +01:00
Dries Peeters 240f07eadf feat: Add configuration, integrations, and route enhancements
- Update application configuration with new settings
- Enhance Google Calendar integration functionality
- Improve expenses and inventory route handlers
- Update API v1 routes with additional endpoints
- Enhance base template with UI improvements
2026-01-09 11:44:02 +01:00
Dries Peeters 4a681f0f48 feat: Enhance invoice and quote management system
- Improve invoice model with additional fields and methods
- Enhance quote model with better validation and relationships
- Add invoice repository for data access layer abstraction
- Update invoice and quote routes with improved functionality
- Add quote service for business logic separation
- Improve quote view and edit templates with better UX
2026-01-09 11:43:51 +01:00
Dries Peeters 4eeaa2a842 feat: Migrate PDF templates to ReportLab JSON format
- Add ReportLab template renderer with JSON-based template system
- Implement template schema validation and helper functions
- Add database migration for template_json columns
- Update visual editor to generate ReportLab JSON alongside HTML/CSS
- Maintain backward compatibility with legacy templates
- Add comprehensive migration documentation

BREAKING CHANGE: Existing PDF templates need to be saved again through
the visual editor to generate the new template_json format. Templates
will continue to work using the legacy fallback generator until saved.
2026-01-09 11:43:42 +01:00
Dries Peeters 9b595f7b55 Version Bump 4.9.13 2026-01-07 20:05:47 +01:00
Dries Peeters 8da7b99f86 docs: add Portainer deployment documentation
- Add comprehensive guide for deploying TimeTracker with Portainer
- Include setup instructions and best practices
2026-01-07 20:04:52 +01:00
Dries Peeters 83a03f9a99 feat: enhance application features and routes
- Improve expenses route with additional functionality
- Enhance admin route with new features
- Update auth route with improved authentication handling
- Extend user model with new capabilities
- Update expenses view template
- Improve config manager utility
2026-01-07 20:04:50 +01:00
Dries Peeters 5406b1c4fb feat: add role migration utility for user role system migration
- Add migrate_user_roles() function for bulk migration
- Add migrate_single_user() function for individual user migration
- Support dry-run mode for testing migrations
- Include comprehensive error handling and statistics reporting
2026-01-07 20:04:48 +01:00
Dries Peeters 1469a565de feat: improve Docker compose setup and HTTPS certificate generation
- Update docker-compose files with improved service configuration
- Add Dockerfile.certgen for automated certificate generation
- Enhance HTTPS auto-setup documentation
- Update Docker compose setup documentation
2026-01-07 20:04:46 +01:00
Dries Peeters 44b5a3ac16 feat: enhance OIDC metadata fetching with DNS resolution strategies
- Add multiple DNS resolution strategies (socket, getaddrinfo, auto)
- Implement IP address caching with TTL for improved performance
- Add retry logic with exponential backoff for metadata fetching
- Support Docker internal service name resolution
- Add connection pooling and optimized HTTP session handling
- Improve error classification and diagnostics
- Add comprehensive OIDC configuration options in config.py
- Update OIDC initialization in app factory with lazy loading support
- Add background metadata refresh scheduling
- Update documentation with troubleshooting guide and setup instructions
2026-01-07 20:04:43 +01:00
Dries Peeters b00d75782f Fix template permissions and setup configuration
- Add permission check for payment gateway edit button
- Fix project view template permission check for budget analysis link
- Update setup.py configuration
2026-01-07 13:19:04 +01:00
Dries Peeters e6ae7dd208 Improve CalDAV integration and integration service
- Enhance CalDAV calendar integration with improved event handling and error management
- Update integration service to support admin override for testing integrations
- Fix integration route handling for per-user vs global integrations
- Improve test_connection method to properly handle admin access and global integrations
2026-01-07 13:18:56 +01:00
Dries Peeters 14d673a4a8 Allow auto-imported time entries without project or client
- Add migration to update check constraint allowing NULL project_id and client_id for source='auto' entries
- Update TimeEntry model validation to allow entries without project/client when source='auto'
- Update TimeEntryCreateSchema to allow entries without project/client when source='auto'
- Enables calendar integrations to import entries that don't have project/client mapping yet
2026-01-07 13:18:40 +01:00
Dries Peeters 1bc4074f6b Fix permission checks and update version to 4.9.11
- Fix has_any_permission() function calls: change from list syntax to argument syntax in base.html, clients/view.html, and projects/view.html
- Add permission checks to navigation menu items: Issues menu now requires view_all_issues or create_issues permission, Payment Gateways requires manage_payment_gateways permission
- Add delete_projects permission to Manager role in permissions_seed.py
- Bump version to 4.9.11
2026-01-07 05:54:38 +01:00
Dries Peeters 7975eeb96d chore: bump version to 4.9.10 2026-01-06 21:51:31 +01:00
Dries Peeters 7322f0e42e feat: add integration setup wizards for all providers
- Add setup wizard system for guided integration configuration
- Create wizard templates for all integration providers:
  * Asana, GitHub, GitLab, Jira, Microsoft Teams
  * Outlook Calendar, QuickBooks, Trello, Xero
- Add wizard_base.html template with common wizard functionality
- Implement setup_wizard route with provider detection
- Update integration list and manage pages with wizard links
- Add has_setup_wizard() helper to check wizard availability
- Create integration_wizard.js for wizard JavaScript functionality
- Improve UX with step-by-step guided setup process
2026-01-06 21:51:22 +01:00
Dries Peeters c844e97741 feat: add OIDC setup wizard with guided configuration
- Add multi-step OIDC setup wizard with progress indicator
- Implement test connection endpoint with DNS and metadata validation
- Add configuration validation endpoint
- Create interactive wizard UI with step-by-step guidance
- Update OIDC debug page to link to setup wizard
- Support testing connection before finalizing configuration
- Add comprehensive error handling and user feedback
2026-01-06 21:51:13 +01:00
Dries Peeters dd666772ac feat: improve OIDC initialization with metadata fetching utility
- Integrate oidc_metadata utility into app initialization
- Use fetch_oidc_metadata() before registering OAuth client
- Add config options for metadata fetch timeout and retry behavior
- Provide better error handling and logging for OIDC setup failures
- Gracefully fall back to Authlib's metadata fetch if utility fails
2026-01-06 21:51:07 +01:00
Dries Peeters 4437488630 feat: add OIDC metadata utility with DNS troubleshooting support
- Add oidc_metadata.py utility module with retry logic and DNS testing
- Implement fetch_oidc_metadata() with exponential backoff retry
- Add test_dns_resolution() for proactive DNS diagnostics
- Create TROUBLESHOOTING_OIDC_DNS.md documentation
- Improves handling of DNS resolution errors in containerized environments
2026-01-06 21:51:02 +01:00
Dries Peeters 2101d5498e feat: Add issue creation and enhance permissions system
- Add issue creation functionality with new route and template
  * Implement new_issue() route with validation and permission checks
  * Create issues/new.html template for issue creation form
  * Add 'Create Issue' button to issues list with permission check

- Enhance inventory stock movement validation
  * Improve devaluation validation with proper error messages
  * Add stock availability checks before devaluation operations
  * Validate devaluation methods (percent/fixed) with proper bounds checking
  * Add better error handling for return and waste movements with devaluation
  * Improve user feedback with specific success messages

- Refine permission system for better granular control
  * Add comprehensive issue permissions (view_all_issues, view_own_issues, create_issues, edit_all_issues, edit_own_issues, delete_issues)
  * Add manage_payment_gateways permission
  * Update payment gateway routes to use manage_payment_gateways instead of admin_access
  * Assign new permissions to appropriate roles (admin, manager)
  * Add permission checks to UI elements (inventory menu, delete project button)

- Fix permission checks in templates
  * Update payment gateway list template to use correct permission
  * Add permission check for project delete button
  * Add permission check for inventory menu visibility
2026-01-06 20:54:56 +01:00
Dries Peeters 7274ce9a1d Version bump 2026-01-05 22:08:50 +01:00
Dries Peeters ad9bfbf1ed Fix client deletion errors and add invoice validation
This commit fixes multiple issues preventing client deletion and adds proper validation to prevent deletion when invoices exist.

Database Schema Fixes:

- Migration 103: Add missing quote_number column to quotes table

  - Handles migration from offer_number to quote_number

  - Generates quote numbers for existing quotes if needed

  - Creates required unique index

- Migration 104: Add all missing columns to quotes table

  - Adds subtotal, tax_amount, visible_to_client columns

  - Adds discount fields (discount_type, discount_amount, discount_reason, coupon_code)

  - Adds payment_terms column

  - Adds approval workflow columns (approval_status, approved_by, approved_at, rejected_by, rejection_reason)

  - Creates required indexes and foreign keys

- Migration 105: Fix client_notifications foreign key cascade

  - Updates client_notifications.client_id FK to ON DELETE CASCADE

  - Updates client_notification_preferences.client_id FK to ON DELETE CASCADE

  - Prevents NOT NULL constraint violations during client deletion

Model Updates:

- Add passive_deletes=True to ClientNotification.client relationship

- Add passive_deletes=True to ClientNotificationPreferences.client relationship

- Add passive_deletes=True to ClientAttachment.client relationship

- Update ClientNote.client relationship to use passive_deletes

Route Updates:

- Add invoice validation to delete_client() and bulk_delete_clients()

- Manually delete notifications before client deletion to prevent SQLAlchemy update issues

Fixes:

- Resolves IntegrityError when deleting clients with notifications

- Resolves missing quote_number column errors

- Resolves missing quotes table columns errors

- Prevents deletion of clients with invoices (data integrity)
2026-01-05 22:07:50 +01:00
Dries Peeters 7f3c8a8819 Fix quotes template 2026-01-05 20:54:59 +01:00
Dries Peeters 596d2815f8 Create 102_add_missing_quotes_template_id.py 2026-01-05 20:50:24 +01:00
Dries Peeters c013adee80 Version Bump 2026-01-05 20:43:17 +01:00
Dries Peeters 6441d060b2 Make default_project_id optional for CalDAV integration
- Remove requirement for default_project_id in CalDAV sync
- Update config schema to mark default_project_id as optional
- Allow importing calendar events without a project assigned
- Update setup form to show project selection as optional
- Remove disabled state from submit button when no projects exist
- Fix number field handling to allow None values for optional fields
- Update sync logic to handle events without project assignment
2026-01-05 20:34:10 +01:00
Dries Peeters 1ae3360b61 Add CalDAV username/password authentication to manage page
- Add CalDAV-specific credential form in manage page (non-OAuth)
- Hide OAuth credentials section for CalDAV provider
- Add update_caldav_credentials action handler
- Allow users to update CalDAV credentials from manage page
- Fixes issue where username/password fields were missing after OAuth migration
2026-01-05 20:34:07 +01:00
Dries Peeters 96f6c19893 Fix admin access to per-user CalDAV integrations
- Add allow_admin_override parameter to get_integration() method
- Allow admins to view, test, and sync per-user integrations
- Fix 'Integration not found' errors for admins accessing CalDAV
- Update all integration routes to pass allow_admin_override flag
2026-01-05 20:34:03 +01:00
Dries Peeters 4ba9d4feb9 chore: bump version to 4.9.7 2026-01-05 19:33:03 +01:00