feat: initialize main app module with data loading and UI setup

This commit is contained in:
Greg 2025-05-29 16:45:51 +02:00
parent 1dcb6d6631
commit 88c4f70aa4

View File

@ -2,9 +2,16 @@
* Main Application Module
* Entry point for the application, initializes all components
*/
document.addEventListener('DOMContentLoaded', () => {
document.addEventListener('DOMContentLoaded', async () => {
// Initialize all modules
DataManager.init();
try {
await DataManager.init(); // Wait for data to be loaded and processed
} catch (error) {
console.error('Failed to initialize DataManager:', error);
// Optionally, display an error message to the user in the UI
// For example, by setting some text in a dedicated error div.
// For now, we'll log and let the app proceed with potentially empty/default data.
}
UI.init();
Charts.init();