mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import { BaseApiService } from '@/services/api/base';
|
|
import { BaseApiResponse } from '@/types/api/api-general';
|
|
import { HppPerKandangReport } from '@/types/api/report/hpp-per-kandang';
|
|
|
|
export class MarketingSaleReportService extends BaseApiService<
|
|
HppPerKandangReport,
|
|
unknown,
|
|
unknown
|
|
> {
|
|
constructor(basePath: string) {
|
|
super(basePath);
|
|
}
|
|
|
|
async getHppPerKandangReport(
|
|
area_id?: string,
|
|
location_id?: string,
|
|
kandang_id?: string,
|
|
weight_min?: string,
|
|
weight_max?: string,
|
|
period?: string,
|
|
sort_by?: string,
|
|
show_unrecorded?: boolean,
|
|
page?: number,
|
|
limit?: number
|
|
): Promise<BaseApiResponse<HppPerKandangReport> | undefined> {
|
|
return await this.customRequest<BaseApiResponse<HppPerKandangReport>>(
|
|
`hpp-per-kandang`,
|
|
{
|
|
method: 'GET',
|
|
params: {
|
|
area_id: area_id,
|
|
location_id: location_id,
|
|
kandang_id: kandang_id,
|
|
weight_min: weight_min,
|
|
weight_max: weight_max,
|
|
period: period,
|
|
sort_by: sort_by,
|
|
show_unrecorded: show_unrecorded,
|
|
page: page,
|
|
limit: limit,
|
|
},
|
|
}
|
|
);
|
|
}
|
|
}
|
|
|
|
export const SaleReportApi = new MarketingSaleReportService(
|
|
'reports/marketings'
|
|
);
|
|
|
|
// export const SaleReportApi = new MarketingSaleReportService(
|
|
// 'http://localhost:4010/api/reports/marketings'
|
|
// );
|