mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-04-30 01:09:42 -05:00
8322c73ddcda3e2f50f25c9cdfd6e53b83eef1aa
26 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a94e928509 |
feat: Add support for multiple PDF template page sizes
Add the ability to create and manage PDF invoice templates for different page sizes (A4, Letter, Legal, A3, A5, Tabloid) with independent templates for each size. Features: - Database migration to create invoice_pdf_templates table with page_size column and default templates for all supported sizes - New InvoicePDFTemplate model with helper methods for template management - Page size selector dropdown in canvas editor with dynamic canvas resizing - Size selection in invoice export view - Each page size maintains its own template (HTML, CSS, design JSON) - Preview functionality converted to full-screen modal popup PDF Generation: - Updated InvoicePDFGenerator to accept page_size parameter - Dynamic @page rule updates in CSS based on selected size - Removed conflicting @page rules from HTML inline styles when separate CSS exists - Template content preserved exactly as saved (no whitespace stripping) - Fallback logic: size-specific template → legacy Settings template → default UI/UX Improvements: - Styled page size selector to match app theme with dark mode support - Fixed canvas editor header styling and readability - Canvas correctly resizes when switching between page sizes - Unsaved changes confirmation uses app's standard modal - All editor controls properly styled for dark/light mode - Preview opens in modal instead of small side window Bug Fixes: - Fixed migration KeyError by correcting down_revision reference - Fixed DatatypeMismatch error by using boolean TRUE instead of integer - Fixed template content mismatch (logo positions) by preserving HTML - Fixed page size not being applied by ensuring @page rules are updated - Fixed f-string syntax error in _generate_css by using .format() instead - Fixed debug_print scope issue in _render_from_custom_template Debugging: - Added comprehensive debug logging to PDF generation flow - Debug output visible in Docker console for troubleshooting - Logs template retrieval, @page size updates, and final CSS content Files Changed: - migrations/versions/041_add_invoice_pdf_templates_table.py (new) - app/models/invoice_pdf_template.py (new) - app/models/__init__.py (register new model) - app/routes/admin.py (template management by size) - app/routes/invoices.py (page size parameter, debug logging) - app/utils/pdf_generator.py (page size support, debug logging) - templates/admin/pdf_layout.html (size selector, canvas resizing, modal) - app/templates/invoices/view.html (size selector for export) |
||
|
|
12d3b9fb1b |
feat: Add comprehensive Import/Export system and standardize UI headers
## New Features
### Import/Export System
- Add DataImport and DataExport models for tracking operations
- Implement CSV import for bulk time entry data
- Add support for importing from Toggl and Harvest (placeholder)
- Implement GDPR-compliant full data export (JSON format)
- Add filtered export functionality with date/project filters
- Create backup/restore functionality for database migrations
- Build migration wizard UI for seamless data transitions
- Add comprehensive test coverage (unit and integration tests)
- Create user documentation (IMPORT_EXPORT_GUIDE.md)
### Database Changes
- Add migration 040: Create data_imports and data_exports tables
- Track import/export operations with status, logs, and file paths
- Support automatic file expiration for temporary downloads
## UI/UX Improvements
### Navigation Menu Restructure
- Rename "Work" to "Time Tracking" for clarity
- Rename "Finance" to "Finance & Expenses"
- Add "Tools & Data" submenu with Import/Export and Saved Filters
- Reorganize Time Tracking submenu: prioritize Log Time, add icons to all items
- Expand Finance submenu: add Mileage, Per Diem, and Budget Alerts
- Add icons to all Admin submenu items for better visual scanning
- Fix Weekly Goals not keeping Time Tracking menu open
### Standardized Page Headers
Apply consistent page_header macro across 26+ pages:
- **Time Tracking**: Tasks, Projects, Clients, Kanban, Weekly Goals, Templates, Manual Entry
- **Finance**: Invoices, Payments, Expenses, Mileage, Per Diem, Budget Alerts, Reports
- **Admin**: Dashboard, Users, Roles, Permissions, Settings, API Tokens, Backups, System Info, OIDC
- **Tools**: Import/Export, Saved Filters, Calendar
- **Analytics**: Dashboard
Each page now includes:
- Descriptive icon (Font Awesome)
- Clear title and subtitle
- Breadcrumb navigation
- Consistent action button placement
- Responsive design with dark mode support
## Bug Fixes
### Routing Errors
- Fix endpoint name: `per_diem.list_per_diems` → `per_diem.list_per_diem`
- Fix endpoint name: `reports.index` → `reports.reports`
- Fix endpoint name: `timer.timer` → `timer.manual_entry`
- Add missing route registration for import_export blueprint
### User Experience
- Remove duplicate "Test Configuration" button from OIDC debug page
- Clean up user dropdown menu (remove redundant Import/Export link)
- Improve menu item naming ("Profile" → "My Profile", "Settings" → "My Settings")
## Technical Details
### New Files
- `app/models/import_export.py` - Import/Export models
- `app/utils/data_import.py` - Import business logic
- `app/utils/data_export.py` - Export business logic
- `app/routes/import_export.py` - API endpoints
- `app/templates/import_export/index.html` - User interface
- `tests/test_import_export.py` - Integration tests
- `tests/models/test_import_export_models.py` - Model tests
- `docs/IMPORT_EXPORT_GUIDE.md` - User documentation
- `docs/import_export/README.md` - Quick reference
- `migrations/versions/040_add_import_export_tables.py` - Database migration
### Modified Files
- `app/__init__.py` - Register import_export blueprint
- `app/models/__init__.py` - Export new models
- `app/templates/base.html` - Restructure navigation menu
- 26+ template files - Standardize headers with page_header macro
## Breaking Changes
None. All changes are backward compatible.
## Testing
- All existing tests pass
- New test coverage for import/export functionality
- Manual testing of navigation menu changes
- Verified consistent UI across all updated pages
|
||
|
|
755faa22c3 |
feat: Add Budget Alerts & Forecasting system with modern UI
Implement comprehensive budget monitoring and forecasting feature with: Database & Models: - Add BudgetAlert model for tracking project budget alerts - Create migration 039_add_budget_alerts_table with proper indexes - Support alert types: 80_percent, 100_percent, over_budget - Add acknowledgment tracking with user and timestamp Budget Forecasting Utilities: - Implement burn rate calculation (daily/weekly/monthly) - Add completion date estimation based on burn rate - Create resource allocation analysis per team member - Build cost trend analysis with configurable granularity - Add automatic budget alert detection with deduplication Routes & API: - Create budget_alerts blueprint with dashboard and detail views - Add API endpoints for burn rate, completion estimates, and trends - Implement resource allocation and cost trend API endpoints - Add alert acknowledgment and manual budget check endpoints - Fix log_event() calls to use keyword arguments UI Templates: - Design modern budget dashboard with Tailwind CSS - Create detailed project budget analysis page with charts - Add gradient stat cards with color-coded status indicators - Implement responsive layouts with full dark mode support - Add smooth animations and toast notifications - Integrate Chart.js for cost trend visualization Project Integration: - Add Budget Alerts link to Finance navigation menu - Enhance project view page with budget overview card - Show budget progress bars with status indicators - Add Budget Analysis button to project header and dashboard - Display real-time budget status with color-coded badges Visual Enhancements: - Use gradient backgrounds for stat cards (blue/green/yellow/red) - Add status badges with icons (healthy/warning/critical/over) - Implement smooth progress bars with embedded percentages - Support responsive grid layouts for all screen sizes - Ensure proper type conversion (Decimal to float) in templates Scheduled Tasks: - Register budget alert checking job (runs every 6 hours) - Integrate with existing APScheduler tasks - Add logging for alert creation and monitoring This feature provides project managers with real-time budget insights, predictive analytics, and proactive alerts to prevent budget overruns. |
||
|
|
b353184a4f |
feat: implement advanced expense management with templates and navigation
Implement complete Advanced Expense Management feature set with UI templates, database schema fixes, and reorganized navigation structure. Features: - Expense Categories: Full CRUD with budget tracking and visualization - Mileage Tracking: Vehicle mileage entries with approval workflow - Per Diem Management: Daily allowance claims with location-based rates - Receipt OCR: Infrastructure for receipt scanning (utilities ready) Database: - Migration 037: Create expense_categories, mileage, per_diem_rates, per_diems tables - Migration 038: Fix schema column name mismatches (trip_purpose→purpose, etc.) - Add missing columns (description, odometer, rates, reimbursement tracking) - Fix circular foreign key dependencies Templates (11 new files): - expense_categories/: list, form, view - mileage/: list, form, view - per_diem/: list, form, view, rates_list, rate_form Navigation: - Move Mileage and Per Diem to Expenses sub-pages (header buttons) - Move Expense Categories to Admin menu only - Remove expense management items from Finance menu Fixes: - Fix NoneType comparison error in expense categories utilization - Handle None values safely in budget progress bars - Resolve database column name mismatches UI/UX: - Responsive design with Tailwind CSS and dark mode support - Real-time calculations for mileage amounts - Color-coded budget utilization progress bars - Status badges for approval workflow states - Advanced filtering on all list views Default data: - 7 expense categories (Travel, Meals, Accommodation, etc.) - 4 per diem rates (US, GB, DE, FR) |
||
|
|
154f9b37a6 |
feat: integrate calendar feature with tasks and time entries display
Refactored the existing calendar API endpoint to properly display calendar
events, tasks, and time entries with distinct visual representations.
Changes:
- Updated /api/calendar/events endpoint in api.py to use new
CalendarEvent.get_events_in_range() method that fetches all three item types
- Fixed user_id bug where it was defaulting to None instead of current_user.id
- Modified API response format to include all items in unified 'events' array
with item_type field ('event', 'task', 'time_entry') for differentiation
- Updated calendar.js to parse unified response format and filter items by type
- Added visual distinctions:
* Tasks: 📋 emoji, orange (#f59e0b) color, clickable
* Time entries: ⏱ emoji, project-based colors, non-clickable
* Calendar events: 📅 emoji, custom colors, clickable
- Fixed task detail route from /tasks/view/{id} to /tasks/{id}
- Updated all calendar view renderers (month, week, day) to use correct
data structure with extendedProps
- Added cache-busting to calendar.js (v7) and calendar.css (v2)
- Preserved backward compatibility with existing calendar filtering
(project_id, task_id, tags)
The calendar now correctly displays all time tracking data in a unified view
with proper visual hierarchy and interaction patterns.
Fixes: Calendar not showing tasks and time entries
Related: Calendar/Agenda Support feature implementation
|
||
|
|
a1aaee6afd |
feat: Redesign and enhance backup restore functionality with dual restore methods
Major improvements to the backup restore system with a complete UI overhaul and enhanced functionality: UI/UX Improvements: - Complete redesign of restore page with modern Tailwind CSS - Added prominent warning banners and danger badges to prevent accidental data loss - Implemented drag-and-drop file upload with visual feedback - Added real-time progress tracking with auto-refresh every 2 seconds - Added comprehensive safety information sidebar with checklists - Full dark mode support throughout restore interface - Enhanced confirmation flows with checkbox and modal confirmations Functionality Enhancements: - Added dual restore methods: upload new backup or restore from existing server backups - Enhanced restore route to accept optional filename parameter for existing backups - Added "Restore" button to each backup in the backups management page - Implemented restore confirmation modal with critical warnings - Added loading states and button disabling during restore operations - Improved error handling and user feedback Backend Changes: - Enhanced admin.restore() to support both file upload and existing backup restore - Added dual route support: /admin/restore and /admin/restore/<filename> - Added shutil import for file copy operations during restore - Improved security with secure_filename validation and file type checking - Maintained existing rate limiting (3 requests per minute) Frontend Improvements: - Added interactive JavaScript for file selection, drag-and-drop, and modal management - Implemented auto-refresh during restore process to show live progress - Added escape key support for closing modals - Enhanced user feedback with file name display and button states Safety Features: - Pre-restore checklist with 5 verification steps - Multiple warning levels throughout the flow - Confirmation checkbox required before upload restore - Modal confirmation required before existing backup restore - Clear documentation of what gets restored and post-restore steps Dependencies: - Updated flask-swagger-ui from 4.11.1 to 5.21.0 Files modified: - app/templates/admin/restore.html (complete rewrite) - app/templates/admin/backups.html (added restore functionality) - app/routes/admin.py (enhanced restore route) - requirements.txt (updated flask-swagger-ui version) - RESTORE_BACKUP_IMPROVEMENTS.md (documentation) This provides a significantly improved user experience for the restore process while maintaining security and adding powerful new restore capabilities. |
||
|
|
944b69a7fc |
feat: implement full permission enforcement and enhanced UI visibility
BREAKING CHANGE: Permission system now actively enforced across all routes ## Summary Complete implementation of advanced role-based access control (RBAC) system with full route protection, UI conditionals, and enhanced management interface. ## Route Protection - Updated all admin routes to use @admin_or_permission_required decorator - Replaced inline admin checks with granular permission checks in: * Admin routes: user management, settings, backups, telemetry, OIDC * Project routes: create, edit, delete, archive, bulk operations * Client routes: create, edit, delete, archive, bulk operations - Maintained backward compatibility with existing @admin_required decorator ## UI Permission Integration - Added template helpers (has_permission, has_any_permission) to all templates - Navigation conditionally shows admin/OIDC links based on permissions - Action buttons (Edit, Delete, Archive) conditional on user permissions - Project and client pages respect permission requirements - Create buttons visible only with appropriate permissions ## Enhanced Roles & Permissions UI - Added statistics dashboard showing: * Total roles, system roles, custom roles, assigned users - Implemented expandable permission details in roles list * Click to view all permissions grouped by category * Visual checkmarks for assigned permissions - Enhanced user list with role visibility: * Shows all assigned roles as color-coded badges * Blue badges for system roles, gray for custom roles * Yellow badges for legacy roles with migration prompt * Merged legacy role column into unified "Roles & Permissions" - User count per role now clickable and accurate ## Security Improvements - Added CSRF tokens to all new permission system forms: * Role creation/edit form * Role deletion form * User role assignment form - All POST requests now protected against CSRF attacks ## Technical Details - Fixed SQLAlchemy relationship query issues (AppenderQuery) - Proper use of .count() for relationship aggregation - Jinja2 namespace for accumulating counts in templates - Responsive grid layouts for statistics and permission cards ## Documentation - Created comprehensive implementation guides - Added permission enforcement documentation - Documented UI enhancements and features - Included CSRF protection review ## Impact - Permissions are now actively enforced, not just defined - Admins can easily see who has what access - Clear visual indicators of permission assignments - Secure forms with CSRF protection - Production-ready permission system |
||
|
|
a02fec04c8 |
feat: Add comprehensive expense tracking system
Implement a complete expense tracking feature that allows users to record, manage, approve, and track business expenses with full integration into existing project management and invoicing systems. Features: - Create and manage expenses with detailed information (amount, category, vendor, receipts, tax tracking) - Multi-currency support (EUR, USD, GBP, CHF) - Approval workflow with admin oversight (pending → approved → rejected) - Reimbursement tracking and status management - Billable expense flagging for client invoicing - Receipt file upload and attachment - Project and client association with auto-client selection - Tag-based organization and advanced filtering - CSV export functionality - Analytics dashboard with category breakdowns - API endpoints for programmatic access Database Changes: - Add expenses table with comprehensive schema - Create Alembic migration (029_add_expenses_table.py) - Add composite indexes for query performance - Implement proper foreign key constraints and cascading Routes & Templates: - Add expenses blueprint with 14 endpoints (CRUD, approval, export, API) - Create 4 responsive templates (list, form, view, dashboard) - Implement advanced filtering (status, category, project, client, date range) - Add permission-based access control (user vs admin) - Integrate receipt file upload handling User Experience: - Add "Expenses" to Insights navigation menu - Auto-populate client when project is selected - Provide visual feedback for auto-selections - Display summary statistics and analytics - Implement pagination and search functionality Testing & Documentation: - Add 40+ comprehensive tests covering models, methods, and workflows - Create complete user documentation (docs/EXPENSE_TRACKING.md) - Add API documentation and examples - Include troubleshooting guide and best practices Integration: - Link expenses to projects for cost tracking - Associate with clients for billing purposes - Connect billable expenses to invoicing system - Add PostHog event tracking for analytics - Implement structured logging for audit trail Security: - Role-based access control (users see only their expenses) - Admin-only approval and reimbursement actions - CSRF protection and file upload validation - Proper permission checks on all operations This implementation follows existing codebase patterns and includes full test coverage, documentation, and database migrations per project standards. |
||
|
|
d530ce48b0 |
feat: Add Weekly Time Goals feature for tracking weekly hour targets
Implemented a comprehensive Weekly Time Goals system that allows users to set and track weekly hour targets with real-time progress monitoring. Features: - WeeklyTimeGoal model with status tracking (active, completed, failed, cancelled) - Full CRUD interface for managing weekly goals - Real-time progress calculation based on logged time entries - Dashboard widget showing current week's goal progress - Daily breakdown view with detailed statistics - Automatic status updates based on goal completion and week end - API endpoints for goal data and progress tracking Technical changes: - Added app/models/weekly_time_goal.py with local timezone support - Created migration 027_add_weekly_time_goals.py for database schema - Added app/routes/weekly_goals.py blueprint with all CRUD routes - Created templates: index.html, create.html, edit.html, view.html - Integrated weekly goal widget into main dashboard - Added "Weekly Goals" navigation item to sidebar - Implemented comprehensive test suite in tests/test_weekly_goals.py - Added feature documentation in docs/WEEKLY_TIME_GOALS.md Bug fixes: - Fixed timezone handling to use TZ environment variable instead of Config.TIMEZONE - Corrected log_event() calls to use proper signature (event name as first positional argument) - Manually created database table via SQL when Alembic migration didn't execute Database schema: - weekly_time_goals table with user_id, target_hours, week_start_date, week_end_date, status, notes - Indexes on user_id, week_start_date, status, and composite (user_id, week_start_date) - Foreign key constraint to users table with CASCADE delete The feature supports flexible week start days per user, calculates remaining hours, provides daily average targets, and automatically updates goal status based on progress. |
||
|
|
935f30e4d6 |
feat: Add Client Notes feature for internal client tracking
Implement comprehensive client notes system allowing users to add internal notes about clients that are never visible to clients themselves. Notes support importance flagging, full CRUD operations, and proper access controls. Key Changes: - Add ClientNote model with user/client relationships - Create Alembic migration (025) for client_notes table - Implement full REST API with 9 endpoints - Add client_notes blueprint with CRUD routes - Create UI templates (edit page + notes section on client view) - Add importance toggle with AJAX functionality - Implement permission system (users edit own, admins edit all) Features: - Internal-only notes with rich text support - Mark notes as important for quick identification - Author tracking with timestamps - Cascade delete when client is removed - Mobile-responsive design - i18n support for all user-facing text Testing: - 24 comprehensive model tests - 23 route/integration tests - Full coverage of CRUD operations and permissions Documentation: - Complete feature guide in docs/CLIENT_NOTES_FEATURE.md - API documentation with examples - Troubleshooting section - Updated main docs index Database: - Migration revision 025 (depends on 024) - Fixed PostgreSQL boolean default value issue - 4 indexes for query performance - CASCADE delete constraint on client_id This feature addresses the need for teams to track important information about clients internally without exposing sensitive notes to client-facing interfaces or documents. |
||
|
|
18d9808d5e |
feat: add user favorite projects functionality with CSV export enhancements
Features: Add favorite projects feature allowing users to star/bookmark frequently used projects New UserFavoriteProject association model with user-project relationships Star icons in project list for one-click favorite toggling via AJAX Filter to display only favorite projects Per-user favorites with proper isolation and cascade delete behavior Activity logging for favorite/unfavorite actions Database: Add user_favorite_projects table with migration (023_add_user_favorite_projects.py) Foreign keys to users and projects with CASCADE delete Unique constraint preventing duplicate favorites Indexes on user_id and project_id for query optimization Models: User model: Add favorite_projects relationship with helper methods add_favorite_project() - add project to favorites remove_favorite_project() - remove from favorites is_project_favorite() - check favorite status get_favorite_projects() - retrieve favorites with status filter Project model: Add is_favorited_by() method and include favorite status in to_dict() Export UserFavoriteProject model in app/models/__init__.py Routes: Add /projects/<id>/favorite POST endpoint to favorite a project Add /projects/<id>/unfavorite POST endpoint to unfavorite a project Update /projects GET route to support favorites=true query parameter Fix status filtering to work correctly with favorites JOIN query Add /reports/export/form GET endpoint for enhanced CSV export form Templates: Update projects/list.html: Add favorites filter dropdown to filter form (5-column grid) Add star icon column with Font Awesome icons (filled/unfilled) Add JavaScript toggleFavorite() function for AJAX favorite toggling Improve hover states and transitions for better UX Pass favorite_project_ids and favorites_only to template Update reports/index.html: Update CSV export link to point to new export form Add icon and improve hover styling Reports: Enhance CSV export functionality with dedicated form page Add filter options for users, projects, clients, and date ranges Set default date range to last 30 days Import Client model and or_ operator for advanced filtering Testing: Comprehensive test suite in tests/test_favorite_projects.py (550+ lines) Model tests for UserFavoriteProject creation and validation User/Project method tests for favorite operations Route tests for favorite/unfavorite endpoints Filtering tests for favorites-only view Relationship tests for cascade delete behavior Smoke tests for complete workflows Coverage for edge cases and error handling Documentation: Add comprehensive feature documentation in docs/FAVORITE_PROJECTS_FEATURE.md User guide with step-by-step instructions Technical implementation details API documentation for new endpoints Migration guide and troubleshooting Performance and security considerations Template Cleanup: Remove duplicate templates from root templates/ directory Admin templates (dashboard, users, settings, OIDC debug, etc.) Client CRUD templates Error page templates Invoice templates Project templates Report templates Timer templates All templates now properly located in app/templates/ Breaking Changes: None - fully backward compatible Migration Required: Run alembic upgrade head to create user_favorite_projects table |
||
|
|
b1973ca49a |
feat: Add Quick Wins feature set - activity tracking, templates, and user preferences
This commit introduces several high-impact features to improve user experience and productivity: New Features: - Activity Logging: Comprehensive audit trail tracking user actions across the system with Activity model, including IP address and user agent tracking - Time Entry Templates: Reusable templates for frequently logged activities with usage tracking and quick-start functionality - Saved Filters: Save and reuse common search/filter combinations across different views (projects, tasks, reports) - User Preferences: Enhanced user settings including email notifications, timezone, date/time formats, week start day, and theme preferences - Excel Export: Generate formatted Excel exports for time entries and reports with styling and proper formatting - Email Notifications: Complete email system for task assignments, overdue invoices, comments, and weekly summaries with HTML templates - Scheduled Tasks: Background task scheduler for periodic operations Models Added: - Activity: Tracks all user actions with detailed context and metadata - TimeEntryTemplate: Stores reusable time entry configurations - SavedFilter: Manages user-saved filter configurations Routes Added: - user.py: User profile and settings management - saved_filters.py: CRUD operations for saved filters - time_entry_templates.py: Template management endpoints UI Enhancements: - Bulk actions widget component - Keyboard shortcuts help modal with advanced shortcuts - Save filter widget component - Email notification templates - User profile and settings pages - Saved filters management interface - Time entry templates interface Database Changes: - Migration 022: Creates activities and time_entry_templates tables - Adds user preference columns (notifications, timezone, date/time formats) - Proper indexes for query optimization Backend Updates: - Enhanced keyboard shortcuts system (commands.js, keyboard-shortcuts-advanced.js) - Updated projects, reports, and tasks routes with activity logging - Safe database commit utilities integration - Event tracking for analytics Dependencies: - Added openpyxl for Excel generation - Added Flask-Mail dependencies - Updated requirements.txt All new features include proper error handling, activity logging integration, and maintain existing functionality while adding new capabilities. |
||
|
|
34946e1b80 |
feat: Make user profile pictures persistent across Docker updates
Store user avatars in persistent /data volume instead of application directory to ensure profile pictures survive container rebuilds and version updates. Changes: - Update avatar upload folder from app/static/uploads/avatars to /data/uploads/avatars using existing app_data volume mount - Modify get_avatar_upload_folder() in auth routes to use persistent location with UPLOAD_FOLDER config - Update User.get_avatar_path() to reference new storage location - Add migration script to safely move existing avatars to new location - Preserve backward compatibility - no database changes required Benefits: - Profile pictures now persist between Docker image updates - Consistent with company logo storage pattern (/data/uploads) - Better user experience - avatars not lost during upgrades - Production-ready data/code separation - All persistent uploads consolidated in app_data volume Migration: For existing installations with user avatars, run: docker-compose run --rm app python /app/docker/migrate-avatar-storage.py New installations work automatically with no action required. Documentation: - docs/AVATAR_STORAGE_MIGRATION.md - Full migration guide - docs/AVATAR_PERSISTENCE_SUMMARY.md - Quick reference - docs/TEST_AVATAR_PERSISTENCE.md - Testing guide - AVATAR_PERSISTENCE_CHANGELOG.md - Detailed changelog Files modified: - app/routes/auth.py - app/models/user.py Files added: - docker/migrate-avatar-storage.py - docs/AVATAR_STORAGE_MIGRATION.md - docs/AVATAR_PERSISTENCE_SUMMARY.md - docs/TEST_AVATAR_PERSISTENCE.md - AVATAR_PERSISTENCE_CHANGELOG.md Tested: ✓ No linter errors, backward compatible, volume mount verified |
||
|
|
20824dbcb1 |
feat: Add customizable Kanban board columns and enhance CSRF configuration
This commit introduces a comprehensive Kanban board customization system and improves CSRF token configuration for Docker deployments. ## Major Features ### 1. Customizable Kanban Board Columns Add complete kanban column customization system allowing users to define custom workflow states beyond the default columns. **New Components:** - Add KanbanColumn model with full CRUD operations (app/models/kanban_column.py) - Add kanban routes blueprint with admin endpoints (app/routes/kanban.py) - Add kanban column management templates (app/templates/kanban/) - Add migration 019 for kanban_columns table (migrations/) **Features:** - Create unlimited custom columns with unique keys, labels, icons, and colors - Drag-and-drop column reordering with position persistence - Toggle column visibility without deletion - Protected system columns (todo, in_progress, done) prevent accidental deletion - Complete state marking for columns that should mark tasks as done - Real-time updates via SocketIO broadcasts when columns change - Font Awesome icon support (5000+ icons) - Bootstrap color scheme integration - Comprehensive validation and error handling **Integration:** - Update Task model to work with dynamic column statuses (app/models/task.py) - Update task routes to use kanban column API (app/routes/tasks.py) - Update project routes to fetch active columns (app/routes/projects.py) - Add kanban column management links to base template (app/templates/base.html) - Update kanban board templates to render dynamic columns (app/templates/tasks/) - Add cache prevention headers to force fresh column data **API Endpoints:** - GET /api/kanban/columns - Fetch all active columns - POST /api/kanban/columns/reorder - Reorder columns - GET /kanban/columns - Column management interface (admin only) - POST /kanban/columns/create - Create new column (admin only) - POST /kanban/columns/<id>/edit - Edit column (admin only) - POST /kanban/columns/<id>/delete - Delete column (admin only) - POST /kanban/columns/<id>/toggle - Toggle column visibility (admin only) ### 2. Enhanced CSRF Configuration Improve CSRF token configuration and documentation for Docker deployments. **Configuration Updates:** - Add WTF_CSRF_ENABLED environment variable to all docker-compose files - Add WTF_CSRF_TIME_LIMIT environment variable with 1-hour default - Update app/config.py to read CSRF settings from environment - Add SECRET_KEY validation in app/__init__.py to prevent production deployment with default keys **Docker Compose Updates:** - docker-compose.yml: CSRF enabled by default for security testing - docker-compose.remote.yml: CSRF always enabled in production - docker-compose.remote-dev.yml: CSRF enabled with production-like settings - docker-compose.local-test.yml: CSRF can be disabled for local testing - Add helpful comments explaining each CSRF-related environment variable - Update env.example with CSRF configuration examples **Verification Scripts:** - Add scripts/verify_csrf_config.sh for Unix systems - Add scripts/verify_csrf_config.bat for Windows systems - Scripts check SECRET_KEY, CSRF_ENABLED, and CSRF_TIME_LIMIT settings ### 3. Database Initialization Improvements - Update app/__init__.py to run pending migrations on startup - Add automatic kanban column initialization after migrations - Improve error handling and logging during database setup ### 4. Configuration Management - Update app/config.py with new CSRF and kanban-related settings - Add environment variable parsing with sensible defaults - Improve configuration validation and error messages ## Documentation ### New Documentation Files - CUSTOM_KANBAN_README.md: Quick start guide for kanban customization - KANBAN_CUSTOMIZATION.md: Detailed technical documentation - IMPLEMENTATION_SUMMARY.md: Implementation details and architecture - KANBAN_AUTO_REFRESH_COMPLETE.md: Real-time update system documentation - KANBAN_REFRESH_FINAL_FIX.md: Cache and refresh troubleshooting - KANBAN_REFRESH_SOLUTION.md: Technical solution for data freshness - docs/CSRF_CONFIGURATION.md: Comprehensive CSRF setup guide - CSRF_DOCKER_CONFIGURATION_SUMMARY.md: Docker-specific CSRF setup - CSRF_TROUBLESHOOTING.md: Common CSRF issues and solutions - APPLY_KANBAN_MIGRATION.md: Migration application guide - APPLY_FIXES_NOW.md: Quick fix reference - DEBUG_KANBAN_COLUMNS.md: Debugging guide - DIAGNOSIS_STEPS.md: System diagnosis procedures - BROWSER_CACHE_FIX.md: Browser cache troubleshooting - FORCE_NO_CACHE_FIX.md: Cache prevention solutions - SESSION_CLOSE_ERROR_FIX.md: Session handling fixes - QUICK_FIX.md: Quick reference for common fixes ### Updated Documentation - README.md: Add kanban customization feature description - Update project documentation with new features ## Testing ### New Test Files - test_kanban_refresh.py: Test kanban column refresh functionality ## Technical Details **Database Changes:** - New table: kanban_columns with 11 columns - Indexes on: key, position - Default data: 4 system columns (todo, in_progress, review, done) - Support for both SQLite (development) and PostgreSQL (production) **Real-Time Updates:** - SocketIO events: 'kanban_columns_updated' with action type - Automatic page refresh when columns are created/updated/deleted/reordered - Prevents stale data by expiring SQLAlchemy caches after changes **Security:** - Admin-only access to column management - CSRF protection on all column mutation endpoints - API endpoints exempt from CSRF (use JSON and other auth mechanisms) - System column protection prevents data integrity issues - Validation prevents deletion of columns with active tasks **Performance:** - Efficient querying with position-based ordering - Cached column data with cache invalidation on changes - No-cache headers on API responses to prevent stale data - Optimized database indexes for fast lookups ## Breaking Changes None. This is a fully backward-compatible addition. Existing workflows continue to work with the default columns. Custom columns are opt-in via the admin interface. ## Migration Notes 1. Run migration 019 to create kanban_columns table 2. Default columns are initialized automatically on first run 3. No data migration needed for existing tasks 4. Existing task statuses map to new column keys ## Environment Variables New environment variables (all optional with defaults): - WTF_CSRF_ENABLED: Enable/disable CSRF protection (default: true) - WTF_CSRF_TIME_LIMIT: CSRF token expiration in seconds (default: 3600) - SECRET_KEY: Required in production, must be cryptographically secure See env.example for complete configuration reference. ## Deployment Notes |
||
|
|
113a57d2eb | testing updates | ||
|
|
77aec94b86 |
feat: Add project costs tracking and remove license server integration
Major Features: - Add project costs feature with full CRUD operations - Implement toast notification system for better user feedback - Enhance analytics dashboard with improved visualizations - Add OIDC authentication improvements and debug tools Improvements: - Enhance reports with new filtering and export capabilities - Update command palette with additional shortcuts - Improve mobile responsiveness across all pages - Refactor UI components for consistency Removals: - Remove license server integration and related dependencies - Clean up unused license-related templates and utilities Technical Changes: - Add new migration 018 for project_costs table - Update models: Project, Settings, User with new relationships - Refactor routes: admin, analytics, auth, invoices, projects, reports - Update static assets: CSS improvements, new JS modules - Enhance templates: analytics, admin, projects, reports Documentation: - Add comprehensive documentation for project costs feature - Document toast notification system with visual guides - Update README with new feature descriptions - Add migration instructions and quick start guides - Document OIDC improvements and Kanban enhancements Files Changed: - Modified: 56 files (core app, models, routes, templates, static assets) - Deleted: 6 files (license server integration) - Added: 28 files (new features, documentation, migrations) |
||
|
|
0749b0adf9 | reset to previous commit. | ||
|
|
3b564f83d7 |
feat: Remove license server and add multi-tenant SaaS infrastructure
BREAKING CHANGE: Removed legacy license server in favor of Stripe billing Major changes: - Remove license server system (563 lines removed from license_server.py) - Add multi-tenant support with organizations and memberships - Integrate Stripe billing and subscription management - Enhance authentication with 2FA, password reset, and JWT tokens - Add provisioning and onboarding flows for new customers - Implement row-level security (RLS) for data isolation - Add GDPR compliance features and data retention policies - Enhance admin dashboard with billing reconciliation and customer management - Add security scanning tools (Bandit, Gitleaks, GitHub Actions workflow) - Implement rate limiting and enhanced password policies - Update all routes to support organization context - Enhance user model with billing and security fields - Add promo code system for marketing campaigns - Update Docker initialization for better database setup Modified files: - Core: app.py, app/__init__.py, app/config.py - Models: Enhanced user model (+175 lines), updated all models for multi-tenancy - Routes: Enhanced admin routes (+479 lines), updated all routes for org context - Templates: Updated login, admin dashboard, and settings - Docker: Enhanced database initialization scripts - Dependencies: Added stripe, pyotp, pyjwt, and security packages Deleted files: - app/utils/license_server.py - docs/LICENSE_SERVER_*.md (3 files) - templates/admin/license_status.html - test_license_server.py New features: - Organizations and membership management - Stripe billing integration with webhook handling - Enhanced authentication (2FA, password reset, refresh tokens) - GDPR compliance and data export/deletion - Onboarding checklist for new customers - Promo code system - Security enhancements (rate limiting, password policies) - Admin tools for customer and billing management Net change: 46 files changed, 1490 insertions(+), 1968 deletions(-) |
||
|
|
db82068dfd |
feat(reporting,invoices): scaffold reporting + invoicing extensions
- Add data models: - Reporting: SavedReportView, ReportEmailSchedule - Currency/FX: Currency, ExchangeRate - Tax: TaxRule (flexible rules with date ranges; client/project scoping) - Invoices: InvoiceTemplate, Payment, CreditNote, InvoiceReminderSchedule - Extend Invoice: - Add currency_code and template_id - Add relationships: payments, credits, reminder_schedules - Compute outstanding by subtracting credits; helper to apply matching TaxRule - Register new models in app/models/__init__.py - DB: add Alembic migration 017 to create new tables and alter invoices Notes: - Requires database migration (alembic upgrade head). - Follow-ups: FX fetching + scheduler, report builder UI/CRUD, utilization dashboard, email schedules/reminders, invoice themes in UI, partial payments and credit notes in routes/templates |
||
|
|
b6c0a79ffc |
feat: Focus mode, estimates/burndown+budget alerts, recurring blocks, saved filters, and rate overrides
Add Pomodoro focus mode with session summaries Model: FocusSession; API: /api/focus-sessions/; UI: Focus modal on timer page Add estimates vs actuals with burndown and budget alerts Project fields: estimated_hours, budget_amount, budget_threshold_percent API: /api/projects/<id>/burndown; Charts in project view and project report Implement recurring time blocks/templates Model: RecurringBlock; API CRUD: /api/recurring-blocks; CLI: flask generate_recurring Add tagging and saved filters across views Model: SavedFilter; /api/entries supports tag and saved_filter_id Support billable rate overrides per project/member Model: RateOverride; invoicing uses effective rate resolution Also: Migration: 016_add_focus_recurring_rates_filters_and_project_budget.py Integrations and UI updates in projects view, timer page, and reports Docs updated (startup, invoice, task mgmt) and README feature list Added basic tests for new features |
||
|
|
e385abf016 |
feat: Add Enhanced Comments System for projects and tasks
- Add Comment model with threaded replies and user attribution - Create Alembic migration (013_add_comments_table.py) for database schema - Implement complete CRUD operations via comments routes - Add responsive UI with inline editing and real-time interactions - Include permission system (users edit own, admins manage all) - Support soft delete for comments with replies to preserve structure - Add comprehensive CSS styling with dark theme support - Integrate comments sections into project and task detail views - Fix modal z-index and context issues for delete confirmations - Update README with detailed feature documentation Technical details: - Threaded comment structure with parent-child relationships - API endpoints for comment operations and retrieval - Mobile-responsive design with touch-friendly interactions - Internationalization support via Flask-Babel - Bootstrap 5 modal integration with proper event handling |
||
|
|
c297f1503b |
feat(tasks): add activity log, Markdown editor, and dark-mode polish
Backend - Add TaskActivity model to record start/pause/review/complete/cancel/reopen - Preserve started_at when reopening tasks; keep timestamps in app-local time - Expose recent activities on task detail view Migrations - Add 004_add_task_activities_table (FKs + indexes) Task detail (UI) - Move Description into its own card and render as Markdown (markdown + bleach) - Restyle Quick Actions to use dashboard btn-action styles - Add custom confirmation modal + tooltips - Recent Time Entries: use dashboard action buttons, add progressive “Show more/less” (10 per click) Tasks list - Fix dark mode for filter UI (inputs, selects, input-group-text, checkboxes) Create/Edit task - Integrate EasyMDE Markdown editor with toolbar - Strong dark-theme overrides (toolbar, editor, preview, status bar, tokens) - Prevent unintended side-by-side persistence - Align “Current Task Info” dark-mode styles with task detail CSS - Add dark-mode tints for action buttons, tooltip light theme in dark mode - Editor layout polish (padding, focus ring, gutters, selection) - Quick actions layout: compact horizontal group Deps - Add: markdown, bleach Run - flask db upgrade # applies 004_add_task_activities_table |
||
|
|
8a378b7078 |
feat(clients,license,db): add client management, enhanced DB init, and tests
- Clients: add model, routes, and templates
- app/models/client.py
- app/routes/clients.py
- templates/clients/{create,edit,list,view}.html
- docs/CLIENT_MANAGEMENT_README.md
- Database: add enhanced init/verify scripts, migrations, and docs
- docker/{init-database-enhanced.py,start-enhanced.py,verify-database.py}
- docs/ENHANCED_DATABASE_STARTUP.md
- migrations/{add_analytics_column.sql,add_analytics_setting.py,migrate_to_client_model.py}
- Scripts: add version manager and docker network test helpers
- scripts/version-manager.{bat,ps1,py,sh}
- scripts/test-docker-network.{bat,sh}
- docs/VERSION_MANAGEMENT.md
- UI: tweak base stylesheet
- app/static/base.css
- Tests: add client system test
- test_client_system.py
|
||
|
|
d230a41e8a |
feat: enhance web interface layout and fix logo import circular dependency
- Improve web interface layout for better user-friendliness and mobile responsiveness * Update CSS variables for consistent spacing and component sizing * Enhance card layouts with improved padding, borders, and shadows * Optimize button and form element dimensions for better touch targets * Add hover effects and animations for improved user interaction * Implement responsive grid system with mobile-first approach - Refactor mobile JavaScript to prevent duplicate initialization * Consolidate mobile enhancements into dedicated utility classes * Add initialization guards to prevent double loading * Implement MobileUtils and MobileNavigation classes * Remove duplicate event listeners and mobile enhancements - Fix circular import issue in logo handling * Replace problematic 'from app import app' with Flask's current_app * Add error handling for cases where current_app is unavailable * Improve logo path resolution with fallback mechanisms * Fix settings model to use proper Flask context - Clean up template code and remove duplication * Remove duplicate mobile enhancements from base template * Clean up dashboard template JavaScript * Centralize all mobile functionality in mobile.js * Add proper error handling and debugging - Update CSS variables and spacing system * Introduce --section-spacing and --card-spacing variables * Add mobile-specific spacing variables * Improve border-radius and shadow consistency * Enhance typography and visual hierarchy This commit resolves the double loading issue and logo import errors while significantly improving the overall user experience and mobile responsiveness of the web interface. |
||
|
|
98728691ef |
feat: Add comprehensive Task Management system with automatic database migration
- Add Task model with full CRUD operations, status tracking, and priority management - Integrate tasks with existing projects and time entries via foreign key relationships - Create new Flask routes (/tasks) with admin and user role-based access control - Implement task status transitions (pending → in_progress → completed → cancelled) - Add task filtering by status, priority, assignee, and project - Create responsive Jinja2 templates for task listing, creation, editing, and viewing - Integrate task selection in timer and manual time entry forms - Add task management to project dashboards and navigation menus - Implement automatic database migration system for seamless deployment - Create migration scripts to add missing tables and columns - Update startup script to detect and run migrations automatically - Add comprehensive error handling and validation - Include full documentation (TASK_MANAGEMENT_README.md) - Update project structure and main README with new feature details Database Changes: - New 'tasks' table with indexes for performance - Add 'task_id' column to 'time_entries' table - Automatic migration detection and execution Technical Implementation: - SQLAlchemy relationships with proper backrefs and cascading - Flask-Login integration for role-based access - Bootstrap 5 responsive UI components - Font Awesome icons for visual enhancement - Comprehensive test coverage and error handling This feature enables users to break down projects into manageable tasks, track progress, assign work, and maintain better project organization. |
||
|
|
c92f9e196b | V1.0.0 version push |