summaryrefslogtreecommitdiff
path: root/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue')
-rw-r--r--src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue b/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue
index 63b74bc9..c0e8cff9 100644
--- a/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue
+++ b/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue
@@ -2,10 +2,17 @@
<b-container fluid="xl">
<page-title />
<b-row class="align-items-start">
- <b-col sm="8" xl="6" class="search-block d-sm-flex align-items-end mb-4">
+ <b-col
+ sm="12"
+ xl="6"
+ class="search-block-1200 d-sm-flex align-items-end mb-4"
+ >
<search
:placeholder="$t('pagePostCodeLogs.table.searchLogs')"
+ :show-search-by="true"
+ :select-options="searchSelectOptions"
@change-search="onChangeSearchInput"
+ @search-by="onSearchBy"
@clear-search="onClearSearchInput"
/>
<div class="ml-sm-4">
@@ -65,6 +72,8 @@
:per-page="perPage"
:current-page="currentPage"
:filter="searchFilter"
+ :filter-included-fields="filterIncludedFields"
+ :filter-debounce="300"
:busy="isBusy"
@filtered="onFiltered"
@row-selected="onRowSelected($event, filteredLogs.length)"
@@ -239,6 +248,17 @@ export default {
tdClass: 'text-right text-nowrap',
},
],
+ searchSelectOptions: [
+ {
+ value: 'all',
+ text: this.$t('pagePostCodeLogs.table.all'),
+ },
+ {
+ value: 'bootCount',
+ text: this.$t('pagePostCodeLogs.table.bootCount'),
+ },
+ { value: 'postCode', text: this.$t('pagePostCodeLogs.table.postCode') },
+ ],
expandRowLabel,
activeFilters: [],
currentPage: currentPage,
@@ -247,6 +267,7 @@ export default {
itemsPerPageOptions: itemsPerPageOptions,
perPage: perPage,
searchFilter: searchFilter,
+ filterIncludedFields: null,
searchTotalFilteredRows: 0,
selectedRows: selectedRows,
tableHeaderCheckboxModel: tableHeaderCheckboxModel,
@@ -306,6 +327,9 @@ export default {
});
},
methods: {
+ onSearchBy(field) {
+ this.filterIncludedFields = field === 'all' ? null : [field];
+ },
exportAllLogsString() {
{
return this.$store.getters['postCodeLogs/allPostCodes'].map(