feat: create Daily Checklist type

This commit is contained in:
ValdiANS
2026-01-09 15:30:45 +07:00
parent f60a07bc5b
commit cc8f258c41
+56
View File
@@ -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<BaseKandang, 'id' | 'name' | 'status' | 'capacity'>;
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;
};