mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Relax expedition vendor validation
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user