mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
feat: create Daily Checklist type
This commit is contained in:
@@ -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;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user