adding cancel reason in dropdown
This commit is contained in:
parent
05c9d902ff
commit
9f6efa2e96
@ -17,7 +17,7 @@ import {
|
|||||||
DialogContentText,
|
DialogContentText,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
TextField,
|
TextField,
|
||||||
Divider,
|
Divider, InputLabel, Select, MenuItem
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import onvoicesData from "../../assets/incoicedata.json";
|
import onvoicesData from "../../assets/incoicedata.json";
|
||||||
import { useNavigate, useParams } from "react-router-dom";
|
import { useNavigate, useParams } from "react-router-dom";
|
||||||
@ -60,7 +60,7 @@ const ViewOrders = () => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.log(response);
|
// console.log(response);
|
||||||
setOrder(response.data.singleOrder);
|
setOrder(response.data.singleOrder);
|
||||||
setStatus(response.data.singleOrder?.status);
|
setStatus(response.data.singleOrder?.status);
|
||||||
|
|
||||||
@ -638,18 +638,27 @@ const ViewOrders = () => {
|
|||||||
<form onSubmit={handleConfirmUpdate}>
|
<form onSubmit={handleConfirmUpdate}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
Please provide a reason for cancelling the order:
|
Please select a reason for cancelling the order:
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
<TextField
|
<FormControl fullWidth variant="outlined" margin="dense">
|
||||||
autoFocus
|
<InputLabel id="cancellation-reason-label">
|
||||||
required
|
Cancellation Reason
|
||||||
margin="dense"
|
</InputLabel>
|
||||||
label="Cancellation Reason"
|
<Select
|
||||||
fullWidth
|
labelId="cancellation-reason-label"
|
||||||
variant="outlined"
|
|
||||||
value={cancellationReason}
|
value={cancellationReason}
|
||||||
onChange={(e) => setCancellationReason(e.target.value)}
|
onChange={(e) => setCancellationReason(e.target.value)}
|
||||||
/>
|
required
|
||||||
|
>
|
||||||
|
<MenuItem value="Out of stock">Out of stock</MenuItem>
|
||||||
|
<MenuItem value="Customer request">Customer request</MenuItem>
|
||||||
|
<MenuItem value="Price issue">Price issue</MenuItem>
|
||||||
|
<MenuItem value="Partial cancellation">
|
||||||
|
Partial cancellation
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem value="Other">Other</MenuItem>
|
||||||
|
</Select>
|
||||||
|
</FormControl>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button onClick={handleCancel} color="primary">
|
<Button onClick={handleCancel} color="primary">
|
||||||
|
Loading…
Reference in New Issue
Block a user