22 lines
705 B
TypeScript
22 lines
705 B
TypeScript
import { DashboardOverviewViewModel } from '../../view-models/DashboardOverviewViewModel';
|
|
import { DashboardApiClient } from '../../api/dashboard/DashboardApiClient';
|
|
|
|
/**
|
|
* Dashboard Service
|
|
*
|
|
* Orchestrates dashboard operations by coordinating API calls and view model creation.
|
|
* All dependencies are injected via constructor.
|
|
*/
|
|
export class DashboardService {
|
|
constructor(
|
|
private readonly apiClient: DashboardApiClient
|
|
) {}
|
|
|
|
/**
|
|
* Get dashboard overview data with view model transformation
|
|
*/
|
|
async getDashboardOverview(): Promise<DashboardOverviewViewModel> {
|
|
const dto = await this.apiClient.getDashboardOverview();
|
|
return new DashboardOverviewViewModel(dto);
|
|
}
|
|
} |