quasar-factory-lib 0.1.18 → 0.1.19

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/package.json CHANGED
@@ -98,6 +98,6 @@
98
98
  "release": "standard-version"
99
99
  },
100
100
  "type": "module",
101
- "version": "0.1.18",
101
+ "version": "0.1.19",
102
102
  "author": ""
103
103
  }
@@ -0,0 +1,565 @@
1
+ <template lang="">
2
+ <div>
3
+ <q-table
4
+ v-show="!showSkeleton"
5
+ ref="myTable"
6
+ v-model:selected="selected"
7
+ class="my-table"
8
+ :grid="smallDevice"
9
+ :style="tableStyle"
10
+ flat
11
+ :filter-method="customFilter"
12
+ bordered
13
+ :rows="rowsData"
14
+ :columns="columns"
15
+ :row-key="rowKey"
16
+ :rows-per-page-options="rowsPerPageOptions"
17
+ :selection="selectionType"
18
+ :visible-columns="visibleColumns"
19
+ table-class="text-grey-9"
20
+ table-header-class="main-color"
21
+ :filter="filterComputed"
22
+ :sort-method="customSortMethod"
23
+ separator="horizontal"
24
+ binary-state-sort
25
+ :selected-rows-label="getSelectedString"
26
+ :loading="loading"
27
+ pagination.sync="0"
28
+ :grid-header="showGridHeader"
29
+ @update:selected="(details) => {
30
+ $emit('onUpdateSelected', details)
31
+ }"
32
+ >
33
+ <template #top-right="props">
34
+ <q-separator />
35
+ <div
36
+ v-if="showIconAdvancedFilter"
37
+ class="q-pr-lg float-left cursor-pointer no-wrap row items-center"
38
+ data-cy="advanced-filters-button"
39
+ @click="() => {
40
+ showAdvancedFilter = !showAdvancedFilter
41
+ }"
42
+ >
43
+ <q-icon
44
+ :name="showAdvancedFilter ? 'filter_alt_off' : 'filter_alt'"
45
+ size="md"
46
+ class="cursor-pointer items-center"
47
+ />
48
+ <span v-if="!smallDevice">
49
+ {{ $t('table.advancedFilters') }}
50
+ </span>
51
+ </div>
52
+ <TableFilter
53
+ v-if="getTableInputSearchVisibility && !hideFilter"
54
+ ref="filterInput"
55
+ class="q-pl-xs"
56
+ :table-props="props"
57
+ :store="store"
58
+ @input-focus="filterInputFocus"
59
+ />
60
+ <TableColumnsSelector
61
+ v-if="getColumnsSelectorVisibility && !hideColumnsSelector "
62
+ class="q-pl-xs"
63
+ :table-props="props"
64
+ :columns="columns"
65
+ :visible-columns="visibleColumns"
66
+ @on-select-visible-columns="onSelectVisibleColumns"
67
+ />
68
+ </template>
69
+ <template #header="props">
70
+ <TableSlotHeader
71
+ :table-props="props"
72
+ :selection-type="selectionType"
73
+ :small-device="smallDevice"
74
+ :show-advanced-filter="showAdvancedFilter"
75
+ :advancedFilters="advancedFiltersData"
76
+ :filteredRowsLength="filteredRows.length"
77
+ />
78
+ </template>
79
+ <template #body="props">
80
+ <TableSlotBody
81
+ v-if="!showSkeleton"
82
+ :table-props="props"
83
+ :selection-type="selectionType"
84
+ :getCellClass="getCellClass"
85
+ @on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
86
+ @on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
87
+ @on-save-value-popup-edit="onSaveValuePopupEdit"
88
+ @on-click-button="onClickButton"
89
+ @on-click-icon-tool-tip="onClickIconToolTip"
90
+ @click="onRowClick(props.row)"
91
+ />
92
+ </template>
93
+ <template #item="props">
94
+ <TableSlotGrid
95
+ v-if="!showSkeleton"
96
+ :table-props="props"
97
+ :selection-type="selectionType"
98
+ :popup-edit-number-options="popupEditNumberOptions"
99
+ :getCellClass="getCellClass"
100
+ @on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
101
+ @on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
102
+ @on-save-value-popup-edit="onSaveValuePopupEdit"
103
+ @on-click-button="onClickButton"
104
+ @on-click-icon-tool-tip="onClickIconToolTip"
105
+ @click="onRowClick(props.row)"
106
+ />
107
+ </template>
108
+ </q-table>
109
+ <TableSkeleton
110
+ v-show="getTableSkeletonVisibility"
111
+ id="tableSkeleton"
112
+ />
113
+ <CardListSkeleton
114
+ v-show="getGridSkeletonVisibility"
115
+ id="cardListSkeleton"
116
+ />
117
+ </div>
118
+ </template>
119
+ <script lang="ts">
120
+ import { defineComponent } from 'vue'
121
+ import TableSlotHeader from './components/TableSlotHeader.vue'
122
+ import TableColumnsSelector from './components/TableColumnsSelector.vue'
123
+ import TableSlotBody from './components/TableSlotBody.vue'
124
+ import TableSlotGrid from './components/TableSlotGrid.vue'
125
+ import TableFilter from './components/TableFilter.vue'
126
+ import TableSkeleton from './components/TableSkeleton.vue'
127
+ import CardListSkeleton from './components/CardListSkeleton.vue'
128
+ import {useDraggable} from 'vue-draggable-plus'
129
+
130
+ export default defineComponent({
131
+ components: {
132
+ TableSlotHeader,
133
+ TableColumnsSelector,
134
+ TableSlotBody,
135
+ TableSlotGrid,
136
+ TableFilter,
137
+ TableSkeleton,
138
+ CardListSkeleton
139
+ },
140
+ props: {
141
+ columns: {
142
+ type: Array as () => object[],
143
+ required: true
144
+ },
145
+ rows: {
146
+ type: Array as () => object[],
147
+ required: true
148
+ },
149
+ visibleColumns: {
150
+ type: Array as () => string[],
151
+ required: true
152
+ },
153
+ selectionType: {
154
+ type: String as () => 'none' | 'single' | 'multiple',
155
+ default: 'none'
156
+ },
157
+ rowKey: {
158
+ type: String,
159
+ default: 'id'
160
+ },
161
+ tableStyle: {
162
+ type: String,
163
+ default: ''
164
+ },
165
+ popupEditNumberOptions: {
166
+ type: Array,
167
+ default: () => []
168
+ },
169
+ smallDevice: {
170
+ type: Boolean,
171
+ required: true
172
+ },
173
+ store: {
174
+ type: Object,
175
+ required: true
176
+ },
177
+ tableId: {
178
+ type: String,
179
+ default: ''
180
+ },
181
+ hideColumnsSelector: {
182
+ type: Boolean,
183
+ default: false
184
+ },
185
+ hideFilter: {
186
+ type: Boolean,
187
+ default: false
188
+ },
189
+ showSkeleton: {
190
+ type: Boolean
191
+ },
192
+ getCellClass: {
193
+ type: Function,
194
+ default: function () {}
195
+ },
196
+ // Needs to be used with additionalFilterConditions and additionalSortConditions
197
+ filterComputedOptions: {
198
+ type: Object,
199
+ default: {}
200
+ },
201
+ additionalFilterConditions: {
202
+ type: Function,
203
+ default: function () {}
204
+ },
205
+ additionalSortConditions: {
206
+ type: Function,
207
+ default: function () {}
208
+ },
209
+ showIconAdvancedFilter: {
210
+ type: Boolean,
211
+ default: false
212
+ },
213
+ rowsPerPageOptions: {
214
+ type: Array,
215
+ default: () => [0]
216
+
217
+ }
218
+ },
219
+ emits: [
220
+ 'onSelectVisibleColumns',
221
+ 'onUpdateBasicCheckboxValue',
222
+ 'onUpdateCustomizedCheckboxValue',
223
+ 'onSaveValuePopupEdit',
224
+ 'onClickButton',
225
+ 'storeUpdated',
226
+ 'deleteItem',
227
+ 'openModalWithTable',
228
+ 'setItemNotFound',
229
+ 'onClickSeeTaskDetails',
230
+ 'startMaintenanceTicket',
231
+ 'pauseMaintenanceTicket',
232
+ 'finishMaintenanceTicket',
233
+ 'onRowClick',
234
+ 'onClickIconToolTip',
235
+ 'onUpdateSelected',
236
+ 'setLineRemainingQty',
237
+ 'setLineNoStock',
238
+ 'onDoneLineMaintenanceTasks',
239
+ 'reprintSULabel',
240
+ 'onDragStart',
241
+ 'onDragUpdate',
242
+ 'onDragEnd',
243
+ 'modifyPriorityOrder',
244
+ 'onClickRowBtnPrintOP',
245
+ 'getPOFromWorkCenter',
246
+ 'getProductionTimesMachineCenter',
247
+ 'operatorMachineAssignmentAssignMachine',
248
+ 'operatorMachineAssignmentSetDate',
249
+ 'operatorMachineAssignmentSetPartialMachineCenter',
250
+ 'operatorMachineAssignmentSeeDetail',
251
+ 'onClickOpenDialogOperators'
252
+
253
+ ],
254
+ data () {
255
+ return {
256
+ selected: [],
257
+ filter: '',
258
+ rowsData: [] as object[],
259
+ gridRowsSelected: false,
260
+ selectedRows: [] as number[],
261
+ showColumnsSelector: false,
262
+ showSearch: false,
263
+ loading: false,
264
+ forceRender: false,
265
+ totalPage: 0,
266
+ pageSize: 20,
267
+ filteredRows: [] as object [] | [],
268
+ showAdvancedFilter: false,
269
+ advancedFiltersData: {},
270
+ tableRef: null,
271
+ draggableInstance: null,
272
+ disabled: false,
273
+ enableDragAndDrop: false,
274
+ dragAndDropDelay: 0
275
+ }
276
+ },
277
+ computed: {
278
+ getColumnsSelectorVisibility () {
279
+ return !this.smallDevice || this.showColumnsSelector
280
+ },
281
+ getTableInputSearchVisibility () {
282
+ return !this.smallDevice || this.showSearch
283
+ },
284
+ showGridHeader () {
285
+ return this.selectionType === 'multiple' || this.showAdvancedFilter
286
+ },
287
+ getTableSkeletonVisibility () {
288
+ return !this.smallDevice && this.showSkeleton
289
+ },
290
+ getGridSkeletonVisibility () {
291
+ return this.smallDevice && this.showSkeleton
292
+ },
293
+ filterComputed ():object {
294
+ return {
295
+ search: this.store.filterValue,
296
+ forceRender: this.forceRender,
297
+ ...this.filterComputedOptions
298
+ }
299
+ },
300
+ pageLength (): number {
301
+ return (this.totalPage + 1) * this.pageSize
302
+ }
303
+ },
304
+ watch: {
305
+ rows (val) {
306
+ this.rowsData = val
307
+ },
308
+ showAdvancedFilter (val: boolean): void {
309
+ if (!val) {
310
+ this.advancedFiltersData = {}
311
+ }
312
+ },
313
+ enableDragAndDrop (val): void {
314
+ if (val) {
315
+ this.enableDragAndDropFunc()
316
+ }
317
+ },
318
+ smallDevice (val): void {
319
+ if(val) {
320
+ this.dragAndDropDelay = 200
321
+ } else {
322
+ this.dragAndDropDelay = 0
323
+ }
324
+ },
325
+ /* showSkeleton (val: boolean): void {
326
+ if (!val) {
327
+ this.handleInfiniteScrollTableCompositionAPi()
328
+ }
329
+ },
330
+ '$q.screen.width' (): void {
331
+ setTimeout(() => {
332
+ this.handleInfiniteScrollTableCompositionAPi()
333
+ }, 500)
334
+ } */
335
+ },
336
+ mounted () {
337
+ this.getAdvancedFilterColumns()
338
+ },
339
+ methods: {
340
+ enableDragAndDropFunc (): void {
341
+ this.dragAndDropDelay = this.smallDevice ? 200: 0
342
+ if (this.smallDevice) {
343
+ this.tableRef = document.querySelector('.q-table__grid-content')
344
+ } else {
345
+ this.tableRef = document.querySelector('.q-table tbody')
346
+ }
347
+ const self = this
348
+ if (this.draggableInstance?.destroy) {
349
+ this.draggableInstance.destroy()
350
+ }
351
+ if (this.tableRef) {
352
+ this.draggableInstance = useDraggable(this.tableRef, this.rows, {
353
+ animation: 100,
354
+ delay: self.dragAndDropDelay,
355
+
356
+ onStart (e) {
357
+ self.$emit('onDragStart', e)
358
+ },
359
+ onUpdate (e) {
360
+ self.rowsData = [...self.rows]
361
+ self.$emit('onDragUpdate', e)
362
+ },
363
+ onEnd(e) {
364
+ self.$emit('onDragEnd', e)
365
+ }
366
+ })
367
+ }
368
+ },
369
+ getSelectedString (val: number): string {
370
+ const rowsSelectedLength = val
371
+ if (rowsSelectedLength === 0) {
372
+ return ''
373
+ }
374
+ const recordString = rowsSelectedLength > 1 ? 'records' : 'record'
375
+ return `${rowsSelectedLength} ${recordString} selected`
376
+ },
377
+ onSelectVisibleColumns (columns: string[]) {
378
+ this.$emit('onSelectVisibleColumns', columns)
379
+ },
380
+ onSaveValuePopupEdit (row: object) {
381
+ this.$emit('onSaveValuePopupEdit', row)
382
+ },
383
+ onUpdateBasicCheckboxValue (row: object) {
384
+ this.$emit('onUpdateBasicCheckboxValue', row)
385
+ },
386
+ onClickButton (emit: 'onClickButton', row: object) {
387
+ this.$emit(emit, row)
388
+ },
389
+ onClickIconToolTip (emit: 'onClickIconToolTip', row: object) {
390
+ this.$emit(emit, row)
391
+ },
392
+ onRowClick (row: object) {
393
+ this.$emit('onRowClick', row)
394
+ },
395
+ deleteItem (row: object) {
396
+ this.$emit('deleteItem', row)
397
+ },
398
+ onUpdateCustomizedCheckboxValue (row: object) {
399
+ this.$emit('onUpdateCustomizedCheckboxValue', row)
400
+ },
401
+ clearTableSelection () {
402
+ this.selected = []
403
+ },
404
+ toggleSearchVisibility (store: { lastFilterValue: string, valueInputFilterTable: string }) {
405
+ this.showSearch = !this.showSearch
406
+ store.lastFilterValue = ''
407
+ store.valueInputFilterTable = ''
408
+ },
409
+ toogleColumnsSelectorVisibility () {
410
+ this.showColumnsSelector = !this.showColumnsSelector
411
+ },
412
+ filterInputFocus () {
413
+ setTimeout(() => {
414
+ if (this.$refs.filterInput) {
415
+ this.$refs.filterInput.inputFocus()
416
+ }
417
+ }, 10)
418
+ },
419
+ toogleLoading () {
420
+ this.loading = !this.loading
421
+ },
422
+ customSortMethod(rows: object[] | [], sortBy: string, descending: boolean) {
423
+ let data = []
424
+ if (this.store.filterValue !== '') {
425
+ data = [...this.filteredRows];
426
+ }
427
+ else {
428
+ data = [...this.rows];
429
+ }
430
+ if (this.additionalSortConditions && this.additionalSortConditions.toString().replace(/\s+/g, '') !== 'function(){}') {
431
+ data = this.additionalSortConditions(this.filteredRows, rows);
432
+ }
433
+ this.getSortedData(sortBy, data, descending)
434
+ return data.slice(0, this.pageLength);
435
+ },
436
+ getSortedData (sortBy: string, data: object[] | [], descending: boolean) {
437
+ if (sortBy) {
438
+ data.sort((a, b) => {
439
+ const x = descending ? b : a;
440
+ const y = descending ? a : b;
441
+
442
+ const xValue = x[sortBy];
443
+ const yValue = y[sortBy];
444
+
445
+ const parseDate = (dateString: string): Date => {
446
+ const [day, month, year] = dateString.split('/');
447
+ return new Date(`${year}-${month}-${day}`);
448
+ };
449
+
450
+ const parseTime = (timeString: string): number => {
451
+ const [hours, minutes, seconds] = timeString.split(':').map(Number);
452
+ return (hours * 3600) + (minutes * 60) + seconds;
453
+ };
454
+
455
+ const parsePercentage = (percentageString: string): number => {
456
+ return parseFloat(percentageString.replace('%', '')) / 100;
457
+ };
458
+
459
+ if (typeof xValue === 'string' && typeof yValue === 'string') {
460
+ const xDate = parseDate(xValue);
461
+ const yDate = parseDate(yValue);
462
+
463
+ if (!isNaN(xDate.getTime()) && !isNaN(yDate.getTime())) {
464
+ return xDate.getTime() - yDate.getTime();
465
+ }
466
+
467
+ const xTime = parseTime(xValue);
468
+ const yTime = parseTime(yValue);
469
+
470
+ if (!isNaN(xTime) && !isNaN(yTime)) {
471
+ return xTime - yTime;
472
+ } else if (xValue.includes('%') && yValue.includes('%')) {
473
+ const xPercent = parsePercentage(xValue);
474
+ const yPercent = parsePercentage(yValue);
475
+ return xPercent - yPercent;
476
+ } else {
477
+ return xValue.localeCompare(yValue);
478
+ }
479
+ }
480
+ else if (typeof xValue === 'number' && typeof yValue === 'number') {
481
+ return xValue - yValue;
482
+ }
483
+ else if (typeof xValue === 'boolean' && typeof yValue === 'boolean') {
484
+ console.log(xValue, yValue)
485
+ return xValue === yValue ? 0 : xValue ? 1 : -1;
486
+ }
487
+ else {
488
+ return String(xValue) > String(yValue) ? 1 : String(xValue) < String(yValue) ? -1 : 0;
489
+ }
490
+ });
491
+ }
492
+ },
493
+ containsSearchTermInRow (row: object, lowerSearch: string): boolean {
494
+ if (lowerSearch !== '') {
495
+ const values = Object.values(row)
496
+ const valuesLowerCase = values.map((x) => (x + '').toLowerCase())
497
+ for (let val = 0; val < valuesLowerCase.length; val++) {
498
+ if (valuesLowerCase[val].includes(lowerSearch)) {
499
+ return true
500
+ }
501
+ }
502
+ }
503
+ return false
504
+ },
505
+ customFilter(rows: object[] | [], terms: { search: string, prepared: boolean }) {
506
+ let filteredRows_ = []
507
+ if (terms.search !== '') {
508
+ const lowerSearch = terms.search ? terms.search.toLowerCase() : ''
509
+ for (let i = 0; i < this.rows.length; i++) {
510
+ if (this.containsSearchTermInRow(this.rows[i], lowerSearch)) {
511
+ filteredRows_.push(this.rows[i])
512
+ }
513
+ }
514
+ }
515
+ else {
516
+ filteredRows_ = rows
517
+ }
518
+ if (this.additionalFilterConditions && this.additionalFilterConditions.toString().replace(/\s+/g, '') !== 'function(){}') {
519
+ filteredRows_ = this.additionalFilterConditions(this.rows, filteredRows_)
520
+ }
521
+
522
+ if (this.advancedFiltersData && Object.keys(this.advancedFiltersData).length > 0) {
523
+ filteredRows_ = filteredRows_.filter(row => {
524
+ return Object.keys(this.advancedFiltersData).every(key => {
525
+ const filterValue = this.advancedFiltersData[key]
526
+ if (filterValue === '' || filterValue === null || filterValue === undefined) {
527
+ return true
528
+ }
529
+ return String(row[key]).toLowerCase().includes(String(filterValue).toLowerCase())
530
+ })
531
+ })
532
+ }
533
+
534
+ this.filteredRows = filteredRows_
535
+ return filteredRows_.slice(0, this.pageLength)
536
+ },
537
+ getAdvancedFilterColumns (): void {
538
+ this.advancedFiltersData = this.columns.reduce((acc, column) => {
539
+ acc[column.name] = ''
540
+ return acc
541
+ }, {} as Record<string, string>)
542
+ },
543
+ handleInfiniteScrollTableCompositionAPi () {
544
+ // const offSet = this.showIconAdvancedFilter && this.smallDevice ? document.getElementsByClassName('q-table__control')[0].offsetHeight : 0
545
+ this.$nextTick(() => {
546
+ const elemClass = this.smallDevice ? 'q-table__grid-content' : 'q-table__middle scroll'
547
+ const tableType = this.smallDevice ? 'Grid' : 'Table'
548
+ const qtableScrollElem = document.getElementsByClassName(elemClass) as HTMLCollectionOf<HTMLElement>
549
+ const elementToScroll =
550
+ qtableScrollElem.length > 0 ? qtableScrollElem[0] : window
551
+ const fnAddScroll = (event: Event) => {
552
+ const { scrollHeight, scrollTop, clientHeight } = event.target as HTMLElement
553
+ if (Math.abs(scrollHeight - clientHeight - scrollTop) <= 1) {
554
+ console.log(`[${tableType}] You are at the bottom!`, this.totalPage)
555
+ this.totalPage++
556
+ }
557
+ }
558
+ window.removeEventListener('scroll', fnAddScroll)
559
+ elementToScroll.removeEventListener('scroll', fnAddScroll)
560
+ elementToScroll.addEventListener('scroll', fnAddScroll)
561
+ })
562
+ }
563
+ }
564
+ })
565
+ </script>
@@ -4,28 +4,27 @@
4
4
  v-show="!showSkeleton"
