mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 05:45:46 +00:00
Merge branch 'development' into feat/FE/US-81/production-result-report
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { BaseApiService } from '@/services/api/base';
|
||||
import { BaseApiResponse } from '@/types/api/api-general';
|
||||
import { DashboardProduction } from '@/types/api/dashboard/dashboard-production';
|
||||
import { getDummySingle } from '@/dummy/dashboard/dashboard.production.dummy';
|
||||
|
||||
class DashboardService extends BaseApiService<
|
||||
DashboardProduction,
|
||||
unknown,
|
||||
unknown
|
||||
> {
|
||||
constructor(basePath: string) {
|
||||
super(basePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch dashboard production data
|
||||
* @param endpoint - The endpoint URL with query parameters
|
||||
* @returns Promise with BaseApiResponse containing DashboardProduction
|
||||
*
|
||||
* 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);
|
||||
*/
|
||||
async getDashboardProductionFetcher(
|
||||
endpoint: string
|
||||
): Promise<BaseApiResponse<DashboardProduction>> {
|
||||
// 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);
|
||||
return await getDummySingle();
|
||||
}
|
||||
}
|
||||
|
||||
export const DashboardApi = new DashboardService('/dashboard');
|
||||
@@ -483,6 +483,7 @@ export class ExpenseApiService extends BaseApiService<
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append('category', payload.category);
|
||||
formData.append('location_id', String(payload.location_id));
|
||||
formData.append('transaction_date', payload.transaction_date);
|
||||
formData.append('supplier_id', String(payload.supplier_id));
|
||||
|
||||
@@ -505,6 +506,7 @@ export class ExpenseApiService extends BaseApiService<
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append('category', payload.category);
|
||||
formData.append('location_id', String(payload.location_id));
|
||||
formData.append('transaction_date', payload.transaction_date);
|
||||
formData.append('supplier_id', String(payload.supplier_id));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user