feat(FE-317): Add Uniformity API service and types

This commit is contained in:
rstubryan
2025-12-23 21:21:25 +07:00
parent 414d617341
commit 3b2e11fd41
2 changed files with 35 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { BaseApiService } from '@/services/api/base';
import { BaseApiResponse } from '@/types/api/api-general';
import { Uniformity } from '@/types/api/uniformity/uniformity';
export class UniformityApiService extends BaseApiService<
Uniformity,
unknown,
unknown
> {
constructor(basePath: string) {
super(basePath);
}
async getUniformity(): Promise<BaseApiResponse<Uniformity> | undefined> {
return await this.customRequest<BaseApiResponse<Uniformity>>('');
}
}
// export const UniformityApi = new UniformityApiService('uniformity');
export const UniformityApi = new UniformityApiService(
'http://localhost:4010/api/uniformity'
);
+12
View File
@@ -0,0 +1,12 @@
import { Location } from '@/types/api/location/location';
import { Kandang } from '@/types/api/kandang/kandang';
import { BaseMetadata } from '../api-general';
export type Uniformity = BaseMetadata & {
id: number;
location: Location;
project_flock_kandang_id: number;
kandang: Kandang;
week: number;
status: 'CREATED' | 'APPROVED' | 'REJECTED';
};