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/package.json CHANGED
@@ -97,6 +97,6 @@
97
97
  "release": "standard-version"
98
98
  },
99
99
  "type": "module",
100
- "version": "0.0.61",
100
+ "version": "0.0.63",
101
101
  "author": ""
102
102
  }
@@ -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>
@@ -46,8 +46,8 @@
46
46
  </q-dialog>
47
47
  </div>
48
48
  </template>
49
- <script>
50
- import { defineComponent, ref } from 'vue'
49
+ <script lang="ts">
50
+ import { defineComponent } from 'vue'
51
51
  export default defineComponent({
52
52
  data () {
53
53
  return {
@@ -278,9 +278,8 @@ export default defineComponent({
278
278
  clearTableSelection () {
279
279
  this.selected = []
280
280
  },
281
- toggleSearchVisibility (store: {disableScannerButtons: boolean, lastFilterValue: string, valueInputFilterTable: string}) {
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 {
@@ -30,6 +30,11 @@ export default {
30
30
  tablePropsData: this.tableProps,
31
31
  modelData: this.model
32
32
  }
33
+ },
34
+ watch: {
35
+ model (val) {
36
+ this.modelData = val
37
+ }
33
38
  }
34
39
  }
35
40
  </script>
@@ -51,6 +51,11 @@ export default {
51
51
  tablePropsData: this.tableProps,
52
52
  modelData: this.model
53
53
  }
54
+ },
55
+ watch: {
56
+ model (val) {
57
+ this.modelData = val
58
+ }
54
59
  }
55
60
  }
56
61
  </script>
@@ -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: 30px;
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;' */
@@ -2,6 +2,7 @@
2
2
  <div class="column full-height justify-center">
3
3
  <q-btn
4
4
  label="Table"
5
+ data-cy="table"
5
6
  @click="() => {
6
7
  router.push('tablePage')
7
8
  }"
@@ -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="accent" icon="arrow_forward" />
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.$refs.AlertLabelsWithError.alert = true
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
- getX () {
431
- // this.$refs.AlertLabelsWithError.setLabelsSpinner(labelCode, true)
432
-
433
- // this.$refs.AlertLabelsWithError.setIconCircleCheck(labelCode)
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
  }
@@ -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
  }