diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-16 18:36:17 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-16 18:36:17 +0530 |
commit | 1b3702b241f02ab16c3b5366acb47cefbf089521 (patch) | |
tree | a1f107cbf7b8c4f5800d94fc8add8f34d997ca24 /src/components/tables | |
parent | 5f8407ae4c60922057e2f88f65178773786bddb4 (diff) |
minor bug fixes in ItemPicker input
Diffstat (limited to 'src/components/tables')
-rw-r--r-- | src/components/tables/invoice-item-table.js | 2 | ||||
-rw-r--r-- | src/components/tables/invoice-summary.js | 7 | ||||
-rw-r--r-- | src/components/tables/item-table.js | 2 | ||||
-rw-r--r-- | src/components/tables/scss/summary.scss | 25 | ||||
-rw-r--r-- | src/components/tables/scss/table.scss | 2 |
5 files changed, 32 insertions, 6 deletions
diff --git a/src/components/tables/invoice-item-table.js b/src/components/tables/invoice-item-table.js index d008ebc..865b326 100644 --- a/src/components/tables/invoice-item-table.js +++ b/src/components/tables/invoice-item-table.js @@ -38,7 +38,7 @@ const ItemTable = ({items, setItems, isInterstate, sum}) => { */ return ( <> - <table> + <table className={"item-table"}> <thead> <tr> <th>S. No</th> diff --git a/src/components/tables/invoice-summary.js b/src/components/tables/invoice-summary.js index 7018d50..a5c594f 100644 --- a/src/components/tables/invoice-summary.js +++ b/src/components/tables/invoice-summary.js @@ -15,16 +15,17 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import './scss/summary.scss'; import { currency } from '../../classes/item'; -const InvoiceSummary = ({sum}) => { +const InvoiceSummary = ({sum, roundOff}) => { const totalRoundedOff = currency(sum.Amount !== undefined ? Math.round(sum.Amount.value) : 0.00); - const roundedOffDiff = sum.Amount !== undefined ? sum.Amount.subtract(totalRoundedOff) : currency(0.00); + const roundedOffDiff = sum.Amount !== undefined && roundOff ? sum.Amount.subtract(totalRoundedOff) : currency(0.00); return ( <> <h1>Summary:</h1> - <table> + <table className={"summary-table"}> <tbody> {sum.UnitPrice !== undefined && <tr> diff --git a/src/components/tables/item-table.js b/src/components/tables/item-table.js index 5a405a5..2fb7210 100644 --- a/src/components/tables/item-table.js +++ b/src/components/tables/item-table.js @@ -39,7 +39,7 @@ const ItemTable = (props) => { } return ( - <table> + <table className={"item-table"}> <thead> <tr> <th>S. No</th> diff --git a/src/components/tables/scss/summary.scss b/src/components/tables/scss/summary.scss new file mode 100644 index 0000000..d5714f9 --- /dev/null +++ b/src/components/tables/scss/summary.scss @@ -0,0 +1,25 @@ +/* OpenBills-web - Web based libre billing software + * Copyright (C) 2022 Vidhu Kant Sharma <vidhukant@vidhukant.xyz> + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +@import "colors"; + +table.summary-table { + min-width: 25rem; + tr:hover { + background-color: rgba($thColor, 0.4); + } +} diff --git a/src/components/tables/scss/table.scss b/src/components/tables/scss/table.scss index 0bb5a48..d201a49 100644 --- a/src/components/tables/scss/table.scss +++ b/src/components/tables/scss/table.scss @@ -17,7 +17,7 @@ @import "colors"; -table { +table.item-table { width: 90%; margin: auto; |