diff --git a/src/components/pages/report/production-result/filter/ProductionResultFilter.ts b/src/components/pages/report/production-result/filter/ProductionResultFilter.ts index 6df3759e..4c1afdd0 100644 --- a/src/components/pages/report/production-result/filter/ProductionResultFilter.ts +++ b/src/components/pages/report/production-result/filter/ProductionResultFilter.ts @@ -43,15 +43,7 @@ export const ProductionResultFilterSchema = yup.object({ } return !!value; }), - kandang_id: yup - .mixed() - .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().nullable(), }) as yup.ObjectSchema; export type ProductionResultFilterValues = yup.InferType<