mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-317): Add Uniformity API service and types
This commit is contained in:
@@ -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
@@ -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';
|
||||
};
|
||||
Reference in New Issue
Block a user