From dbdfd2c50ba246e9953801f9c676e0e155442546 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Thu, 8 Jan 2026 09:37:05 +0700 Subject: [PATCH] refactor(FE): Remove location, project_flock and kandang fields --- .../recording/form/RecordingForm.schema.ts | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/src/components/pages/production/recording/form/RecordingForm.schema.ts b/src/components/pages/production/recording/form/RecordingForm.schema.ts index 90abc19a..4901b349 100644 --- a/src/components/pages/production/recording/form/RecordingForm.schema.ts +++ b/src/components/pages/production/recording/form/RecordingForm.schema.ts @@ -7,21 +7,6 @@ import { } from '@/types/api/production/recording'; type RecordingGrowingFormSchemaType = { - location?: { - value: number; - label: string; - } | null; - location_id: number; - project_flock?: { - value: number; - label: string; - } | null; - project_flock_id: number; - kandang?: { - value: number; - label: string; - } | null; - kandang_id: number; project_flock_kandang: { value: number; label: string; @@ -100,30 +85,6 @@ const EggObjectSchema: Yup.ObjectSchema = Yup.object({ export const RecordingGrowingFormSchema: Yup.ObjectSchema = Yup.object({ - location: Yup.object({ - value: Yup.number().min(1).required(), - label: Yup.string().required(), - }).nullable(), - location_id: Yup.number() - .min(1, 'Location wajib diisi!') - .required('Location wajib diisi!') - .typeError('Location wajib diisi!'), - project_flock: Yup.object({ - value: Yup.number().min(1).required(), - label: Yup.string().required(), - }).nullable(), - project_flock_id: Yup.number() - .min(1, 'Project flock wajib diisi!') - .required('Project flock wajib diisi!') - .typeError('Project flock wajib diisi!'), - kandang: Yup.object({ - value: Yup.number().min(1).required(), - label: Yup.string().required(), - }).nullable(), - kandang_id: Yup.number() - .min(1, 'Kandang wajib diisi!') - .required('Kandang wajib diisi!') - .typeError('Kandang wajib diisi!'), project_flock_kandang: Yup.object({ value: Yup.number().min(1).required(), label: Yup.string().required(), @@ -218,12 +179,6 @@ type RecordingFormData = Partial & { export const getRecordingGrowingFormInitialValues = ( initialValues?: RecordingFormData ): RecordingGrowingFormValues => ({ - location: null, - location_id: 0, - project_flock: null, - project_flock_id: 0, - kandang: null, - kandang_id: 0, project_flock_kandang: initialValues?.project_flock_kandang_id ? { value: initialValues.project_flock_kandang_id,