mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refactor 'product-table-footer' to 'table-totals'
This commit is contained in:
parent
14b11ecbbd
commit
e222aa8620
@ -106,9 +106,9 @@ class Design extends BaseDesign
|
||||
'id' => 'product-table',
|
||||
'elements' => $this->productTable(),
|
||||
],
|
||||
'product-table-footer' => [
|
||||
'id' => 'product-table-footer',
|
||||
'elements' => $this->tableFooter(),
|
||||
'table-totals' => [
|
||||
'id' => 'table-totals',
|
||||
'elements' => $this->tableTotals(),
|
||||
],
|
||||
'footer-elements' => [
|
||||
'id' => 'footer',
|
||||
@ -257,13 +257,13 @@ class Design extends BaseDesign
|
||||
return $elements;
|
||||
}
|
||||
|
||||
public function tableFooter()
|
||||
public function tableTotals(): array
|
||||
{
|
||||
$variables = $this->context['pdf_variables']['total_columns'];
|
||||
|
||||
$elements = [
|
||||
['element' => 'div', 'elements' => [
|
||||
['element' => 'span', 'content' => '$entity.public_notes', 'properties' => ['data-element' => 'product-table-public-notes-label']],
|
||||
['element' => 'span', 'content' => '$entity.public_notes', 'properties' => ['data-element' => 'total-table-public-notes-label']],
|
||||
]],
|
||||
];
|
||||
|
||||
|
@ -88,11 +88,11 @@
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#product-table-footer {
|
||||
#table-totals {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
#product-table-footer > * {
|
||||
#table-totals > * {
|
||||
display: grid;
|
||||
grid-template-columns: 3fr 1fr 1fr;
|
||||
padding-top: .5rem;
|
||||
@ -100,16 +100,16 @@
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
#product-table-footer
|
||||
#table-totals
|
||||
> *
|
||||
[data-element='product-table-balance-due-label'],
|
||||
#product-table-footer
|
||||
[data-element='total-table-balance-due-label'],
|
||||
#table-totals
|
||||
> *
|
||||
[data-element='product-table-balance-due'] {
|
||||
[data-element='total-table-balance-due'] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#product-table-footer > * > :last-child {
|
||||
#table-totals > * > :last-child {
|
||||
text-align: right;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
@ -137,7 +137,7 @@
|
||||
|
||||
<table id="product-table" cellspacing="0"></table>
|
||||
|
||||
<div id="product-table-footer" cellspacing="0"></div>
|
||||
<div id="table-totals" cellspacing="0"></div>
|
||||
</div>
|
||||
|
||||
<div id="footer"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user