fix: allow dynamic link in filters

This commit is contained in:
Shariq Ansari 2024-02-04 16:55:17 +05:30
parent 7f4056cd20
commit b4d9461c65
2 changed files with 5 additions and 1 deletions

View File

@ -41,6 +41,7 @@ def get_filterable_fields(doctype: str):
"Float",
"Int",
"Currency",
"Dynamic Link",
"Link",
"Long Text",
"Select",

View File

@ -103,7 +103,7 @@ import { FormControl, Autocomplete, createResource } from 'frappe-ui'
import { h, defineModel, computed } from 'vue'
const typeCheck = ['Check']
const typeLink = ['Link']
const typeLink = ['Link', 'Dynamic Link']
const typeNumber = ['Float', 'Int', 'Currency', 'Percent']
const typeSelect = ['Select']
const typeString = ['Data', 'Long Text', 'Small Text', 'Text Editor', 'Text']
@ -324,6 +324,9 @@ function getValSelect(f) {
})),
})
} else if (typeLink.includes(fieldtype)) {
if (field.fieldtype === 'Dynamic Link') {
return h(FormControl, { type: 'text' })
}
return h(Link, { class: 'form-control', doctype: options })
} else if (typeNumber.includes(fieldtype)) {
return h(FormControl, { type: 'number' })