summaryrefslogtreecommitdiff
path: root/src/services/waybills/WaybillPanel.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/waybills/WaybillPanel.tsx')
-rw-r--r--src/services/waybills/WaybillPanel.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/services/waybills/WaybillPanel.tsx b/src/services/waybills/WaybillPanel.tsx
index 1d1701d..c501fc2 100644
--- a/src/services/waybills/WaybillPanel.tsx
+++ b/src/services/waybills/WaybillPanel.tsx
@@ -3,12 +3,13 @@ import { useHistory } from 'react-router-dom';
import Button from '../../components/Button';
import { patch, baseURL } from '../../requests';
import { PanelProps } from '../../lib/ServiceContext';
+import { Waybill } from '../types';
-const WaybillPanel: React.FC<PanelProps> = ({ item, mutate }) => {
+const WaybillPanel: React.FC<PanelProps<Waybill>> = ({ item, mutate }) => {
const history = useHistory();
- const handleChangeStatus = (status: any) => patch(`/waybills/${item._id}`, { status })
+ const handleChangeStatus = (status: Waybill['status']) => patch(`/waybills/${item._id}`, { status })
.then(() => {
history.push('/waybills');
mutate({ ...item, status });