fix: make kandang_id optional

This commit is contained in:
ValdiANS
2026-04-13 12:19:08 +07:00
parent 4649dfde89
commit 12afa88f2c
@@ -43,15 +43,7 @@ export const ProductionResultFilterSchema = yup.object({
}
return !!value;
}),
kandang_id: yup
.mixed<OptionType>()
.required('Kandang wajib dipilih')
.test('is-not-empty', 'Kandang wajib dipilih', (value) => {
if (Array.isArray(value)) {
return value.length > 0;
}
return !!value;
}),
kandang_id: yup.mixed<OptionType>().nullable(),
}) as yup.ObjectSchema<ProductionResultFilterFormType>;
export type ProductionResultFilterValues = yup.InferType<