mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
feat: create type for Master Employee
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { BaseMetadata } from '@/types/api/api-general';
|
||||||
|
import { BaseLocation } from '@/types/api/master-data/location';
|
||||||
|
import { BaseUser } from '@/types/api/user';
|
||||||
|
import { BaseKandang } from '@/types/api/master-data/kandang';
|
||||||
|
|
||||||
|
export type BaseEmployee = {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
is_active: boolean;
|
||||||
|
kandangs: Pick<BaseKandang, 'id' | 'name' | 'status' | 'capacity'>[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Employee = BaseMetadata & BaseEmployee;
|
||||||
|
|
||||||
|
export type CreateEmployeePayload = {
|
||||||
|
name: string;
|
||||||
|
is_active: boolean;
|
||||||
|
kandang_ids: number[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateEmployeePayload = CreateEmployeePayload;
|
||||||
Reference in New Issue
Block a user