Commit graph

17 commits

Author SHA1 Message Date
Janus C. H. Knudsen
a80e4a7603 Implements dependency injection with Brandi
Replaces manual manager creation with Brandi DI container
for improved dependency management and testability.

Removes the ManagerFactory and its usages.
2025-10-15 20:09:12 +02:00
Janus C. H. Knudsen
f7c67e6253 Implements dependency injection with Brandi
Introduces Brandi DI container for managing application dependencies.

This change replaces the existing factory pattern with a proper
dependency injection mechanism, improving code modularity,
testability, and maintainability. It configures all managers and core
services within the container, ensuring proper dependency resolution.
2025-10-14 22:53:28 +02:00
Janus C. H. Knudsen
6bbf2d8adb Refactors date handling with DateService
Replaces DateCalculator with DateService for improved date and time operations, including timezone handling.

This change enhances the calendar's accuracy and flexibility in managing dates, especially concerning timezone configurations.
It also corrects a typo in the `allDay` dataset attribute.
2025-10-03 20:50:40 +02:00
Janus C. H. Knudsen
48d1fd681c Major refactor into type safe TS
With a risk oof rolling it all back
2025-09-23 20:44:15 +02:00
Janus Knudsen
ff067cfac3 Implements event overlap rendering
Adds logic to handle event overlaps in the calendar view. It introduces two patterns: column sharing for events with the same start time (rendered using flexbox) and stacking for events with a >30 min difference (rendered with reduced width and z-index).

It also introduces deep linking to specific events via URL parameters.
2025-09-04 00:16:35 +02:00
Janus Knudsen
2083c6921e Refactors calendar configuration and event handling
Streamlines calendar configuration by adopting a singleton pattern for consistent access and simplifies event handling.

- Removes direct `CalendarConfig` dependency injection in favor of the `calendarConfig` singleton, reducing code complexity.
- Replaces specific event emissions for grid, date, and resource settings updates with a general `REFRESH_REQUESTED` event.
- Updates event names to be more descriptive and consistent ("NAVIGATION_COMPLETED", "PERIOD_INFO_UPDATE").
- Removes the need to pass the calendar config to renderers since it is now a singleton.

This improves code maintainability and simplifies the event emission process.
2025-09-03 20:04:47 +02:00
Janus Knudsen
b8b44ddae8 Refactors DateCalculator to be a static class
This change refactors the DateCalculator class to be a static class.
This removes the need to instantiate DateCalculator in multiple
managers and renderers, simplifying dependency management and
ensuring consistent date calculations across the application.
The configuration is now initialized once at the application start.
2025-09-03 18:38:52 +02:00
Janus Knudsen
fafad16926 Removes excessive logging statements
Cleans up the codebase by removing unnecessary console log statements.

These logs were primarily used for debugging and are no longer needed in the production code.
This reduces noise in the console and improves overall performance.
2025-08-31 22:39:09 +02:00
Janus Knudsen
26f0cb8aaa Refactors calendar initialization with factory
Implements a factory pattern for manager creation and
initialization, improving dependency management and
extensibility.

This change replaces direct manager instantiation with a
`ManagerFactory` that handles dependency injection. This
enhances code organization and testability. It also includes
an initialization sequence diagram for better understanding
of the calendar's architecture and data flow.
2025-08-17 23:44:30 +02:00
Janus Knudsen
32ee35eb02 Refactors grid and navigation rendering
Attempt 1
2025-08-17 22:54:00 +02:00
Janus Knudsen
a03f314c4a Refactors event rendering to be event-driven
Moves event rendering logic into a dedicated EventRenderer class that uses a strategy pattern for different calendar types.

The rendering is now triggered by `GRID_RENDERED` and `CONTAINER_READY_FOR_EVENTS` events, emitted by the GridManager and NavigationManager respectively.

This change decouples the CalendarManager from direct event rendering and allows for more flexible and efficient event updates. The EventManager now has a method to fetch events for a given time period.

Removes direct calls to event rendering from CalendarManager. Improves animation transitions by using pre-rendered containers in the NavigationManager.
2025-08-16 00:51:12 +02:00
Janus Knudsen
b111f121ba wip 2025-08-09 01:16:04 +02:00
Janus Knudsen
59b3c64c55 Major refactorering to get a hold on all these events 2025-08-09 00:31:44 +02:00
Janus Knudsen
29811fd4b5 Renaming part 1 2025-08-07 00:15:44 +02:00
Janus Knudsen
9f6d4333cb Implements custom scroll and event logging
Adds custom scroll management for the calendar week view, replacing native scrollbars with a custom handle.

Introduces categorized event logging with console grouping and styling, enhancing debug output. It also allows configuring logging for specific event categories.
2025-07-29 00:52:01 +02:00
Janus Knudsen
b443649ced Improves grid layout and navigation
Refactors the calendar grid to support smoother navigation transitions by using separate week containers.

This change introduces a GridManager to handle grid rendering and interactions within these containers, enabling scroll synchronization and click event handling for each week view.

Also, configures the calendar to start at midnight and span a full 24-hour day, providing a more comprehensive view.
2025-07-25 00:24:15 +02:00
Janus Knudsen
f06c02121c Initial commit: Calendar Plantempus project setup with TypeScript, ASP.NET Core, and event-driven architecture 2025-07-24 22:17:38 +02:00