From 21acb09f0c2a81977d91d2459cbba91f695c956e Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Thu, 8 Jan 2026 09:41:24 +0700 Subject: [PATCH] feat: create type for Master Employee --- src/types/api/daily-checklist/employee.d.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/types/api/daily-checklist/employee.d.ts diff --git a/src/types/api/daily-checklist/employee.d.ts b/src/types/api/daily-checklist/employee.d.ts new file mode 100644 index 00000000..6010dfa1 --- /dev/null +++ b/src/types/api/daily-checklist/employee.d.ts @@ -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[]; +}; + +export type Employee = BaseMetadata & BaseEmployee; + +export type CreateEmployeePayload = { + name: string; + is_active: boolean; + kandang_ids: number[]; +}; + +export type UpdateEmployeePayload = CreateEmployeePayload;