quasar-factory-lib 0.0.68 → 0.0.70
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 +2 -0
- package/dist/components/Table/components/TableSlotBody.vue.d.ts +1 -0
- package/dist/components/Table/components/TableSlotGrid.vue.d.ts +1 -0
- package/dist/layouts/PdaLayout.vue.d.ts +2 -0
- package/dist/pages/TablePage.vue.d.ts +4 -13
- package/dist/quasar-factory-lib.js +697 -691
- package/dist/quasar-factory-lib.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/Table/components/TableSlotBody.vue +11 -3
- package/src/components/Table/components/TableSlotGrid.vue +11 -2
- package/src/pages/TablePage.vue +27 -10
package/package.json
CHANGED
|
@@ -87,13 +87,12 @@
|
|
|
87
87
|
:customized-icon-name="(tablePropsData.row[col.name] ? col.customizedIconNameCaseTrue : col.customizedIconNameCaseFalse) || ''"
|
|
88
88
|
:customized-icon-color="(tablePropsData.row[col.name] ? col.customizedIconColorCaseTrue : col.customizedIconColorCaseFalse) || ''"
|
|
89
89
|
/>
|
|
90
|
-
|
|
91
90
|
<CustomizedButton
|
|
92
91
|
v-if="col.showCustomizedButton"
|
|
93
92
|
:data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
|
|
94
|
-
:btn-color="col.btnColor ||
|
|
93
|
+
:btn-color="col.btnColor || 'primary'"
|
|
95
94
|
:btn-icon="col.btnIcon|| ''"
|
|
96
|
-
:btn-disable="tablePropsData
|
|
95
|
+
:btn-disable="getBtnDisabled(tablePropsData, col)"
|
|
97
96
|
@on-click-button="() => {
|
|
98
97
|
$emit('onClickButton', col.btnEmit, tablePropsData.row)
|
|
99
98
|
}"
|
|
@@ -176,6 +175,15 @@ export default {
|
|
|
176
175
|
methods: {
|
|
177
176
|
getColumnValue (col: { showBasicCheckbox: boolean; showCustomizedCheckBox: boolean; showCustomizedIcon: boolean; showColumButton: boolean, showBadge: boolean, showIconWithToolTip: boolean }): boolean {
|
|
178
177
|
return !(col.showBasicCheckbox || col.showCustomizedCheckBox || col.showCustomizedIcon || col.showColumButton || col.showBadge || col.showIconWithToolTip)
|
|
178
|
+
},
|
|
179
|
+
getBtnDisabled(tablePropsData, col) {
|
|
180
|
+
if (col.field === 'btnStart') {
|
|
181
|
+
return tablePropsData.row.btnStartDisabled
|
|
182
|
+
} else if (col.field === 'btnPause') {
|
|
183
|
+
return tablePropsData.row.btnPauseDisabled
|
|
184
|
+
} else {
|
|
185
|
+
return false
|
|
186
|
+
}
|
|
179
187
|
}
|
|
180
188
|
}
|
|
181
189
|
}
|
|
@@ -120,9 +120,9 @@
|
|
|
120
120
|
<CustomizedButton
|
|
121
121
|
v-if="col.showCustomizedButton"
|
|
122
122
|
:data-cy="col.colButtonDataCy + '-' + tablePropsData.row.id"
|
|
123
|
-
:btn-color="col.btnColor ||
|
|
123
|
+
:btn-color="col.btnColor || 'primary'"
|
|
124
124
|
:btn-icon="col.btnIcon|| ''"
|
|
125
|
-
:btn-disable="tablePropsData
|
|
125
|
+
:btn-disable="getBtnDisabled(tablePropsData, col)"
|
|
126
126
|
@on-click-button="() => {
|
|
127
127
|
$emit('onClickButton', col.btnEmit, tablePropsData.row)
|
|
128
128
|
}"
|
|
@@ -220,6 +220,15 @@ export default {
|
|
|
220
220
|
methods: {
|
|
221
221
|
getColumnValue (col: { showBasicCheckbox: boolean; showCustomizedCheckBox: boolean; showCustomizedIcon: boolean; showColumButton: boolean, showBadge: boolean, showIconWithToolTip: boolean, showCustomizedButton: boolean }): boolean {
|
|
222
222
|
return !(col.showBasicCheckbox || col.showCustomizedCheckBox || col.showCustomizedIcon || col.showColumButton || col.showBadge || col.showIconWithToolTip || col.showCustomizedButton)
|
|
223
|
+
},
|
|
224
|
+
getBtnDisabled(tablePropsData, col) {
|
|
225
|
+
if (col.field === 'btnStart') {
|
|
226
|
+
return tablePropsData.row.btnStartDisabled
|
|
227
|
+
} else if (col.field === 'btnPause') {
|
|
228
|
+
return tablePropsData.row.btnPauseDisabled
|
|
229
|
+
} else {
|
|
230
|
+
return false
|
|
231
|
+
}
|
|
223
232
|
}
|
|
224
233
|
}
|
|
225
234
|
}
|
package/src/pages/TablePage.vue
CHANGED
|
@@ -112,15 +112,26 @@ export default {
|
|
|
112
112
|
{
|
|
113
113
|
name: 'fat',
|
|
114
114
|
label: 'Fat (g)',
|
|
115
|
-
field: '
|
|
115
|
+
field: 'btnPause',
|
|
116
116
|
sortable: true,
|
|
117
117
|
align: 'left',
|
|
118
118
|
showCustomizedButton: true,
|
|
119
119
|
btnIcon: 'save',
|
|
120
120
|
btnEmit: 'onClickButton',
|
|
121
121
|
dataCy: 'onClickButton',
|
|
122
|
-
btnColor: '
|
|
123
|
-
|
|
122
|
+
btnColor: 'primary'
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'fat2',
|
|
126
|
+
label: 'Fat 2',
|
|
127
|
+
field: 'btnStart',
|
|
128
|
+
sortable: true,
|
|
129
|
+
align: 'left',
|
|
130
|
+
showCustomizedButton: true,
|
|
131
|
+
btnIcon: 'save',
|
|
132
|
+
btnEmit: 'onClickButton',
|
|
133
|
+
dataCy: 'onClickButton',
|
|
134
|
+
btnColor: 'secondary',
|
|
124
135
|
},
|
|
125
136
|
{
|
|
126
137
|
name: 'carbs',
|
|
@@ -360,7 +371,7 @@ export default {
|
|
|
360
371
|
this.rows = []
|
|
361
372
|
const lista = this.rowsData
|
|
362
373
|
for (let i = 0; i < lista.length; i++) {
|
|
363
|
-
|
|
374
|
+
const rows = {
|
|
364
375
|
id: i + '-' + lista[i].dessert,
|
|
365
376
|
date: lista[i].date,
|
|
366
377
|
time: lista[i].time,
|
|
@@ -369,20 +380,23 @@ export default {
|
|
|
369
380
|
available: lista[i].available,
|
|
370
381
|
calories: lista[i].calories,
|
|
371
382
|
fat: lista[i].fat,
|
|
383
|
+
fat2: lista[i].calories,
|
|
372
384
|
carbs: lista[i].carbs,
|
|
373
385
|
checked: lista[i].checked,
|
|
374
386
|
protein: lista[i].protein,
|
|
375
387
|
sodium: lista[i].sodium,
|
|
376
388
|
calcium: lista[i].calcium,
|
|
377
389
|
iron: lista[i].iron,
|
|
378
|
-
// btnColor: this.getBadgeColor(lista[i].carbs),
|
|
379
|
-
btnDisable: this.getBtnDisable(lista[i].carbs),
|
|
380
390
|
badgeColor: this.getBadgeColor(lista[i].carbs),
|
|
381
391
|
badgeText: this.getBadgeText(lista[i].carbs),
|
|
382
392
|
toolTipText: this.getBadgeText(lista[i].carbs),
|
|
383
393
|
iconWithToolTipColor: this.getBadgeColor(lista[i].carbs),
|
|
384
|
-
iconWithToolTipName: this.getIconWithToolTipName(lista[i].carbs)
|
|
385
|
-
|
|
394
|
+
iconWithToolTipName: this.getIconWithToolTipName(lista[i].carbs),
|
|
395
|
+
btnStartDisabled: this.getBtnDisable2(lista[i]),
|
|
396
|
+
btnPauseDisabled: this.getBtnDisable(lista[i])
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
this.rows.push(rows)
|
|
386
400
|
}
|
|
387
401
|
setTimeout(() => {
|
|
388
402
|
this.showSkeleton = false
|
|
@@ -395,8 +409,11 @@ export default {
|
|
|
395
409
|
getBadgeText (carbs: number) {
|
|
396
410
|
return carbs > 50 ? 'header.hello': 'global.total'
|
|
397
411
|
},
|
|
398
|
-
getBtnDisable (
|
|
399
|
-
return
|
|
412
|
+
getBtnDisable (row) {
|
|
413
|
+
return row.fat > 10
|
|
414
|
+
},
|
|
415
|
+
getBtnDisable2 (row) {
|
|
416
|
+
return row.calories > 300
|
|
400
417
|
},
|
|
401
418
|
getIconWithToolTipName (carbs: number) {
|
|
402
419
|
return carbs > 50 ? 'warning': 'home'
|