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