mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-212): update notes field in UpdateStaffApprovalRequestPayload for consistency
This commit is contained in:
@@ -104,10 +104,7 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
|
||||
const updateStaffApprovalHandler = useCallback(
|
||||
async (purchaseId: number, payload: UpdateStaffApprovalRequestPayload) => {
|
||||
const res = await PurchaseApi.staffApproval.update(
|
||||
purchaseId,
|
||||
payload
|
||||
);
|
||||
const res = await PurchaseApi.staffApproval.update(purchaseId, payload);
|
||||
if (isResponseError(res)) {
|
||||
setPurchaseOrderFormErrorMessage(res.message);
|
||||
return;
|
||||
@@ -166,7 +163,7 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
await createStaffApprovalHandler(createPayload);
|
||||
} else if (type === 'edit') {
|
||||
const updatePayload: UpdateStaffApprovalRequestPayload = {
|
||||
'notes?': values.notes || null,
|
||||
notes: values.notes || null,
|
||||
items: purchaseItems.map((purchaseItem, idx) => {
|
||||
const formItem = values.items?.[idx];
|
||||
return {
|
||||
|
||||
Vendored
+1
-1
@@ -90,13 +90,13 @@ export type CreateStaffApprovalRequestPayload = {
|
||||
};
|
||||
|
||||
export type UpdateStaffApprovalRequestPayload = {
|
||||
notes?: string | null;
|
||||
items: {
|
||||
purchase_item_id: number;
|
||||
qty: number;
|
||||
price: number;
|
||||
total_price: number;
|
||||
}[];
|
||||
'notes?': string | null;
|
||||
};
|
||||
|
||||
export type CreateManagerApprovalRequestPayload = {
|
||||
|
||||
Reference in New Issue
Block a user