summaryrefslogtreecommitdiff
path: root/src/containers/WaybillPanel.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-18 13:26:46 +0300
committereug-vs <eug-vs@keemail.me>2021-03-18 13:26:46 +0300
commit5992702799eaf7a71cde83112c1ce478c893377b (patch)
tree6f410413292cc55ba20fe26b2910e7818b20aaa6 /src/containers/WaybillPanel.tsx
parentaecf01896aa7987a46881d43a9d804a17516256c (diff)
downloadcommercel-ui-5992702799eaf7a71cde83112c1ce478c893377b.tar.gz
feat: adapt Forms for mobile
Diffstat (limited to 'src/containers/WaybillPanel.tsx')
-rw-r--r--src/containers/WaybillPanel.tsx29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/containers/WaybillPanel.tsx b/src/containers/WaybillPanel.tsx
index 386d8bb..d74ef1e 100644
--- a/src/containers/WaybillPanel.tsx
+++ b/src/containers/WaybillPanel.tsx
@@ -2,7 +2,6 @@ import React from 'react';
import { useHistory } from 'react-router-dom';
import Input from '../components/Input';
import Button from '../components/Button';
-import Paper from '../components/Paper';
import { patch, get, baseURL } from '../requests';
import { PanelProps } from './Service/ServiceContext';
@@ -24,21 +23,19 @@ const WaybillPanel: React.FC<PanelProps> = ({ item, mutate }) => {
const executed = item.status === 'executed';
return (
- <div className="m-4 p-4 pl-16 border-l flex flex-col">
- <p className="text-lg">
- Итоговая сумма: ${item.total}
- </p>
- <Button route={`/contractors/${item.contractorId}`} variant="outlined">
- Перейти к контрагенту
- </Button>
- <Button onClick={handlePrint}>
- Печать
- </Button>
- {
- executed
- ? <Button onClick={handleCancel}>Откатить</Button>
- : <Button onClick={handleExecute}>Провести</Button>
- }
+ <div className="lg:m-4 p-4 flex flex-col lg:pl-16 lg:border-l">
+ <div className="grid lg:grid-cols-2">
+ <Button route={`/contractors/${item.contractorId}`} variant="outlined">
+ Перейти к контрагенту
+ </Button>
+ <Button onClick={handlePrint} variant="outlined">
+ Печать
+ </Button>
+ <span className="text-lg text-center mt-4">Итоговая сумма: ${item.total}</span>
+ <Button onClick={executed ? handleCancel : handleExecute} size="lg">
+ {executed ? 'Откатить' : 'Провести'}
+ </Button>
+ </div>
</div>
);
};