PlanTempusApp/PlanTempus.Application/wwwroot/ts/app.ts
Janus C. H. Knudsen 4cf30e1f27 Add services feature with mock data and components
Introduces comprehensive services management module with:
- Dynamic service and category tables
- Localization support for services section
- Mock data for services and categories
- Responsive UI components for services listing
- Menu navigation and styling updates

Enhances application's service management capabilities
2026-01-15 23:29:26 +01:00

70 lines
1.9 KiB
TypeScript

/**
* Salon OS App
*
* Main application class that orchestrates all UI controllers
*/
import { SidebarController } from './modules/sidebar';
import { DrawerController } from './modules/drawers';
import { ThemeController } from './modules/theme';
import { SearchController } from './modules/search';
import { LockScreenController } from './modules/lockscreen';
import { CashController } from './modules/cash';
import { EmployeesController } from './modules/employees';
import { ControlsController } from './modules/controls';
import { ServicesController } from './modules/services';
/**
* Main application class
*/
export class App {
readonly sidebar: SidebarController;
readonly drawers: DrawerController;
readonly theme: ThemeController;
readonly search: SearchController;
readonly lockScreen: LockScreenController;
readonly cash: CashController;
readonly employees: EmployeesController;
readonly controls: ControlsController;
readonly services: ServicesController;
constructor() {
// Initialize controllers
this.sidebar = new SidebarController();
this.drawers = new DrawerController();
this.theme = new ThemeController();
this.search = new SearchController();
this.lockScreen = new LockScreenController(this.drawers);
this.cash = new CashController();
this.employees = new EmployeesController();
this.controls = new ControlsController();
this.services = new ServicesController();
}
}
/**
* Global app instance
*/
let app: App;
/**
* Initialize the application
*/
function init(): void {
app = new App();
// Expose to window for debugging
if (typeof window !== 'undefined') {
(window as unknown as { app: App }).app = app;
}
}
// Wait for DOM ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
export { app };
export default App;