2026-01-10 20:39:17 +01:00
|
|
|
/**
|
|
|
|
|
* 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';
|
2026-01-11 21:42:24 +01:00
|
|
|
import { CashController } from './modules/cash';
|
2026-01-12 22:10:57 +01:00
|
|
|
import { EmployeesController } from './modules/employees';
|
2026-01-15 16:59:56 +01:00
|
|
|
import { ControlsController } from './modules/controls';
|
2026-01-15 23:29:26 +01:00
|
|
|
import { ServicesController } from './modules/services';
|
2026-01-19 18:27:59 +01:00
|
|
|
import { CustomersController } from './modules/customers';
|
2026-01-24 00:13:05 +01:00
|
|
|
import { SuppliersController } from './modules/suppliers';
|
2026-01-18 22:50:33 +01:00
|
|
|
import { TrackingController } from './modules/tracking';
|
2026-01-21 21:49:10 +01:00
|
|
|
import { ReportsController } from './modules/reports';
|
2026-02-02 22:42:18 +01:00
|
|
|
import { CalendarController } from './modules/calendar';
|
2026-01-10 20:39:17 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Main application class
|
|
|
|
|
*/
|
|
|
|
|
export class App {
|
|
|
|
|
readonly sidebar: SidebarController;
|
|
|
|
|
readonly drawers: DrawerController;
|
|
|
|
|
readonly theme: ThemeController;
|
|
|
|
|
readonly search: SearchController;
|
|
|
|
|
readonly lockScreen: LockScreenController;
|
2026-01-11 21:42:24 +01:00
|
|
|
readonly cash: CashController;
|
2026-01-12 22:10:57 +01:00
|
|
|
readonly employees: EmployeesController;
|
2026-01-15 16:59:56 +01:00
|
|
|
readonly controls: ControlsController;
|
2026-01-15 23:29:26 +01:00
|
|
|
readonly services: ServicesController;
|
2026-01-19 18:27:59 +01:00
|
|
|
readonly customers: CustomersController;
|
2026-01-24 00:13:05 +01:00
|
|
|
readonly suppliers: SuppliersController;
|
2026-01-18 22:50:33 +01:00
|
|
|
readonly tracking: TrackingController;
|
2026-01-21 21:49:10 +01:00
|
|
|
readonly reports: ReportsController;
|
2026-02-02 22:42:18 +01:00
|
|
|
readonly calendar: CalendarController;
|
2026-01-10 20:39:17 +01:00
|
|
|
|
|
|
|
|
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);
|
2026-01-11 21:42:24 +01:00
|
|
|
this.cash = new CashController();
|
2026-01-12 22:10:57 +01:00
|
|
|
this.employees = new EmployeesController();
|
2026-01-15 16:59:56 +01:00
|
|
|
this.controls = new ControlsController();
|
2026-01-15 23:29:26 +01:00
|
|
|
this.services = new ServicesController();
|
2026-01-19 18:27:59 +01:00
|
|
|
this.customers = new CustomersController();
|
2026-01-24 00:13:05 +01:00
|
|
|
this.suppliers = new SuppliersController();
|
2026-01-18 22:50:33 +01:00
|
|
|
this.tracking = new TrackingController();
|
2026-01-21 21:49:10 +01:00
|
|
|
this.reports = new ReportsController();
|
2026-02-02 22:42:18 +01:00
|
|
|
this.calendar = new CalendarController();
|
2026-01-10 20:39:17 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Global app instance
|
|
|
|
|
*/
|
|
|
|
|
let app: App;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initialize the application
|
|
|
|
|
*/
|
|
|
|
|
function init(): void {
|
|
|
|
|
app = new App();
|
|
|
|
|
|
2026-01-22 16:32:46 +01:00
|
|
|
// Expose app to window for debugging
|
2026-01-10 20:39:17 +01:00
|
|
|
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;
|