5
5
  ref="myTable"
6
6
  v-model:selected="selected"
7
+ v-model:pagination="pagination"
7
8
  class="my-table"
8
- :grid="smallDevice"
9
9
  :style="tableStyle"
10
10
  flat
11
- :filter-method="customFilter"
12
11
  bordered
13
12
  :rows="rowsData"
14
13
  :columns="columns"
14
+ :filter-method="customFilter"
15
+ :filter="filterComputed"
16
+ :sort-method="customSortMethod"
15
17
  :row-key="rowKey"
16
18
  :rows-per-page-options="rowsPerPageOptions"
17
19
  :selection="selectionType"
18
20
  :visible-columns="visibleColumns"
19
21
  table-class="text-grey-9"
20
22
  table-header-class="main-color"
21
- :filter="filterComputed"
22
- :sort-method="customSortMethod"
23
23
  separator="horizontal"
24
24
  binary-state-sort
25
25
  :selected-rows-label="getSelectedString"
26
26
  :loading="loading"
27
- pagination.sync="0"
28
- :grid-header="showGridHeader"
27
+ virtual-scroll
29
28
  @update:selected="(details) => {
30
29
  $emit('onUpdateSelected', details)
31
30
  }"
@@ -78,7 +77,7 @@
78
77
  </template>
