mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE-208,212,213): add action field to staff approval request payloads and implement rejection handling in PurchaseOrderDetail
This commit is contained in:
@@ -141,6 +141,7 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
|
||||
if (type === 'add') {
|
||||
const createPayload: CreateStaffApprovalRequestPayload = {
|
||||
action: 'APPROVED',
|
||||
notes: values.notes || '',
|
||||
items: purchaseItems.map((purchaseItem, idx) => {
|
||||
const formItem = values.items?.[idx];
|
||||
@@ -163,6 +164,7 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
await createStaffApprovalHandler(createPayload);
|
||||
} else if (type === 'edit') {
|
||||
const updatePayload: UpdateStaffApprovalRequestPayload = {
|
||||
action: 'APPROVED',
|
||||
notes: values.notes || null,
|
||||
items: purchaseItems.map((purchaseItem, idx) => {
|
||||
const formItem = values.items?.[idx];
|
||||
|
||||
Reference in New Issue
Block a user