quasar-factory-lib 0.0.75 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Table/Table.vue.d.ts +286 -10
- package/dist/components/Table/components/AdvancedFilters/AdvancedFilters.vue.d.ts +116 -0
- package/dist/components/Table/components/AdvancedFilters/CheckBoxFilter.vue.d.ts +20 -0
- package/dist/components/Table/components/AdvancedFilters/DateFilter.vue.d.ts +20 -0
- package/dist/components/Table/components/AdvancedFilters/GridAdvancedFilters.vue.d.ts +122 -0
- package/dist/components/Table/components/AdvancedFilters/NumberFilter.vue.d.ts +20 -0
- package/dist/components/Table/components/AdvancedFilters/TextFilter.vue.d.ts +20 -0
- package/dist/components/Table/components/AdvancedFilters/TimeFilter.vue.d.ts +20 -0
- package/dist/components/Table/components/PopupEditNumber.vue.d.ts +2 -2
- package/dist/components/Table/components/PopupEditText.vue.d.ts +2 -2
- package/dist/components/Table/components/TableSlotBody.vue.d.ts +4 -4
- package/dist/components/Table/components/TableSlotGrid.vue.d.ts +4 -4
- package/dist/components/Table/components/TableSlotHeader.vue.d.ts +255 -1
- package/dist/components/TaskNavBar/BasicNavBar.vue.d.ts +1 -1
- package/dist/i18n/en/index.d.ts +1 -0
- package/dist/i18n/es/index.d.ts +1 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/layouts/PdaLayout.vue.d.ts +286 -10
- package/dist/pages/TablePage.vue.d.ts +310 -10
- package/dist/quasar-factory-lib.js +10779 -8518
- package/dist/quasar-factory-lib.umd.cjs +11 -11
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Table/Table.vue +57 -4
- package/src/components/Table/components/AdvancedFilters/AdvancedFilters.vue +77 -0
- package/src/components/Table/components/AdvancedFilters/CheckBoxFilter.vue +23 -0
- package/src/components/Table/components/AdvancedFilters/DateFilter.vue +63 -0
- package/src/components/Table/components/AdvancedFilters/GridAdvancedFilters.vue +100 -0
- package/src/components/Table/components/AdvancedFilters/NumberFilter.vue +33 -0
- package/src/components/Table/components/AdvancedFilters/TextFilter.vue +32 -0
- package/src/components/Table/components/AdvancedFilters/TimeFilter.vue +63 -0
- package/src/components/Table/components/TableSlotHeader.vue +24 -0
- package/src/components/Table/css/table.css +0 -2
- package/src/i18n/en/index.ts +3 -1
- package/src/i18n/es/index.ts +1 -0
- package/src/pages/TablePage.vue +39 -10
package/package.json
CHANGED
|
@@ -29,9 +29,29 @@
|
|
|
29
29
|
:loading="loading"
|
|
30
30
|
pagination.sync="0"
|
|
31
31
|
:grid-header="showGridHeader"
|
|
32
|
+
@update:selected="(details) => {
|
|
33
|
+
$emit('onUpdateSelected', details)
|
|
34
|
+
}"
|
|
32
35
|
>
|
|
33
36
|
<template #top-right="props">
|
|
34
37
|
<q-separator />
|
|
38
|
+
<div
|
|
39
|
+
v-if="showIconAdvancedFilter"
|
|
40
|
+
class="q-pr-lg float-left cursor-pointer no-wrap row items-center"
|
|
41
|
+
data-cy="advanced-filters-button"
|
|
42
|
+
@click="() => {
|
|
43
|
+
showAdvancedFilter = !showAdvancedFilter
|
|
44
|
+
}"
|
|
45
|
+
>
|
|
46
|
+
<q-icon
|
|
47
|
+
:name="showAdvancedFilter ? 'filter_alt_off' : 'filter_alt'"
|
|
48
|
+
size="md"
|
|
49
|
+
class="cursor-pointer items-center"
|
|
50
|
+
/>
|
|
51
|
+
<span v-if="!smallDevice">
|
|
52
|
+
{{ $t('table.advancedFilters') }}
|
|
53
|
+
</span>
|
|
54
|
+
</div>
|
|
35
55
|
<TableFilter
|
|
36
56
|
v-if="getTableInputSearchVisibility && !hideFilter"
|
|
37
57
|
ref="filterInput"
|
|
@@ -54,6 +74,8 @@
|
|
|
54
74
|
:table-props="props"
|
|
55
75
|
:selection-type="selectionType"
|
|
56
76
|
:small-device="smallDevice"
|
|
77
|
+
:show-advanced-filter="showAdvancedFilter"
|
|
78
|
+
:advancedFilters="advancedFiltersData"
|
|
57
79
|
/>
|
|
58
80
|
</template>
|
|
59
81
|
<template #body="props">
|
|
@@ -184,6 +206,15 @@ export default defineComponent({
|
|
|
184
206
|
additionalSortConditions: {
|
|
185
207
|
type: Function,
|
|
186
208
|
default: function () {}
|
|
209
|
+
},
|
|
210
|
+
advancedFilters: {
|
|
211
|
+
type: Object,
|
|
212
|
+
required: true,
|
|
213
|
+
deep: true
|
|
214
|
+
},
|
|
215
|
+
showIconAdvancedFilter: {
|
|
216
|
+
type: Boolean,
|
|
217
|
+
default: false
|
|
187
218
|
}
|
|
188
219
|
},
|
|
189
220
|
emits: [
|
|
@@ -201,7 +232,8 @@ export default defineComponent({
|
|
|
201
232
|
'pauseMaintenanceTicket',
|
|
202
233
|
'finishMaintenanceTicket',
|
|
203
234
|
'onRowClick',
|
|
204
|
-
'onClickIconToolTip'
|
|
235
|
+
'onClickIconToolTip',
|
|
236
|
+
'onUpdateSelected'
|
|
205
237
|
],
|
|
206
238
|
data () {
|
|
207
239
|
return {
|
|
@@ -216,7 +248,9 @@ export default defineComponent({
|
|
|
216
248
|
forceRender: false,
|
|
217
249
|
totalPage: 0,
|
|
218
250
|
pageSize: 20,
|
|
219
|
-
filteredRows: [] as object [] | []
|
|
251
|
+
filteredRows: [] as object [] | [],
|
|
252
|
+
showAdvancedFilter: false,
|
|
253
|
+
advancedFiltersData: this.advancedFilters
|
|
220
254
|
}
|
|
221
255
|
},
|
|
222
256
|
computed: {
|
|
@@ -249,6 +283,14 @@ export default defineComponent({
|
|
|
249
283
|
watch: {
|
|
250
284
|
rows (val) {
|
|
251
285
|
this.rowsData = val
|
|
286
|
+
},
|
|
287
|
+
advancedFilters (val) {
|
|
288
|
+
this.advancedFiltersData = val
|
|
289
|
+
},
|
|
290
|
+
showAdvancedFilter (val: boolean) {
|
|
291
|
+
if (!val) {
|
|
292
|
+
this.advancedFiltersData = {}
|
|
293
|
+
}
|
|
252
294
|
}
|
|
253
295
|
},
|
|
254
296
|
mounted () {
|
|
@@ -317,8 +359,6 @@ export default defineComponent({
|
|
|
317
359
|
}
|
|
318
360
|
if (this.additionalSortConditions && this.additionalSortConditions.toString().replace(/\s+/g, '') !== 'function(){}') {
|
|
319
361
|
data = this.additionalSortConditions(this.filteredRows, rows);
|
|
320
|
-
} else {
|
|
321
|
-
console.log('else sort')
|
|
322
362
|
}
|
|
323
363
|
this.getSortedData(sortBy, data, descending)
|
|
324
364
|
return data.slice(0, this.pageLength);
|
|
@@ -408,6 +448,19 @@ export default defineComponent({
|
|
|
408
448
|
if (this.additionalFilterConditions && this.additionalFilterConditions.toString().replace(/\s+/g, '') !== 'function(){}') {
|
|
409
449
|
filteredRows_ = this.additionalFilterConditions(this.rows, filteredRows_)
|
|
410
450
|
}
|
|
451
|
+
|
|
452
|
+
if (this.advancedFiltersData && Object.keys(this.advancedFiltersData).length > 0) {
|
|
453
|
+
filteredRows_ = filteredRows_.filter(row => {
|
|
454
|
+
return Object.keys(this.advancedFiltersData).every(key => {
|
|
455
|
+
const filterValue = this.advancedFiltersData[key]
|
|
456
|
+
if (filterValue === '' || filterValue === null || filterValue === undefined) {
|
|
457
|
+
return true
|
|
458
|
+
}
|
|
459
|
+
return String(row[key]).toLowerCase().includes(String(filterValue).toLowerCase())
|
|
460
|
+
})
|
|
461
|
+
})
|
|
462
|
+
}
|
|
463
|
+
|
|
411
464
|
this.filteredRows = filteredRows_
|
|
412
465
|
return filteredRows_.slice(0, this.pageLength)
|
|
413
466
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-tr
|
|
3
|
+
>
|
|
4
|
+
<q-th v-if="tableProps.selection !== 'none'" />
|
|
5
|
+
<q-th
|
|
6
|
+
v-for="col in tableProps.cols"
|
|
7
|
+
:key="col.name"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
style="
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
justify-content: left;
|
|
14
|
+
align-items: center;
|
|
15
|
+
min-width: 7rem;
|
|
16
|
+
"
|
|
17
|
+
>
|
|
18
|
+
<TextFilter
|
|
19
|
+
v-if="col.type === 'string' || col.type === 'textarea' || col.type === 'dateTime'"
|
|
20
|
+
:advancedFilters="advancedFilters"
|
|
21
|
+
:col="col"
|
|
22
|
+
/>
|
|
23
|
+
<CheckBoxFilter
|
|
24
|
+
v-if="col.type === 'boolean'"
|
|
25
|
+
:advancedFilters="advancedFilters"
|
|
26
|
+
:col="col"
|
|
27
|
+
/>
|
|
28
|
+
<NumberFilter
|
|
29
|
+
v-if="col.type === 'number' || col.type === 'decimal'"
|
|
30
|
+
:advancedFilters="advancedFilters"
|
|
31
|
+
:col="col"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<DateFilter
|
|
35
|
+
v-if="col.type === 'date'"
|
|
36
|
+
:advancedFilters="advancedFilters"
|
|
37
|
+
:col="col"
|
|
38
|
+
/>
|
|
39
|
+
<TimeFilter
|
|
40
|
+
v-if="col.type === 'time'"
|
|
41
|
+
:advancedFilters="advancedFilters"
|
|
42
|
+
:col="col"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</q-th>
|
|
46
|
+
</q-tr>
|
|
47
|
+
</template>
|
|
48
|
+
<script lang="ts">
|
|
49
|
+
import TextFilter from './TextFilter.vue'
|
|
50
|
+
import CheckBoxFilter from './CheckBoxFilter.vue'
|
|
51
|
+
import NumberFilter from './NumberFilter.vue'
|
|
52
|
+
import DateFilter from './DateFilter.vue'
|
|
53
|
+
import TimeFilter from './TimeFilter.vue'
|
|
54
|
+
|
|
55
|
+
export default {
|
|
56
|
+
name: 'AdvancedFilters',
|
|
57
|
+
components: {
|
|
58
|
+
TextFilter,
|
|
59
|
+
CheckBoxFilter,
|
|
60
|
+
NumberFilter,
|
|
61
|
+
DateFilter,
|
|
62
|
+
TimeFilter
|
|
63
|
+
},
|
|
64
|
+
props: {
|
|
65
|
+
tableProps: {
|
|
66
|
+
type: Object,
|
|
67
|
+
required: true
|
|
68
|
+
},
|
|
69
|
+
advancedFilters: {
|
|
70
|
+
type: Object,
|
|
71
|
+
required: true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
<style scoped>
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-checkbox
|
|
3
|
+
v-model="advancedFilters[col.name]"
|
|
4
|
+
color="primary"
|
|
5
|
+
:disable="col.disable"
|
|
6
|
+
:label="col.label"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
export default {
|
|
11
|
+
name: 'CheckBoxFilter',
|
|
12
|
+
props: {
|
|
13
|
+
col: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
advancedFilters: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-model="advancedFilters[col.name]"
|
|
4
|
+
filled
|
|
5
|
+
:data-cy="col.name + 'date-filter'"
|
|
6
|
+
debounce="200"
|
|
7
|
+
:label="col.label"
|
|
8
|
+
:placeholder="'DD/MM/YYYY'"
|
|
9
|
+
clearable
|
|
10
|
+
dense
|
|
11
|
+
:disable="col.disable"
|
|
12
|
+
style="min-width: 150px;"
|
|
13
|
+
>
|
|
14
|
+
<template #append>
|
|
15
|
+
<q-icon
|
|
16
|
+
name="event"
|
|
17
|
+
class="cursor-pointer"
|
|
18
|
+
:data-cy="col.name + 'date-button-filter'"
|
|
19
|
+
size="sm"
|
|
20
|
+
>
|
|
21
|
+
<q-popup-proxy
|
|
22
|
+
cover
|
|
23
|
+
transition-show="scale"
|
|
24
|
+
transition-hide="scale"
|
|
25
|
+
>
|
|
26
|
+
<q-date
|
|
27
|
+
v-model:model-value="advancedFilters[col.name]"
|
|
28
|
+
required=""
|
|
29
|
+
mask="DD/MM/YYYY"
|
|
30
|
+
flat
|
|
31
|
+
square
|
|
32
|
+
>
|
|
33
|
+
<div class="row items-center justify-end">
|
|
34
|
+
<q-btn
|
|
35
|
+
v-close-popup
|
|
36
|
+
:label="$t('close')"
|
|
37
|
+
color="primary"
|
|
38
|
+
flat
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</q-date>
|
|
42
|
+
</q-popup-proxy>
|
|
43
|
+
</q-icon>
|
|
44
|
+
</template>
|
|
45
|
+
</q-input>
|
|
46
|
+
</template>
|
|
47
|
+
<script lang="ts">
|
|
48
|
+
export default {
|
|
49
|
+
name: 'DateFilter',
|
|
50
|
+
props: {
|
|
51
|
+
col: {
|
|
52
|
+
type: Object,
|
|
53
|
+
required: true
|
|
54
|
+
},
|
|
55
|
+
advancedFilters: {
|
|
56
|
+
type: Object,
|
|
57
|
+
required: true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
<style scoped>
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-dialog
|
|
3
|
+
v-model="showDialog"
|
|
4
|
+
persistent
|
|
5
|
+
seamless
|
|
6
|
+
:position="'bottom'"
|
|
7
|
+
full-width
|
|
8
|
+
transition-show="slide-up"
|
|
9
|
+
transition-hide="slide-down">
|
|
10
|
+
<q-card id="card-advanced-filters">
|
|
11
|
+
<q-bar/>
|
|
12
|
+
<q-card-section style="max-height: 50vh" class="scroll">
|
|
13
|
+
<div class="row">
|
|
14
|
+
<div v-for="col in nonBooleanCols" class="col-xs-6 col-sm-4 col-md-3 q-px-xs q-py-xs"
|
|
15
|
+
:key="col.label">
|
|
16
|
+
|
|
17
|
+
<TextFilter
|
|
18
|
+
v-if="col.type === 'string' || col.type === 'textarea' || col.type === 'dateTime'"
|
|
19
|
+
:advancedFilters="advancedFilters"
|
|
20
|
+
:col="col"
|
|
21
|
+
/>
|
|
22
|
+
<NumberFilter
|
|
23
|
+
v-if="col.type === 'number' || col.type === 'decimal'"
|
|
24
|
+
:advancedFilters="advancedFilters"
|
|
25
|
+
:col="col"
|
|
26
|
+
/>
|
|
27
|
+
<DateFilter
|
|
28
|
+
v-if="col.type === 'date'"
|
|
29
|
+
:advancedFilters="advancedFilters"
|
|
30
|
+
:col="col"
|
|
31
|
+
/>
|
|
32
|
+
<TimeFilter
|
|
33
|
+
v-if="col.type === 'time'"
|
|
34
|
+
:advancedFilters="advancedFilters"
|
|
35
|
+
:col="col"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
<div v-for="col in booleanCols" class="col-xs-6 col-sm-4 col-md-3 q-px-xs q-py-xs"
|
|
39
|
+
:key="col.label">
|
|
40
|
+
<CheckBoxFilter
|
|
41
|
+
v-if="col.type === 'boolean'"
|
|
42
|
+
:advancedFilters="advancedFilters"
|
|
43
|
+
:col="col"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</q-card-section>
|
|
48
|
+
</q-card>
|
|
49
|
+
</q-dialog>
|
|
50
|
+
</template>
|
|
51
|
+
<script lang="ts">
|
|
52
|
+
import TextFilter from './TextFilter.vue'
|
|
53
|
+
import CheckBoxFilter from './CheckBoxFilter.vue'
|
|
54
|
+
import NumberFilter from './NumberFilter.vue'
|
|
55
|
+
import DateFilter from './DateFilter.vue'
|
|
56
|
+
import TimeFilter from './TimeFilter.vue'
|
|
57
|
+
|
|
58
|
+
export default {
|
|
59
|
+
name: 'GridAdvancedFilters',
|
|
60
|
+
components: {
|
|
61
|
+
TextFilter,
|
|
62
|
+
CheckBoxFilter,
|
|
63
|
+
NumberFilter,
|
|
64
|
+
DateFilter,
|
|
65
|
+
TimeFilter
|
|
66
|
+
},
|
|
67
|
+
props: {
|
|
68
|
+
tableProps: {
|
|
69
|
+
type: Object,
|
|
70
|
+
required: true
|
|
71
|
+
},
|
|
72
|
+
advancedFilters: {
|
|
73
|
+
type: Object,
|
|
74
|
+
required: true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
data () {
|
|
78
|
+
return {
|
|
79
|
+
showDialog: true,
|
|
80
|
+
maximizedToggle: false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
computed: {
|
|
84
|
+
booleanCols () {
|
|
85
|
+
return this.tableProps.cols.filter(col => col.type === 'boolean' && !col.disable);
|
|
86
|
+
},
|
|
87
|
+
nonBooleanCols () {
|
|
88
|
+
return this.tableProps.cols.filter(col => col.type !== 'boolean' && !col.disable);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</script>
|
|
93
|
+
<style scoped>
|
|
94
|
+
.q-card__section {
|
|
95
|
+
padding: 4px;
|
|
96
|
+
}
|
|
97
|
+
.q-field {
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-model="advancedFilters[col.name]"
|
|
4
|
+
clearable
|
|
5
|
+
filled
|
|
6
|
+
dense
|
|
7
|
+
type="number"
|
|
8
|
+
:label="col.label"
|
|
9
|
+
:step="col.type === 'decimal' ? '0.1' : '1'"
|
|
10
|
+
:data-cy="col.name + 'AdvancedFilter'"
|
|
11
|
+
debounce="200"
|
|
12
|
+
:min="0"
|
|
13
|
+
:disable="col.disable"
|
|
14
|
+
style="min-width: 150px;"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
export default {
|
|
19
|
+
name: 'NumberFilter',
|
|
20
|
+
props: {
|
|
21
|
+
col: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
advancedFilters: {
|
|
26
|
+
type: Object,
|
|
27
|
+
required: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
<style scoped>
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-model="advancedFilters[col.name]"
|
|
4
|
+
class="advancedFilter"
|
|
5
|
+
clearable
|
|
6
|
+
filled
|
|
7
|
+
dense
|
|
8
|
+
type="text"
|
|
9
|
+
:label="col.label"
|
|
10
|
+
:data-cy="col.name + 'AdvancedFilter'"
|
|
11
|
+
debounce="200"
|
|
12
|
+
:disable="col.disable"
|
|
13
|
+
style="min-width: 150px;"
|
|
14
|
+
/>
|
|
15
|
+
</template>
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
export default {
|
|
18
|
+
name: 'TextFilter',
|
|
19
|
+
props: {
|
|
20
|
+
col: {
|
|
21
|
+
type: Object,
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
advancedFilters: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
<style scoped>
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-model="advancedFilters[col.name]"
|
|
4
|
+
filled
|
|
5
|
+
dense
|
|
6
|
+
:data-cy="col.name + 'time-filter'"
|
|
7
|
+
debounce="200"
|
|
8
|
+
:label="col.label"
|
|
9
|
+
:placeholder="'HH:mm:ss'"
|
|
10
|
+
clearable
|
|
11
|
+
style="min-width: 150px;"
|
|
12
|
+
:disable="col.disable"
|
|
13
|
+
>
|
|
14
|
+
<template #append>
|
|
15
|
+
<q-icon
|
|
16
|
+
name="schedule"
|
|
17
|
+
class="cursor-pointer"
|
|
18
|
+
:data-cy="col.name + 'time-button-filter'"
|
|
19
|
+
size="md"
|
|
20
|
+
>
|
|
21
|
+
<q-popup-proxy
|
|
22
|
+
cover
|
|
23
|
+
transition-show="scale"
|
|
24
|
+
transition-hide="scale"
|
|
25
|
+
>
|
|
26
|
+
<q-time
|
|
27
|
+
v-model:model-value="advancedFilters[col.name]"
|
|
28
|
+
with-seconds
|
|
29
|
+
format24h
|
|
30
|
+
flat
|
|
31
|
+
square
|
|
32
|
+
>
|
|
33
|
+
<div class="row items-center justify-end">
|
|
34
|
+
<q-btn
|
|
35
|
+
v-close-popup
|
|
36
|
+
:label="$t('close')"
|
|
37
|
+
color="primary"
|
|
38
|
+
flat
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</q-time>
|
|
42
|
+
</q-popup-proxy>
|
|
43
|
+
</q-icon>
|
|
44
|
+
</template>
|
|
45
|
+
</q-input>
|
|
46
|
+
</template>
|
|
47
|
+
<script lang="ts">
|
|
48
|
+
export default {
|
|
49
|
+
name: 'TimeFilter',
|
|
50
|
+
props: {
|
|
51
|
+
col: {
|
|
52
|
+
type: Object,
|
|
53
|
+
required: true
|
|
54
|
+
},
|
|
55
|
+
advancedFilters: {
|
|
56
|
+
type: Object,
|
|
57
|
+
required: true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
<style scoped>
|
|
63
|
+
</style>
|
|
@@ -21,10 +21,26 @@
|
|
|
21
21
|
{{ col.label }}
|
|
22
22
|
</q-th>
|
|
23
23
|
</q-tr>
|
|
24
|
+
<AdvancedFilters
|
|
25
|
+
v-if="showAdvancedFilter && !smallDevice"
|
|
26
|
+
:tableProps="tablePropsData"
|
|
27
|
+
:advancedFilters="advancedFilters"
|
|
28
|
+
/>
|
|
29
|
+
<GridAdvancedFilters
|
|
30
|
+
v-if="showAdvancedFilter && smallDevice"
|
|
31
|
+
:tableProps="tablePropsData"
|
|
32
|
+
:advancedFilters="advancedFilters"
|
|
33
|
+
/>
|
|
24
34
|
</template>
|
|
25
35
|
<script lang="ts">
|
|
36
|
+
import AdvancedFilters from './AdvancedFilters/AdvancedFilters.vue'
|
|
37
|
+
import GridAdvancedFilters from './AdvancedFilters/GridAdvancedFilters.vue'
|
|
26
38
|
export default {
|
|
27
39
|
name: 'TableSlotHeader',
|
|
40
|
+
components: {
|
|
41
|
+
AdvancedFilters,
|
|
42
|
+
GridAdvancedFilters
|
|
43
|
+
},
|
|
28
44
|
props: {
|
|
29
45
|
tableProps: {
|
|
30
46
|
type: Object,
|
|
@@ -37,6 +53,14 @@ export default {
|
|
|
37
53
|
smallDevice: {
|
|
38
54
|
type: Boolean,
|
|
39
55
|
required: true
|
|
56
|
+
},
|
|
57
|
+
showAdvancedFilter: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
advancedFilters: {
|
|
62
|
+
type: Object,
|
|
63
|
+
required: true
|
|
40
64
|
}
|
|
41
65
|
},
|
|
42
66
|
data () {
|
package/src/i18n/en/index.ts
CHANGED