From 5992702799eaf7a71cde83112c1ce478c893377b Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Thu, 18 Mar 2021 13:26:46 +0300
Subject: feat: adapt Forms for mobile

---
 src/containers/WaybillPanel.tsx | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

(limited to 'src/containers/WaybillPanel.tsx')

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>
   );
 };
-- 
cgit v1.2.3

