mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +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()
|
expedition_vendor_id: Yup.number()
|
||||||
.nullable()
|
.nullable()
|
||||||
.optional()
|
.optional()
|
||||||
.min(1, 'Vendor ekspedisi tidak valid!')
|
.typeError('Vendor ekspedisi harus berupa angka!'),
|
||||||
.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);
|
|
||||||
}
|
|
||||||
),
|
|
||||||
received_qty: Yup.mixed<string | number>()
|
received_qty: Yup.mixed<string | number>()
|
||||||
.required('Jumlah diterima wajib diisi!')
|
.required('Jumlah diterima wajib diisi!')
|
||||||
.test(
|
.test(
|
||||||
|
|||||||
Reference in New Issue
Block a user