mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
fix: make kandang_id optional
This commit is contained in:
@@ -43,15 +43,7 @@ export const ProductionResultFilterSchema = yup.object({
|
|||||||
}
|
}
|
||||||
return !!value;
|
return !!value;
|
||||||
}),
|
}),
|
||||||
kandang_id: yup
|
kandang_id: yup.mixed<OptionType>().nullable(),
|
||||||
.mixed<OptionType>()
|
|
||||||
.required('Kandang wajib dipilih')
|
|
||||||
.test('is-not-empty', 'Kandang wajib dipilih', (value) => {
|
|
||||||
if (Array.isArray(value)) {
|
|
||||||
return value.length > 0;
|
|
||||||
}
|
|
||||||
return !!value;
|
|
||||||
}),
|
|
||||||
}) as yup.ObjectSchema<ProductionResultFilterFormType>;
|
}) as yup.ObjectSchema<ProductionResultFilterFormType>;
|
||||||
|
|
||||||
export type ProductionResultFilterValues = yup.InferType<
|
export type ProductionResultFilterValues = yup.InferType<
|
||||||
|
|||||||
Reference in New Issue
Block a user