Skip to content

Commit

Permalink
fix: also added duration fieldtype
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Jan 28, 2024
1 parent 2780bc7 commit d783b02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions crm/api/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_filterable_fields(doctype: str):
"Small Text",
"Text Editor",
"Text",
"Duration",
"Date",
"Datetime",
]
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/Filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(
...[
Expand Down

0 comments on commit d783b02

Please sign in to comment.