From 12afa88f2c2627f3ee47bcb9baca08fe20749c22 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Mon, 13 Apr 2026 12:19:08 +0700 Subject: [PATCH] fix: make kandang_id optional --- .../production-result/filter/ProductionResultFilter.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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<