umwd-components 0.1.790 → 0.1.792

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,6 +97,7 @@ function CancelIpoDialog({ open, handleClose, orderID, revalidateCallback, }) {
97
97
  return (jsxs(Dialog, { open: open, onClose: handleClose, children: [jsx(DialogTitle, { children: "Cancel Return" }), jsx(DialogContent, { children: jsxs(Stack, { spacing: 2, children: [jsx(Typography, { children: "Are you sure you want to cancel this return?" }), jsxs(List, { children: [jsx(ListItem, { children: "By cancelling this return order you will update it's status from requested to cancelled" }), jsx(ListItem, { children: "Please provide a reason for the cancellation" }), jsx(ListItem, { children: "The customer will be notified about the cancellation and of the reason for the cancellation" })] }), jsx(TextField, { label: "Cancellation reason", name: "reason", multiline: true, rows: 4, fullWidth: true, variant: "outlined", value: reason, onChange: (e) => setReason(e.target.value), placeholder: "Please provide a reason for the cancellation", error: !!reasonError, helperText: reasonError })] }) }), jsxs(DialogActions, { children: [jsx(Button, { variant: "outlined", onClick: handleClose, children: "Close" }), jsx(Button, { variant: "contained", color: "error", onClick: handleCancel, children: "Confirm Cancellation" })] })] }));
98
98
  }
99
99
  function TextualManageIPOForm({ data, sx, revalidateCallback, handleClose, role, }) {
100
+ console.log("TextualManageIPOForm data", data);
100
101
  const [formState, formAction] = useActionState((prevState, formData) => updateIpoAction(data.documentId, prevState, formData), INITIAL_STATE);
101
102
  const { handleAddMessage } = useSnackbar();
102
103
  const [items, setItems] = useState(data.items ? data.items : []);
@@ -132,7 +133,7 @@ function TextualManageIPOForm({ data, sx, revalidateCallback, handleClose, role,
132
133
  const parseItems = (items) => {
133
134
  return items.map((item) => {
134
135
  return {
135
- id: item.documentId,
136
+ documentId: item.documentId,
136
137
  ordered_quantity: item.ordered_quantity,
137
138
  received_quantity: item.received_quantity,
138
139
  registered_quantity: item.registered_quantity,
@@ -11,6 +11,7 @@ import { parseFormData } from '../../../../lib/parseFormData.js';
11
11
 
12
12
  async function updateIpoAction(documentId, prevState, formData) {
13
13
  const parsedFormData = parseFormData(formData);
14
+ console.log("updateIpoAction", documentId, parsedFormData);
14
15
  const responseData = await mutateData("PUT", `/api/ipos/${documentId}`, parsedFormData);
15
16
  if (!responseData) {
16
17
  return {