fix: also added duration fieldtype

This commit is contained in:
Shariq Ansari 2024-01-28 20:18:44 +05:30
parent 2780bc7b40
commit d783b02dd8
2 changed files with 10 additions and 0 deletions

View File

@ -47,6 +47,7 @@ def get_filterable_fields(doctype: str):
"Small Text",
"Text Editor",
"Text",
"Duration",
"Date",
"Datetime",
]

View File

@ -247,6 +247,15 @@ function getOperators(fieldtype, fieldname) {
if (typeCheck.includes(fieldtype)) {
options.push(...[{ label: 'Equals', value: 'equals' }])
}
if (['Duration'].includes(fieldtype)) {
options.push(
...[
{ label: 'Like', value: 'like' },
{ label: 'Not Like', value: 'not like' },
{ label: 'Is', value: 'is' },
]
)
}
if (typeDate.includes(fieldtype)) {
options.push(
...[