refactor(FE-114): remove optional product_warehouse_id validation from RecordingForm schema

This commit is contained in:
rstubryan
2025-10-24 10:08:38 +07:00
parent ca5b236565
commit 41e6848d75
@@ -59,10 +59,6 @@ export const RecordingFormSchema = Yup.object({
depletions: Yup.array() depletions: Yup.array()
.of( .of(
Yup.object({ Yup.object({
product_warehouse_id: Yup.number()
.optional()
.min(1, 'Produk wajib diisi!')
.typeError('Produk harus berupa angka!'),
total: Yup.number() total: Yup.number()
.required('Jumlah depletions wajib diisi!') .required('Jumlah depletions wajib diisi!')
.min(1, 'Jumlah depletions minimal 1!') .min(1, 'Jumlah depletions minimal 1!')
@@ -110,7 +106,7 @@ export const getRecordingFormInitialValues = (
) ?? [ ) ?? [
{ {
weight: 0, weight: 0,
qty: 1, qty: 0,
average_weight: 0, average_weight: 0,
}, },
], ],