mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Enable reinitialize and map expedition vendor
This commit is contained in:
@@ -164,6 +164,7 @@ const PurchaseOrderAcceptApprovalForm = ({
|
||||
validationSchema: PurchaseRequestAcceptApprovalFormSchema,
|
||||
validateOnChange: true,
|
||||
validateOnBlur: true,
|
||||
enableReinitialize: true,
|
||||
onSubmit: async (values) => {
|
||||
const payload: CreateAcceptApprovalRequestPayload = {
|
||||
action: 'APPROVED',
|
||||
@@ -238,7 +239,12 @@ const PurchaseOrderAcceptApprovalForm = ({
|
||||
travel_number: item.travel_number || '',
|
||||
travel_document_path: item.travel_document_path || '',
|
||||
vehicle_number: item.vehicle_number || '',
|
||||
expedition_vendor: null,
|
||||
expedition_vendor: item.expedition_vendor
|
||||
? {
|
||||
value: item.expedition_vendor.id,
|
||||
label: item.expedition_vendor.name,
|
||||
}
|
||||
: null,
|
||||
expedition_vendor_id: item.expedition_vendor_id || 0,
|
||||
received_qty: item.total_qty || '',
|
||||
transport_per_item: item.transport_per_item || '',
|
||||
|
||||
Reference in New Issue
Block a user