refactor(FE): Relax expedition vendor validation

This commit is contained in:
rstubryan
2026-01-15 19:37:55 +07:00
parent 45700be730
commit a17089f4bb
@@ -196,16 +196,7 @@ const PurchaseAcceptApprovalItemObjectSchema: Yup.ObjectSchema<PurchaseAcceptApp
expedition_vendor_id: Yup.number()
.nullable()
.optional()
.min(1, 'Vendor ekspedisi tidak valid!')
.typeError('Vendor ekspedisi harus berupa angka!')
.test(
'is-valid-expedition-vendor',
'Vendor ekspedisi harus dipilih!',
function (value) {
if (!this.parent.expedition_vendor) return true;
return Boolean(value && value > 0);
}
),
.typeError('Vendor ekspedisi harus berupa angka!'),
received_qty: Yup.mixed<string | number>()
.required('Jumlah diterima wajib diisi!')
.test(