quasar-factory-lib 0.0.61 → 0.0.63
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 +0 -1
- package/dist/layouts/PdaLayout.vue.d.ts +1 -3
- package/dist/pages/TablePage.vue.d.ts +0 -2
- package/dist/quasar-factory-lib.js +391 -373
- package/dist/quasar-factory-lib.umd.cjs +5 -5
- package/dist/store/table.d.ts +0 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Confirm/ConfirmDialog.vue +1 -1
- package/src/components/ConfirmedTask/ConfirmedTask.vue +2 -2
- package/src/components/Table/Table.vue +12 -4
- package/src/components/Table/components/BasicCheckBox.vue +5 -0
- package/src/components/Table/components/CustomizedCheckBox.vue +5 -0
- package/src/components/Table/components/TableSlotGrid.vue +3 -1
- package/src/css/app.css +1 -4
- package/src/layouts/MenuLayout.vue +1 -0
- package/src/layouts/PdaLayout.vue +17 -28
- package/src/store/table.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-dialog v-model="alert" persistent>
|
|
3
|
-
<q-card class="alert-card" :data-cy="dataCy">
|
|
3
|
+
<q-card class="alert-card" :data-cy="dataCy || 'confirm-dialog'">
|
|
4
4
|
<q-card-section class="row items-center">
|
|
5
5
|
<span class="q-ml-sm text-body1">{{ message }}</span>
|
|
6
6
|
</q-card-section>
|
|
@@ -278,9 +278,8 @@ export default defineComponent({
|
|
|
278
278
|
clearTableSelection () {
|
|
279
279
|
this.selected = []
|
|
280
280
|
},
|
|
281
|
-
toggleSearchVisibility (store: {
|
|
281
|
+
toggleSearchVisibility (store: { lastFilterValue: string, valueInputFilterTable: string }) {
|
|
282
282
|
this.showSearch = !this.showSearch
|
|
283
|
-
store.disableScannerButtons = false
|
|
284
283
|
store.lastFilterValue = ''
|
|
285
284
|
store.valueInputFilterTable = ''
|
|
286
285
|
},
|
|
@@ -332,19 +331,27 @@ export default defineComponent({
|
|
|
332
331
|
return (hours * 3600) + (minutes * 60) + seconds;
|
|
333
332
|
};
|
|
334
333
|
|
|
334
|
+
const parsePercentage = (percentageString: string): number => {
|
|
335
|
+
return parseFloat(percentageString.replace('%', '')) / 100;
|
|
336
|
+
};
|
|
337
|
+
|
|
335
338
|
if (typeof xValue === 'string' && typeof yValue === 'string') {
|
|
336
339
|
const xDate = parseDate(xValue);
|
|
337
340
|
const yDate = parseDate(yValue);
|
|
338
|
-
|
|
341
|
+
|
|
339
342
|
if (!isNaN(xDate.getTime()) && !isNaN(yDate.getTime())) {
|
|
340
343
|
return xDate.getTime() - yDate.getTime();
|
|
341
344
|
}
|
|
342
345
|
|
|
343
346
|
const xTime = parseTime(xValue);
|
|
344
347
|
const yTime = parseTime(yValue);
|
|
345
|
-
|
|
348
|
+
|
|
346
349
|
if (!isNaN(xTime) && !isNaN(yTime)) {
|
|
347
350
|
return xTime - yTime;
|
|
351
|
+
} else if (xValue.includes('%') && yValue.includes('%')) {
|
|
352
|
+
const xPercent = parsePercentage(xValue);
|
|
353
|
+
const yPercent = parsePercentage(yValue);
|
|
354
|
+
return xPercent - yPercent;
|
|
348
355
|
} else {
|
|
349
356
|
return xValue.localeCompare(yValue);
|
|
350
357
|
}
|
|
@@ -353,6 +360,7 @@ export default defineComponent({
|
|
|
353
360
|
return xValue - yValue;
|
|
354
361
|
}
|
|
355
362
|
else if (typeof xValue === 'boolean' && typeof yValue === 'boolean') {
|
|
363
|
+
console.log(xValue, yValue)
|
|
356
364
|
return xValue === yValue ? 0 : xValue ? 1 : -1;
|
|
357
365
|
}
|
|
358
366
|
else {
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
: tablePropsData.row.rowBgColor || 'bg-main-color'
|
|
17
17
|
"
|
|
18
18
|
>
|
|
19
|
-
<q-card-section>
|
|
19
|
+
<q-card-section class="q-py-sm">
|
|
20
20
|
<q-checkbox
|
|
21
21
|
:data-cy="'checkbox-' + tablePropsData.row.id"
|
|
22
|
+
size="sm"
|
|
22
23
|
v-if="selectionType != 'none'"
|
|
23
24
|
v-model="tablePropsData.selected"
|
|
24
25
|
dense
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
<q-item
|
|
29
30
|
v-for="col in tablePropsData.cols.filter((col: any) => col.name !== 'desc')"
|
|
30
31
|
:key="col.name"
|
|
32
|
+
:id="col.name"
|
|
31
33
|
>
|
|
32
34
|
<q-item-section>
|
|
33
35
|
<q-item-label class="itemsFontSize ellipsis text-color-lightGray">
|
package/src/css/app.css
CHANGED
|
@@ -56,12 +56,9 @@
|
|
|
56
56
|
.text-color-negative-bold {
|
|
57
57
|
color: var(--negative);
|
|
58
58
|
font-weight: bold;
|
|
59
|
-
font-size:
|
|
59
|
+
font-size: 18px;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.border-bottom-darkGrey{
|
|
63
63
|
border-bottom: 0.7px solid var(--dark-gray);
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
/* const labelTextColor = 'color: #597765 !important;'
|
|
67
|
-
const labelTextColorBold = 'color: #597765 !important; font-weight: bold;' */
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
@on-click-btn-menu="toogleColumnsSelectorVisibility">
|
|
19
19
|
</TaskNavBar>
|
|
20
20
|
<TableRowsCounter :counterJson="[
|
|
21
|
-
{ qty: 1, title: 'Total', dataCy: 'datacy', extraClasses: 'class'}
|
|
22
|
-
{ qty: 10, title: 'Total2', dataCy: 'datacy', extraClasses: 'text-color-positive'},
|
|
23
|
-
{ qty: 30, title: 'Total3', dataCy: 'datacy', extraClasses: 'text-color-negative-bold'}
|
|
21
|
+
{ qty: 1, title: 'Total', dataCy: 'datacy', extraClasses: 'class'}
|
|
24
22
|
]"/>
|
|
25
23
|
</div>
|
|
26
24
|
</q-header>
|
|
@@ -57,14 +55,9 @@
|
|
|
57
55
|
position="bottom"
|
|
58
56
|
expand
|
|
59
57
|
>
|
|
60
|
-
<q-btn class="full-width" color="
|
|
58
|
+
<q-btn class="full-width" color="black" icon="arrow_forward" />
|
|
61
59
|
</q-page-sticky>
|
|
62
60
|
</q-page>
|
|
63
|
-
<!-- <SideBar
|
|
64
|
-
ref="sideBar"
|
|
65
|
-
@toggle-right-drawer="toggleRightDrawer"
|
|
66
|
-
@onclick-show-select-visible-columns="toogleColumnsSelectorVisibility"
|
|
67
|
-
:buttonsList="buttonsList" /> -->
|
|
68
61
|
</q-page-container>
|
|
69
62
|
</q-layout>
|
|
70
63
|
</div>
|
|
@@ -74,7 +67,6 @@
|
|
|
74
67
|
<script lang="ts">
|
|
75
68
|
import TaskNavBar from '../components/TaskNavBar/TaskNavBar.vue'
|
|
76
69
|
import Table from '../components/Table/Table.vue'
|
|
77
|
-
// import SideBar from '../components/TaskNavBar/SideBar.vue'
|
|
78
70
|
import NavBarSkeleton from '../components/NavBarSkeleton/NavBarSkeleton.vue'
|
|
79
71
|
import TableRowsCounter from'../components/TableRowsCounter/TableRowsCounter.vue'
|
|
80
72
|
import AlertLabelsWithError from '../components/AlertLabelsWithError/AlertLabelsWithError.vue'
|
|
@@ -84,7 +76,6 @@ import { tableStore } from '../store/table.js'
|
|
|
84
76
|
export default {
|
|
85
77
|
components: {
|
|
86
78
|
TaskNavBar,
|
|
87
|
-
// SideBar,
|
|
88
79
|
Table,
|
|
89
80
|
TableRowsCounter,
|
|
90
81
|
AlertLabelsWithError,
|
|
@@ -377,19 +368,7 @@ export default {
|
|
|
377
368
|
this.showSkeleton = true
|
|
378
369
|
this.store.cleanTableFilter()
|
|
379
370
|
this.getRows()
|
|
380
|
-
this
|
|
381
|
-
this.$refs.AlertLabelsWithError.labelsErrors.push({
|
|
382
|
-
label: '558877',
|
|
383
|
-
error: 'The Bin does not exist. Identification fields and values',
|
|
384
|
-
icon: 'cancel',
|
|
385
|
-
spinner: false
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
label: '558871',
|
|
389
|
-
error: 'The Bin does not exist. Identification fields and values',
|
|
390
|
-
icon: 'cancel',
|
|
391
|
-
spinner: false
|
|
392
|
-
})
|
|
371
|
+
// this.getAlertLabelsWithError()
|
|
393
372
|
},
|
|
394
373
|
methods: {
|
|
395
374
|
getRows () {
|
|
@@ -427,10 +406,20 @@ export default {
|
|
|
427
406
|
onCloseDialogLabelsError () {
|
|
428
407
|
console.log('onCloseDialogLabelsError')
|
|
429
408
|
},
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
409
|
+
getAlertLabelsWithError () {
|
|
410
|
+
this.$refs.AlertLabelsWithError.alert = true
|
|
411
|
+
this.$refs.AlertLabelsWithError.labelsErrors.push({
|
|
412
|
+
label: '558877',
|
|
413
|
+
error: 'The Bin does not exist. Identification fields and values',
|
|
414
|
+
icon: 'cancel',
|
|
415
|
+
spinner: false
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
label: '558871',
|
|
419
|
+
error: 'The Bin does not exist. Identification fields and values',
|
|
420
|
+
icon: 'cancel',
|
|
421
|
+
spinner: false
|
|
422
|
+
})
|
|
434
423
|
}
|
|
435
424
|
}
|
|
436
425
|
}
|
package/src/store/table.js
CHANGED
|
@@ -2,7 +2,6 @@ import { defineStore } from 'pinia'
|
|
|
2
2
|
import { useStorage } from '@vueuse/core'
|
|
3
3
|
export const tableStore = defineStore('tableStore', {
|
|
4
4
|
state: () => ({
|
|
5
|
-
disableScannerButtons: useStorage('disableScannerButtons', false),
|
|
6
5
|
filterValue: useStorage('filterValue', ''),
|
|
7
6
|
lastFilterValue: useStorage('lastFilterValue', ''),
|
|
8
7
|
visiblecolumns: useStorage('visiblecolumns', []),
|
|
@@ -18,7 +17,6 @@ export const tableStore = defineStore('tableStore', {
|
|
|
18
17
|
cleanTableFilter () {
|
|
19
18
|
this.filterValue = ''
|
|
20
19
|
this.lastFilterValue = ''
|
|
21
|
-
this.disableScannerButtons = false
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
}
|