mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-357): Rename HppPerkandang types and update API path
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { BaseApiService } from '@/services/api/base';
|
||||
import { BaseApiResponse } from '@/types/api/api-general';
|
||||
import { HppPerkandang } from '@/types/api/report/hpp-per-kandang';
|
||||
import { HppPerKandangReport } from '@/types/api/report/hpp-per-kandang';
|
||||
|
||||
export class MarketingSaleReportService extends BaseApiService<
|
||||
HppPerkandang,
|
||||
HppPerKandangReport,
|
||||
unknown,
|
||||
unknown
|
||||
> {
|
||||
@@ -22,8 +22,8 @@ export class MarketingSaleReportService extends BaseApiService<
|
||||
show_unrecorded?: boolean,
|
||||
page?: number,
|
||||
limit?: number
|
||||
): Promise<BaseApiResponse<HppPerkandang> | undefined> {
|
||||
return await this.customRequest<BaseApiResponse<HppPerkandang>>(
|
||||
): Promise<BaseApiResponse<HppPerKandangReport> | undefined> {
|
||||
return await this.customRequest<BaseApiResponse<HppPerKandangReport>>(
|
||||
`hpp-per-kandang`,
|
||||
{
|
||||
method: 'GET',
|
||||
@@ -46,5 +46,5 @@ export class MarketingSaleReportService extends BaseApiService<
|
||||
|
||||
// TODO: REPLACE WITH PRODUCTION URL
|
||||
export const SaleReportApi = new MarketingSaleReportService(
|
||||
'http://localhost:4010/api/reports/marketings/hpp-per-kandang'
|
||||
'http://localhost:4010/api/reports/marketings'
|
||||
);
|
||||
|
||||
+9
-10
@@ -1,8 +1,7 @@
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
import { Supplier } from '@/types/api/supplier/supplier';
|
||||
import { Supplier } from '@/types/api/master-data/supplier';
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
|
||||
export type BaseHppPerKandangSummary = {
|
||||
export type HppPerKandangSummary = {
|
||||
total_remaining_chicken_birds: number;
|
||||
total_remaining_chicken_weight_kg: number;
|
||||
average_weight_kg: number;
|
||||
@@ -13,7 +12,7 @@ export type BaseHppPerKandangSummary = {
|
||||
total_egg_value_rp: number;
|
||||
};
|
||||
|
||||
export type BaseHppPerkandang = {
|
||||
export type HppPerKandangRow = {
|
||||
id: number;
|
||||
kandang: Kandang;
|
||||
weight_range: {
|
||||
@@ -27,15 +26,15 @@ export type BaseHppPerkandang = {
|
||||
egg_production_kg: number;
|
||||
egg_hpp_rp_per_kg: number;
|
||||
egg_value_rp: number;
|
||||
feed_suppliers: Supplier;
|
||||
doc_suppliers: Supplier;
|
||||
feed_suppliers: Supplier[];
|
||||
doc_suppliers: Supplier[];
|
||||
average_doc_price_rp: number;
|
||||
hpp_rp: number;
|
||||
remaining_value_rp: number;
|
||||
};
|
||||
|
||||
export type HppPerkandang = BaseMetadata & {
|
||||
periods: string;
|
||||
rows: SalesReport[];
|
||||
summary: BaseSalesReportSummary;
|
||||
export type HppPerKandangReport = {
|
||||
period: string;
|
||||
rows: HppPerKandangRow[];
|
||||
summary: HppPerKandangSummary;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user