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.
This commit is contained in:
Janus Knudsen 2025-08-31 22:39:09 +02:00
parent 383eab7524
commit fafad16926
24 changed files with 4 additions and 275 deletions

View file

@ -22,7 +22,6 @@ export class GridManager {
private eventCleanup: (() => void)[] = [];
constructor() {
console.log('🏗️ GridManager: Constructor called with Strategy Pattern');
// Default to week view strategy
this.currentStrategy = new WeekViewStrategy();
@ -34,12 +33,10 @@ export class GridManager {
this.findElements();
this.subscribeToEvents();
console.log('GridManager: Initialized with strategy pattern');
}
private findElements(): void {
this.container = document.querySelector('swp-calendar-container');
console.log('GridManager: Found container:', !!this.container);
}
private subscribeToEvents(): void {
@ -69,7 +66,6 @@ export class GridManager {
* Switch to a different view strategy
*/
public switchViewStrategy(view: CalendarView): void {
console.log(`GridManager: Switching to ${view} strategy`);
// Clean up current strategy
this.currentStrategy.destroy();
@ -84,7 +80,6 @@ export class GridManager {
this.currentStrategy = new MonthViewStrategy();
break;
default:
console.warn(`GridManager: Unknown view type ${view}, defaulting to week`);
this.currentStrategy = new WeekViewStrategy();
}
@ -97,7 +92,6 @@ export class GridManager {
*/
public setResourceData(resourceData: ResourceCalendarData | null): void {
this.resourceData = resourceData;
console.log('GridManager: Updated resource data');
this.render();
}
@ -106,11 +100,9 @@ export class GridManager {
*/
public async render(): Promise<void> {
if (!this.container) {
console.warn('GridManager: No container found, cannot render');
return;
}
console.log(`🎨 GridManager: Rendering ${this.currentDate.toDateString()} using ${this.currentStrategy.constructor.name}`);
// Create context for strategy
const context: ViewContext = {
@ -128,7 +120,6 @@ export class GridManager {
// Get period range from current strategy
const periodRange = this.currentStrategy.getPeriodRange(this.currentDate);
console.log(`GridManager: Emitting GRID_RENDERED for main container with period ${periodRange.startDate.toDateString()} - ${periodRange.endDate.toDateString()}`);
// Emit grid rendered event with explicit date range
eventBus.emit(CoreEvents.GRID_RENDERED, {
@ -140,7 +131,6 @@ export class GridManager {
columnCount: layoutConfig.columnCount
});
console.log(`✅ Grid rendered with ${layoutConfig.columnCount} columns`);
}
@ -208,7 +198,6 @@ export class GridManager {
* Clean up all resources
*/
public destroy(): void {
console.log('GridManager: Cleaning up');
// Clean up event listeners
this.eventCleanup.forEach(cleanup => cleanup());