feat(FE): slicing UI dashboard and define data types

This commit is contained in:
randy-ar
2026-01-09 16:48:38 +07:00
parent 64a0a9c8a8
commit 777b06c690
20 changed files with 5442 additions and 3450 deletions
+4 -8
View File
@@ -1,13 +1,9 @@
import { BaseApiService } from '@/services/api/base';
import { BaseApiResponse } from '@/types/api/api-general';
import { DashboardProduction } from '@/types/api/dashboard/dashboard-production';
import { Dashboard } from '@/types/api/dashboard/dashboard';
import { getDummySingle } from '@/dummy/dashboard/dashboard.production.dummy';
class DashboardService extends BaseApiService<
DashboardProduction,
unknown,
unknown
> {
class DashboardService extends BaseApiService<Dashboard, unknown, unknown> {
constructor(basePath: string) {
super(basePath);
}
@@ -19,11 +15,11 @@ class DashboardService extends BaseApiService<
*
* Note: Currently using dummy data. When real API is ready,
* uncomment the line below and remove getDummySingle() call:
* return await this.customRequest<BaseApiResponse<DashboardProduction>>(endpoint);
* return await this.customRequest<BaseApiResponse<Dashboard>>(endpoint);
*/
async getDashboardProductionFetcher(
endpoint: string
): Promise<BaseApiResponse<DashboardProduction>> {
): Promise<BaseApiResponse<Dashboard>> {
// For now, we're using dummy data regardless of the endpoint
// The endpoint parameter is kept for future API integration
console.log('Fetching dashboard data with endpoint:', endpoint);