Commit graph

8 commits

Author SHA1 Message Date
Janus C. H. Knudsen
8e52d670d6 Refactor entity services with hybrid sync pattern
Introduces BaseEntityService and SyncPlugin to eliminate code duplication across entity services

Improves:
- Code reusability through inheritance and composition
- Sync infrastructure for all entity types
- Polymorphic sync status management
- Reduced boilerplate code by ~75%

Supports generic sync for Event, Booking, Customer, and Resource entities
2025-11-18 16:37:33 +01:00
Janus C. H. Knudsen
a360fad265 Redesigns booking and resource architecture
Fundamentally refactors booking system to support:
- Split-resource bookings
- Service-level resource assignment
- Clear separation between booking and calendar events

Introduces new interfaces and type definitions to model complex booking scenarios, enabling more flexible and accurate resource management

Improves type safety by removing ambiguous type annotations
2025-11-14 23:05:57 +01:00
Janus C. H. Knudsen
f86ae09ec3 Refactor calendar datasource architecture
Centralizes date calculation logic into DateColumnDataSource
Improves separation of concerns across rendering components

Key changes:
- Introduces IColumnInfo interface for flexible column data
- Moves date calculation from multiple managers to dedicated datasource
- Removes duplicate date rendering logic
- Prepares architecture for future resource-based views
2025-11-14 16:25:03 +01:00
Janus C. H. Knudsen
b5dfd57d9e Migrates date handling from date-fns to day.js
Replaces date-fns library with day.js to reduce bundle size and improve tree-shaking

- Centralizes all date logic in DateService
- Reduces library footprint from 576 KB to 29 KB
- Maintains 99.4% test coverage during migration
- Adds timezone and formatting plugins for day.js

Improves overall library performance and reduces dependency complexity
2025-11-12 23:51:48 +01:00
Janus C. H. Knudsen
4cc110d9f2 Adds comprehensive refactoring failure documentation
Documents two consecutive failed attempts at AllDayManager architectural refactoring, including:

- Detailed analysis of architectural and implementation failures
- Lessons learned about upfront design and systematic debugging
- Root cause identification for repeated refactoring mistakes
- Recommendations for future implementation approaches

Highlights critical issues in code design, DI principles, and functional testing strategies
2025-11-11 16:29:15 +01:00
Janus C. H. Knudsen
c1e0da056c Refactor workweek presets into dedicated manager
Extracts workweek preset logic from ViewManager into WorkweekPresetsManager

Improves separation of concerns by:
- Creating a dedicated manager for workweek preset UI
- Simplifying ViewManager to focus only on view selector
- Implementing event-driven CSS updates
- Reducing code duplication in ConfigManager

Follows "each UI element has its own manager" architectural principle
2025-11-07 21:50:07 +01:00
Janus C. H. Knudsen
34cf4fbfca Refactor resize and event rendering with performance improvements
Optimizes event resize and rendering logic by:
- Simplifying resize handle management
- Improving single column event rendering
- Reducing unnecessary DOM operations
- Removing redundant event caching and subscriptions

Improves performance and reduces complexity in event interaction flow
2025-11-06 23:05:20 +01:00
Janus C. H. Knudsen
a1bee99d8e Refactor offline-first architecture with IndexedDB
Improves dependency injection and service initialization for IndexedDB-based calendar application

Implements lazy initialization for IndexedDB
Fixes race conditions in async event handling
Adds proper dependency injection with registerType
Enhances sync manager and repository pattern

Key improvements:
- Lazy database initialization
- Proper service lifecycle management
- Improved network awareness for sync operations
- Cleaned up initialization logic in index.ts
2025-11-05 20:35:21 +01:00