79
78
  <template #body="props">
80
79
  <TableSlotBody
81
- v-if="!showSkeleton"
80
+ v-if="!showSkeleton && !smallDevice"
82
81
  :table-props="props"
83
82
  :selection-type="selectionType"
84
83
  :getCellClass="getCellClass"
@@ -89,10 +88,9 @@
89
88
  @on-click-icon-tool-tip="onClickIconToolTip"
90
89
  @click="onRowClick(props.row)"
91
90
  />
92
- </template>
93
- <template #item="props">
91
+
94
92
  <TableSlotGrid
95
- v-if="!showSkeleton"
93
+ v-if="!showSkeleton && smallDevice"
96
94
  :table-props="props"
97
95
  :selection-type="selectionType"
98
96
  :popup-edit-number-options="popupEditNumberOptions"
@@ -253,6 +251,7 @@ export default defineComponent({
253
251
  ],
254
252
  data () {
255
253
  return {
254
+ pagination: { rowsPerPage: 0},
256
255
  selected: [],
257
256
  filter: '',
258
257
  rowsData: [] as object[],
@@ -431,7 +430,7 @@ export default defineComponent({
431
430
  data = this.additionalSortConditions(this.filteredRows, rows);
432
431
  }
433
432
  this.getSortedData(sortBy, data, descending)
434
- return data.slice(0, this.pageLength);
433
+ return data // .slice(0, this.pageLength);
435
434
  },
436
435
  getSortedData (sortBy: string, data: object[] | [], descending: boolean) {
437
436
  if (sortBy) {
@@ -532,7 +531,7 @@ export default defineComponent({
532
531
  }
533
532
 
534
533
  this.filteredRows = filteredRows_
535
- return filteredRows_.slice(0, this.pageLength)
534
+ return filteredRows_ //slice(0, this.pageLength)
536
535
  },
537
536
  getAdvancedFilterColumns (): void {
538
537
  this.advancedFiltersData = this.columns.reduce((acc, column) => {
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <tr
3
+ :id="tablePropsData.row.id"
3
4
  :class="tablePropsData.row.rowBgColor || 'bg-main-color'"
4
5
  >
5
6
  <q-td
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  :id="'card-container-' + tablePropsData.row.id"
4
- class="col-xs-12 col-sm-12 grid-style-transition"
4
+ class="grid-style-transition"
5
5
  :style="tablePropsData.selected ? 'transform: scale(0.95);' : ''"
6
6
  >
7
7
  <q-card
@@ -1,6 +1,7 @@
1
1
  import type { App, Plugin } from 'vue'
2
2
 
3
3
  import MyTable from './Table.vue'
4
+ import DraggableQTable from './Table.vue'
4
5
 
5
6
  import { registerComponent } from '@/utils/plugins'
6
7
 
@@ -11,8 +12,10 @@ import { registerComponent } from '@/utils/plugins'
11
12
  export default {
12
13
  install (app: App) {
13
14
  registerComponent(app, 'MyTable', MyTable)
15
+ registerComponent(app, 'DraggableQTable', DraggableQTable)
14
16
  }
15
17
  } as Plugin
16
18
 
17
19
  /** export button components */
18
20
  export { MyTable as MyTable }
21
+ export { DraggableQTable as DraggableQTable }
@@ -1,4 +1,5 @@
1
1
  import MyTable from './Table'
2
+ import DraggableQTable from './Table'
2
3
  import AlertDialog from './Alert'
3
4
  import ConfirmDialog from './Confirm'
4
5
  import TaskNavBar from './TaskNavBar'
@@ -11,5 +12,5 @@ import SkeletonAreas from './SkeletonAreas'
11
12
  import ListSkeleton from './ListSkeleton'
12
13
  import SkeletonTaskList from './SkeletonTaskList'
13
14
  import SkeletonFormCreateTask from './SkeletonFormCreateTask'
14
- export { MyTable, AlertDialog, ConfirmDialog, TaskNavBar, ConfirmedTask, TableRowsCounter, NavBarSkeleton, AlertLabelsWithError, FormSkeleton, SkeletonAreas, ListSkeleton, SkeletonTaskList, SkeletonFormCreateTask }
15
+ export { DraggableQTable, MyTable, AlertDialog, ConfirmDialog, TaskNavBar, ConfirmedTask, TableRowsCounter, NavBarSkeleton, AlertLabelsWithError, FormSkeleton, SkeletonAreas, ListSkeleton, SkeletonTaskList, SkeletonFormCreateTask }
15
16