refs #4962 autoload added and second header
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
fb4432b088
commit
98c9e0ac50
|
@ -147,7 +147,7 @@ export default class SmartTable extends Component {
|
||||||
for (const column of this.columns) {
|
for (const column of this.columns) {
|
||||||
if (viewConfig.configuration[column.field] == false) {
|
if (viewConfig.configuration[column.field] == false) {
|
||||||
const baseSelector = `smart-table[view-config-id="${this.viewConfigId}"] table`;
|
const baseSelector = `smart-table[view-config-id="${this.viewConfigId}"] table`;
|
||||||
selectors.push(`${baseSelector} thead > tr > th:nth-child(${column.index + 1})`);
|
selectors.push(`${baseSelector} thead > tr:not([second-header]) > th:nth-child(${column.index + 1})`);
|
||||||
selectors.push(`${baseSelector} tbody > tr > td:nth-child(${column.index + 1})`);
|
selectors.push(`${baseSelector} tbody > tr > td:nth-child(${column.index + 1})`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ export default class SmartTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
registerColumns() {
|
registerColumns() {
|
||||||
const header = this.element.querySelector('thead > tr');
|
const header = this.element.querySelector('thead > tr:not([second-header])');
|
||||||
if (!header) return;
|
if (!header) return;
|
||||||
const columns = header.querySelectorAll('th');
|
const columns = header.querySelectorAll('th');
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ export default class SmartTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
emptyDataRows() {
|
emptyDataRows() {
|
||||||
const header = this.element.querySelector('thead > tr');
|
const header = this.element.querySelector('thead > tr:not([second-header])');
|
||||||
const columns = header.querySelectorAll('th');
|
const columns = header.querySelectorAll('th');
|
||||||
const tbody = this.element.querySelector('tbody');
|
const tbody = this.element.querySelector('tbody');
|
||||||
if (tbody) {
|
if (tbody) {
|
||||||
|
@ -333,7 +333,7 @@ export default class SmartTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
displaySearch() {
|
displaySearch() {
|
||||||
const header = this.element.querySelector('thead > tr');
|
const header = this.element.querySelector('thead > tr:not([second-header])');
|
||||||
if (!header) return;
|
if (!header) return;
|
||||||
|
|
||||||
const tbody = this.element.querySelector('tbody');
|
const tbody = this.element.querySelector('tbody');
|
||||||
|
|
|
@ -8,6 +8,16 @@ smart-table table {
|
||||||
& > thead {
|
& > thead {
|
||||||
border-bottom: $border;
|
border-bottom: $border;
|
||||||
|
|
||||||
|
& > tr[second-header] {
|
||||||
|
& > th
|
||||||
|
{
|
||||||
|
text-align: center;
|
||||||
|
border-bottom-style: groove;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
& > * > th {
|
& > * > th {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +70,9 @@ smart-table table {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&[separator]{
|
||||||
|
border-left-style: groove;
|
||||||
|
}
|
||||||
vn-icon.bright, i.bright {
|
vn-icon.bright, i.bright {
|
||||||
color: #f7931e;
|
color: #f7931e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
<vn-horizontal class="vn-px-lg">
|
<vn-horizontal class="vn-px-lg">
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
vn-one
|
vn-one
|
||||||
label="Max Lines"
|
label="Max Liters"
|
||||||
ng-model="filter.lines">
|
ng-model="filter.liters">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
vn-one
|
vn-one
|
||||||
label="Max Liters"
|
label="Max Lines"
|
||||||
ng-model="filter.liters">
|
ng-model="filter.lines">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal class="vn-px-lg">
|
<vn-horizontal class="vn-px-lg">
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<vn-crud-model
|
<vn-crud-model
|
||||||
vn-id="model"
|
vn-id="model"
|
||||||
url="Tickets/getTicketsFuture"
|
url="Tickets/getTicketsFuture"
|
||||||
limit="20">
|
limit="20"
|
||||||
|
auto-load="true"
|
||||||
|
params="model.data">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-portal slot="topbar">
|
<vn-portal slot="topbar">
|
||||||
<vn-searchbar
|
<vn-searchbar
|
||||||
|
@ -30,6 +32,11 @@
|
||||||
<slot-table>
|
<slot-table>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr second-header>
|
||||||
|
<td></td>
|
||||||
|
<th colspan="7" translate>Origin</th>
|
||||||
|
<th colspan="4" translate>Destination</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th shrink>
|
<th shrink>
|
||||||
<vn-multi-check
|
<vn-multi-check
|
||||||
|
@ -42,35 +49,35 @@
|
||||||
<span translate>Problems</span>
|
<span translate>Problems</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="id">
|
<th field="id">
|
||||||
<span translate>Origin ID</span>
|
<span translate>ID</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="shipped">
|
<th field="shipped">
|
||||||
<span translate>Origin Date</span>
|
<span translate>Date</span>
|
||||||
</th>
|
|
||||||
<th field="state">
|
|
||||||
<span translate>Origin State</span>
|
|
||||||
</th>
|
</th>
|
||||||
<th field="ipt" title="Item Packing Type">
|
<th field="ipt" title="Item Packing Type">
|
||||||
<span>IPT</span>
|
<span>IPT</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th field="state">
|
||||||
|
<span translate>State</span>
|
||||||
|
</th>
|
||||||
<th field="liters">
|
<th field="liters">
|
||||||
<span translate>Liters</span>
|
<span translate>Liters</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="lines">
|
<th shrink field="lines">
|
||||||
<span translate>Available Lines</span>
|
<span translate>Available Lines</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="ticketFuture">
|
<th field="ticketFuture" separator>
|
||||||
<span translate>Destination ID</span>
|
<span translate>ID</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="tfShipped">
|
<th field="tfShipped">
|
||||||
<span translate>Destination Date</span>
|
<span translate>Date</span>
|
||||||
</th>
|
|
||||||
<th field="tfState">
|
|
||||||
<span translate>Destination State</span>
|
|
||||||
</th>
|
</th>
|
||||||
<th field="tfIpt" title="Item Packing Type">
|
<th field="tfIpt" title="Item Packing Type">
|
||||||
<span>IPT</span>
|
<span>IPT</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th shrink field="tfState">
|
||||||
|
<span translate>State</span>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -129,13 +136,13 @@
|
||||||
{{::ticket.shipped | date: 'dd/MM/yyyy'}}
|
{{::ticket.shipped | date: 'dd/MM/yyyy'}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{{::ticket.ipt}}</td>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
class="chip {{$ctrl.stateColor(ticket.state)}}">
|
class="chip {{$ctrl.stateColor(ticket.state)}}">
|
||||||
{{::ticket.state}}
|
{{::ticket.state}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>{{::ticket.ipt}}</td>
|
|
||||||
<td>{{::ticket.liters}}</td>
|
<td>{{::ticket.liters}}</td>
|
||||||
<td>{{::ticket.lines}}</td>
|
<td>{{::ticket.lines}}</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -150,13 +157,13 @@
|
||||||
{{::ticket.tfShipped | date: 'dd/MM/yyyy'}}
|
{{::ticket.tfShipped | date: 'dd/MM/yyyy'}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{{::ticket.tfIpt}}</td>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
class="chip {{$ctrl.stateColor(ticket.tfState)}}">
|
class="chip {{$ctrl.stateColor(ticket.tfState)}}">
|
||||||
{{::ticket.tfState}}
|
{{::ticket.tfState}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>{{::ticket.tfIpt}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default class Controller extends Section {
|
||||||
autocomplete: {
|
autocomplete: {
|
||||||
url: 'ItemPackingTypes',
|
url: 'ItemPackingTypes',
|
||||||
showField: 'description',
|
showField: 'description',
|
||||||
valueField: 'description'
|
valueField: 'code'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ export default class Controller extends Section {
|
||||||
autocomplete: {
|
autocomplete: {
|
||||||
url: 'ItemPackingTypes',
|
url: 'ItemPackingTypes',
|
||||||
showField: 'description',
|
showField: 'description',
|
||||||
valueField: 'description'
|
valueField: 'code'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -59,6 +59,9 @@ export default class Controller extends Section {
|
||||||
futureDated: today,
|
futureDated: today,
|
||||||
warehouseFk: this.vnConfig.warehouseFk
|
warehouseFk: this.vnConfig.warehouseFk
|
||||||
};
|
};
|
||||||
|
this.$.model = {
|
||||||
|
data: this.filterParams
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
compareDate(date) {
|
compareDate(date) {
|
||||||
|
|
Loading…
Reference in New Issue