From 98c9e0ac50226fa153537ff93ec77814889bf0bf Mon Sep 17 00:00:00 2001 From: alexandre Date: Fri, 16 Dec 2022 13:42:23 +0100 Subject: [PATCH] refs #4962 autoload added and second header --- front/core/components/smart-table/index.js | 8 ++-- front/core/components/smart-table/table.scss | 15 +++++++- .../front/future-search-panel/index.html | 8 ++-- modules/ticket/front/future/index.html | 37 +++++++++++-------- modules/ticket/front/future/index.js | 7 +++- 5 files changed, 49 insertions(+), 26 deletions(-) diff --git a/front/core/components/smart-table/index.js b/front/core/components/smart-table/index.js index 8d2c3c153..770dcdf32 100644 --- a/front/core/components/smart-table/index.js +++ b/front/core/components/smart-table/index.js @@ -147,7 +147,7 @@ export default class SmartTable extends Component { for (const column of this.columns) { if (viewConfig.configuration[column.field] == false) { 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})`); } } @@ -235,7 +235,7 @@ export default class SmartTable extends Component { } registerColumns() { - const header = this.element.querySelector('thead > tr'); + const header = this.element.querySelector('thead > tr:not([second-header])'); if (!header) return; const columns = header.querySelectorAll('th'); @@ -254,7 +254,7 @@ export default class SmartTable extends Component { } emptyDataRows() { - const header = this.element.querySelector('thead > tr'); + const header = this.element.querySelector('thead > tr:not([second-header])'); const columns = header.querySelectorAll('th'); const tbody = this.element.querySelector('tbody'); if (tbody) { @@ -333,7 +333,7 @@ export default class SmartTable extends Component { } displaySearch() { - const header = this.element.querySelector('thead > tr'); + const header = this.element.querySelector('thead > tr:not([second-header])'); if (!header) return; const tbody = this.element.querySelector('tbody'); diff --git a/front/core/components/smart-table/table.scss b/front/core/components/smart-table/table.scss index c38c149ca..996c41a74 100644 --- a/front/core/components/smart-table/table.scss +++ b/front/core/components/smart-table/table.scss @@ -8,6 +8,16 @@ smart-table table { & > thead { border-bottom: $border; + & > tr[second-header] { + & > th + { + text-align: center; + border-bottom-style: groove; + font-weight: bold; + text-transform: uppercase; + } + } + & > * > th { font-weight: normal; } @@ -60,6 +70,9 @@ smart-table table { vertical-align: middle; } } + &[separator]{ + border-left-style: groove; + } vn-icon.bright, i.bright { color: #f7931e; } @@ -108,4 +121,4 @@ smart-table table { font-size: 1.375rem; text-align: center; } -} \ No newline at end of file +} diff --git a/modules/ticket/front/future-search-panel/index.html b/modules/ticket/front/future-search-panel/index.html index 93e046236..c4df33ec4 100644 --- a/modules/ticket/front/future-search-panel/index.html +++ b/modules/ticket/front/future-search-panel/index.html @@ -17,13 +17,13 @@ + label="Max Liters" + ng-model="filter.liters"> + label="Max Lines" + ng-model="filter.lines"> diff --git a/modules/ticket/front/future/index.html b/modules/ticket/front/future/index.html index 0b1912084..8633e7a38 100644 --- a/modules/ticket/front/future/index.html +++ b/modules/ticket/front/future/index.html @@ -1,7 +1,9 @@ + limit="20" + auto-load="true" + params="model.data"> + + + + + - + - - - + @@ -129,13 +136,13 @@ {{::ticket.shipped | date: 'dd/MM/yyyy'}} + - + -
OriginDestination
Problems - Origin ID + ID - Origin Date - - Origin State + Date IPT + State + Liters + Available Lines - Destination ID + + ID - Destination Date - - Destination State + Date IPT + State +
{{::ticket.ipt}} {{::ticket.state}} {{::ticket.ipt}} {{::ticket.liters}} {{::ticket.lines}} @@ -150,13 +157,13 @@ {{::ticket.tfShipped | date: 'dd/MM/yyyy'}} {{::ticket.tfIpt}} {{::ticket.tfState}} {{::ticket.tfIpt}}
diff --git a/modules/ticket/front/future/index.js b/modules/ticket/front/future/index.js index 918ed79b5..3489c92ad 100644 --- a/modules/ticket/front/future/index.js +++ b/modules/ticket/front/future/index.js @@ -35,7 +35,7 @@ export default class Controller extends Section { autocomplete: { url: 'ItemPackingTypes', showField: 'description', - valueField: 'description' + valueField: 'code' } }, { @@ -43,7 +43,7 @@ export default class Controller extends Section { autocomplete: { url: 'ItemPackingTypes', showField: 'description', - valueField: 'description' + valueField: 'code' } }, ] @@ -59,6 +59,9 @@ export default class Controller extends Section { futureDated: today, warehouseFk: this.vnConfig.warehouseFk }; + this.$.model = { + data: this.filterParams + }; } compareDate(date) {