refactor(FE-174): add ProjectFlockKandang API and enhance type definitions

This commit is contained in:
rstubryan
2025-11-06 09:53:32 +07:00
parent 4e40aba544
commit a524dec16d
2 changed files with 13 additions and 3 deletions
+6
View File
@@ -17,6 +17,7 @@ import {
CreateChickinPayload,
UpdateChickinPayload,
} from '@/types/api/production/chickin';
import { ProjectFlockKandang } from '@/types/api/production/project-flock-kandang';
export const ProjectFlockApi = new BaseApiService<
ProjectFlock,
@@ -102,3 +103,8 @@ export const ChickinApi = new BaseApiService<
CreateChickinPayload,
UpdateChickinPayload
>('/production/chickins');
export const ProjectFlockKandangApi = new BaseApiService<
ProjectFlockKandang,
unknown,
unknown
>('/production/project-flock-kandangs');
+7 -3
View File
@@ -1,13 +1,17 @@
import { Kandang } from '@/type/master-data/kandang';
import { ProjectFlock } from '@/types/api/production/project-flock';
import { Chickin } from '@/types/api/production/chickin';
import { Approvals } from '@/types/api/api-general';
export type BaseProjectFlockKandang = {
id: number;
project_flock_id: number;
kandang_id: number;
kandang: Kandang;
project_flock: ProjectFlock;
project_flock_id: number;
kandang: Kandang;
kandang_id: number;
chickins: Chickin[];
available_quantity?: number;
approval: Approvals;
};
export type ProjectFlockKandang = BaseProjectFlockKandang;