From cc8f258c41e3c724df4a317440561bd9b0214641 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Fri, 9 Jan 2026 15:30:45 +0700 Subject: [PATCH] feat: create Daily Checklist type --- .../api/daily-checklist/daily-checklist.d.ts | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/types/api/daily-checklist/daily-checklist.d.ts diff --git a/src/types/api/daily-checklist/daily-checklist.d.ts b/src/types/api/daily-checklist/daily-checklist.d.ts new file mode 100644 index 00000000..9f01ae1f --- /dev/null +++ b/src/types/api/daily-checklist/daily-checklist.d.ts @@ -0,0 +1,56 @@ +import { BaseMetadata } from '@/types/api/api-general'; +import { BaseKandang } from '@/types/api/master-data/kandang'; +import { Phase } from '@/types/api/daily-checklist/phase'; +import { PhaseActivity } from '@/types/api/daily-checklist/phase-activity'; + +export type BaseDailyChecklist = { + id: number; + name: string; + status: string; + category: string; + date: string; + kandang: Pick; + total_phase: number; + total_activity: number; + progress: number; +}; + +export type DailyChecklist = BaseMetadata & BaseDailyChecklist; + +export type DetailDailyChecklist = BaseDailyChecklist & { + reject_reason: string | null; + phases: { + id: number; + phase_id: number; + phase: Phase; + }[]; + tasks: { + id: number; + checklist_id: number; + phase_id: number; + phase_activity_id: number; + time_type: string; + notes: string | null; + phase: Phase; + phase_activity: PhaseActivity; + assignments: { + employee: { + id: number; + name: string; + }; + checked: boolean; + note: string | null; + }[]; + }[]; + assigned_employees: { + id: number; + name: string; + }[]; +}; + +export type CreateDailyChecklistPayload = { + date: string; + kandang_id: number; + category: string; + status: string; +};