From c5145eea70dad924db3a9608196345d30c6b4d1c Mon Sep 17 00:00:00 2001 From: Anchit Nayak <113703908+Anchit-Nayak@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:40:28 +0530 Subject: [PATCH] fix: responsiveness of create new invoice form --- .../src/modules/ErpPanelModule/ItemRow.jsx | 78 ++++++++++----- .../InvoiceModule/Forms/InvoiceForm.jsx | 98 +++++++------------ 2 files changed, 86 insertions(+), 90 deletions(-) diff --git a/frontend/src/modules/ErpPanelModule/ItemRow.jsx b/frontend/src/modules/ErpPanelModule/ItemRow.jsx index 5ac84c536..e2f3a8f42 100644 --- a/frontend/src/modules/ErpPanelModule/ItemRow.jsx +++ b/frontend/src/modules/ErpPanelModule/ItemRow.jsx @@ -4,8 +4,10 @@ import { Form, Input, InputNumber, Row, Col } from 'antd'; import { DeleteOutlined } from '@ant-design/icons'; import { useMoney, useDate } from '@/settings'; import calculate from '@/utils/calculate'; +import useLanguage from '@/locale/useLanguage'; export default function ItemRow({ field, remove, current = null }) { + const translate = useLanguage(); const [totalState, setTotal] = useState(undefined); const [price, setPrice] = useState(0); const [quantity, setQuantity] = useState(0); @@ -53,16 +55,17 @@ export default function ItemRow({ field, remove, current = null }) { return ( - + - - - + + + + - - + + + - - + + + - - - - - money.amountFormatter({ amount: value, currency_code: money.currency_code }) - } - /> - + + + + + money.amountFormatter({ amount: value, currency_code: money.currency_code }) + } + /> -
- remove(field.name)} /> +
+ remove(field.name)} + style={{ + fontSize: '18px', + cursor: 'pointer', + }}/>
+ ); } diff --git a/frontend/src/modules/InvoiceModule/Forms/InvoiceForm.jsx b/frontend/src/modules/InvoiceModule/Forms/InvoiceForm.jsx index 33043bb7e..67418d6c5 100644 --- a/frontend/src/modules/InvoiceModule/Forms/InvoiceForm.jsx +++ b/frontend/src/modules/InvoiceModule/Forms/InvoiceForm.jsx @@ -63,18 +63,18 @@ function LoadInvoiceForm({ subTotal = 0, current = null }) { addField.current.click(); }, []); + const sm = 576; + const md = 768; + const lg = 992; + return ( <> - + - + - + - - + + /> - - + - + - + - - + {/* +

{translate('Item')}

- +

{translate('Description')}

- -

{translate('Quantity')}

{' '} + +

{translate('Quantity')}

- +

{translate('Price')}

- +

{translate('Total')}

-
+
*/} {(fields, { add, remove }) => ( <> @@ -211,16 +187,16 @@ function LoadInvoiceForm({ subTotal = 0, current = null }) { )} -
+
- + - +

- + - + - + - +

- +