diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue
new file mode 100644
index 000000000..61566f777
--- /dev/null
+++ b/src/components/common/VnSelectFilter.vue
@@ -0,0 +1,58 @@
+
+
+
+ filterFn(value, update)"
+ />
+
diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue
index 2b6e275f9..b77f95d38 100644
--- a/src/pages/Claim/Card/ClaimCard.vue
+++ b/src/pages/Claim/Card/ClaimCard.vue
@@ -64,6 +64,7 @@ onMounted(async () => {
+
diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue
index 774ecff01..ace7b3e4d 100644
--- a/src/pages/Claim/Card/ClaimDevelopment.vue
+++ b/src/pages/Claim/Card/ClaimDevelopment.vue
@@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import FormModel from 'components/FormModel.vue';
import FetchData from 'components/FetchData.vue';
+import VnSelectFilter from 'components/common/VnSelectFilter.vue';
const route = useRoute();
const { t } = useI18n();
@@ -87,66 +88,6 @@ const columns = computed(() => [
optionLabel: 'description',
},
]);
-
-// function filterFn(val, update) {
-// if (val === '') {
-// update(() => {
-// options.value = stringOptions;
-// });
-// return;
-// }
-
-// update(() => {
-// const needle = val.toLowerCase();
-// options.value = stringOptions.filter((v) => v.toLowerCase().indexOf(needle) > -1);
-// });
-// }
-
-// const basicFilter = () => {
-// return {
-// options: claimReasons,
-// filterFn: (options, value) => {
-// console.log('ENTRY', value);
-// const search = value.toLowerCase();
-// if (value === '') return claimReasons.value;
-
-// const arr = options.value.filter((row) => {
-// const id = row.id;
-// const name = row.description.toLowerCase();
-// console.log('SEARCH', search, id);
-// const idMatches = id == search;
-// const nameMatches = name.indexOf(search) > -1;
-// return idMatches || nameMatches;
-// });
-// console.log(arr);
-// return arr;
-// },
-// };
-// };
-
-const basicFilter = (options, field) => {
- console.log(options, field);
- return {
- options,
- field,
- filterFn: (options, value, field) => {
- const search = value.toLowerCase();
-
- if (value === '') return options;
-
- return options.value.filter((row) => {
- console.log(row);
- const id = row.id;
- const name = row[field ?? 'name'].toLowerCase();
-
- const idMatches = id == search;
- const nameMatches = name.indexOf(search) > -1;
-
- return idMatches || nameMatches;
- });
- },
- };
-};
{
ref="claimDevelopmentForm"
:data-required="{ claimFk: route.params.id }"
>
-
+
{
>
-
- filter(
- value,
- update,
- basicFilter(col.options, col.optionLabel)
- )
- "
/>
@@ -232,27 +162,13 @@ const basicFilter = (options, field) => {
-
- filter(
- value,
- update,
- basicFilter(
- col.options,
- col.optionLabel
- )
- )
- "
/>
@@ -265,14 +181,17 @@ const basicFilter = (options, field) => {
-
-
-
+
+
+
+
+
+
+