fix: allow currency fieldtype in filter

This commit is contained in:
Shariq Ansari 2024-01-28 20:02:46 +05:30
parent 322f9d7dda
commit 2780bc7b40
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -104,7 +104,7 @@ import { h, defineModel, computed } from 'vue'
const typeCheck = ['Check']
const typeLink = ['Link']
const typeNumber = ['Float', 'Int']
const typeNumber = ['Float', 'Int', 'Currency', 'Percent']
const typeSelect = ['Select']
const typeString = ['Data', 'Long Text', 'Small Text', 'Text Editor', 'Text']
const typeDate = ['Date', 'Datetime']
@ -209,6 +209,7 @@ function getOperators(fieldtype, fieldname) {
options = [
{ label: 'Like', value: 'like' },
{ label: 'Not Like', value: 'not like' },
{ label: 'Is', value: 'is' },
]
}
if (typeNumber.includes(fieldtype)) {
@ -340,6 +341,7 @@ function getSelectOptions(options) {
}
function setfilter(data) {
if (!data) return
filters.value.add({
field: {
label: data.label,