diff --git a/src/components/common/VnComponent.vue b/src/components/common/VnComponent.vue
index 6514c1ba6..e411059c2 100644
--- a/src/components/common/VnComponent.vue
+++ b/src/components/common/VnComponent.vue
@@ -5,13 +5,20 @@
:is="
(components && components[toComponent.component]) ?? toComponent.component
"
- v-bind="toComponent.props && toComponent.props(value)"
+ v-bind="
+ typeof toComponent.attrs == 'function'
+ ? toComponent.attrs(value)
+ : toComponent.attrs
+ "
@click="toComponent.event && toComponent.event(value)"
+ v-model="model"
/>
diff --git a/src/components/common/VnTableCreate.vue b/src/components/common/VnTableCreate.vue
new file mode 100644
index 000000000..1ce642746
--- /dev/null
+++ b/src/components/common/VnTableCreate.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
diff --git a/src/components/common/VnTableFilter.vue b/src/components/common/VnTableFilter.vue
index e2dd95b1e..331575538 100644
--- a/src/components/common/VnTableFilter.vue
+++ b/src/components/common/VnTableFilter.vue
@@ -1,5 +1,4 @@
- {{ model }}
@@ -57,10 +56,6 @@ const $props = defineProps({
type: String,
required: true,
},
- addModel: {
- type: Object,
- default: () => {},
- },
});
const model = defineModel();
const arrayData = useArrayData($props.dataKey);
diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue
index 9cadf2ef5..cb7ab5e5f 100644
--- a/src/components/ui/VnFilterPanel.vue
+++ b/src/components/ui/VnFilterPanel.vue
@@ -8,7 +8,7 @@ import useRedirect from 'src/composables/useRedirect';
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
const { t } = useI18n();
-const params = defineModel('params');
+const params = defineModel();
const props = defineProps({
dataKey: {
type: String,
@@ -165,7 +165,7 @@ const customTags = computed(() =>
async function remove(key) {
userParams.value[key] = null;
- delete params.value[key];
+ params.value[key] = undefined;
console.log('key: ', key);
console.log('params: ', params.value);
await arrayData.applyFilter({ params: userParams.value });
diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue
index 1afd9357e..89a63440c 100644
--- a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue
+++ b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue
@@ -292,6 +292,7 @@ const columns = computed(() => [
label: t('customer.extendedList.tableVisibleColumns.name'),
name: 'name',
isTitle: true,
+ create: true,
},
{
align: 'left',
@@ -301,9 +302,25 @@ const columns = computed(() => [
},
{
align: 'left',
- field: 'salesPerson',
+ field: 'salesPersonFk',
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
name: 'salesPersonFk',
+ columnFilter: {
+ component: 'select',
+ attrs: {
+ url: 'Workers/activeWithInheritedRole',
+ fields: ['id', 'name'],
+ where: { role: 'salesPerson' },
+ },
+ },
+ create: {
+ component: 'select',
+ attrs: {
+ url: 'Workers/activeWithInheritedRole',
+ fields: ['id', 'name'],
+ where: { role: 'salesPerson' },
+ },
+ },
},
{
align: 'left',
@@ -379,7 +396,7 @@ const columns = computed(() => [
field: 'created',
label: t('customer.extendedList.tableVisibleColumns.created'),
name: 'created',
- format: (value) => toDate(value),
+ format: ({ created }) => toDate(created),
},
{
align: 'left',
@@ -541,11 +558,20 @@ const selectSalesPersonId = (id) => (selectedSalesPersonId.value = id);