@@ -362,10 +380,7 @@ function stopEventPropagation(event) {
.bg-header {
background-color: #5d5d5d;
- color: var(--vn-page-color);
- * {
- font-weight: bold !important;
- }
+ color: var(--vn-text-color);
}
.q-table--dark .q-table__bottom,
@@ -466,6 +481,7 @@ function stopEventPropagation(event) {
.vn-label-value {
display: flex;
flex-direction: row;
+ color: var(--vn-text-color);
.value {
overflow: hidden;
text-overflow: ellipsis;
diff --git a/src/components/common/VnTableColumn.vue b/src/components/common/VnTableColumn.vue
index 62db2a76a..c68aa895e 100644
--- a/src/components/common/VnTableColumn.vue
+++ b/src/components/common/VnTableColumn.vue
@@ -82,7 +82,9 @@ const defaultComponents = {
};
const value = computed(() => {
- return $props.column.format ? $props.column.format($props.row) : $props.row;
+ return $props.column.format
+ ? $props.column.format($props.row, dashIfEmpty)
+ : dashIfEmpty($props.row[$props.column.field]);
});
const col = computed(() => {
@@ -108,22 +110,22 @@ const components = computed(() => $props.components ?? defaultComponents);
v-if="col.before"
:prop="col.before"
:components="components"
- :value="value"
+ :value="$props.row"
v-model="model"
/>
- {{ dashIfEmpty(row[col.field]) }}
+ {{ value }}
diff --git a/src/components/common/VnTableFilter.vue b/src/components/common/VnTableFilter.vue
index 212eab1b1..bfb62a0cf 100644
--- a/src/components/common/VnTableFilter.vue
+++ b/src/components/common/VnTableFilter.vue
@@ -18,7 +18,7 @@
default="input"
v-model="model"
:components="components"
- :component-prop="`columnFilter`"
+ component-prop="columnFilter"
/>
diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue
index c37652b15..f128e7177 100644
--- a/src/components/ui/VnFilterPanel.vue
+++ b/src/components/ui/VnFilterPanel.vue
@@ -85,14 +85,6 @@ watch(
}
);
-watch(
- () => arrayData.store.filter,
- (val) => {
- console.log('watch filter: ', val);
- },
- { deep: true }
-);
-
const isLoading = ref(false);
async function search() {
store.filter.where = {};
@@ -184,7 +176,7 @@ function formatValue(value) {
-
+
@@ -274,7 +266,7 @@ function formatValue(value) {
-
+
[
where: { role: 'salesPerson' },
},
create: true,
+ columnField: {
+ component: null,
+ },
+ format: (row, dashIfEmpty) => dashIfEmpty(row.salesPerson),
},
{
align: 'left',
@@ -406,6 +411,10 @@ const columns = computed(() => [
optionLabel: 'description',
optionValue: 'code',
},
+ columnField: {
+ component: null,
+ },
+ format: (row, dashIfEmpty) => dashIfEmpty(row.businessType),
},
{
align: 'left',
@@ -463,7 +472,7 @@ const columns = computed(() => [
name: 'isFreezed',
chip: {
color: null,
- condition: (v, { isActive, isFreezed }) => isActive && isFreezed == true,
+ condition: (v, { isActive, isFreezed }) => isActive && isFreezed,
icon: 'vn:frozen',
},
},
@@ -570,15 +579,29 @@ function handleLocation(data, location) {
-->