mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
fix: make kandang_id optional
This commit is contained in:
@@ -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<
|
||||
|
||||
Reference in New Issue
Block a user