Merge pull request #19657 from ankush/invalid_filters
fix(UX): invalid filters, incorrect std fieldtypes
This commit is contained in:
commit
40d0c8aaaf
2 changed files with 16 additions and 4 deletions
|
|
@ -112,9 +112,14 @@ $.extend(frappe.model, {
|
|||
{ fieldname: "name", fieldtype: "Link", label: __("ID") },
|
||||
{ fieldname: "owner", fieldtype: "Link", label: __("Created By"), options: "User" },
|
||||
{ fieldname: "idx", fieldtype: "Int", label: __("Index") },
|
||||
{ fieldname: "creation", fieldtype: "Date", label: __("Created On") },
|
||||
{ fieldname: "modified", fieldtype: "Date", label: __("Last Updated On") },
|
||||
{ fieldname: "modified_by", fieldtype: "Data", label: __("Last Updated By") },
|
||||
{ fieldname: "creation", fieldtype: "Datetime", label: __("Created On") },
|
||||
{ fieldname: "modified", fieldtype: "Datetime", label: __("Last Updated On") },
|
||||
{
|
||||
fieldname: "modified_by",
|
||||
fieldtype: "Link",
|
||||
label: __("Last Updated By"),
|
||||
options: "User",
|
||||
},
|
||||
{ fieldname: "_user_tags", fieldtype: "Data", label: __("Tags") },
|
||||
{ fieldname: "_liked_by", fieldtype: "Data", label: __("Liked By") },
|
||||
{ fieldname: "_comments", fieldtype: "Text", label: __("Comments") },
|
||||
|
|
|
|||
|
|
@ -39,13 +39,16 @@ frappe.ui.Filter = class {
|
|||
|
||||
this.invalid_condition_map = {
|
||||
Date: ["like", "not like"],
|
||||
Datetime: ["like", "not like"],
|
||||
Datetime: ["like", "not like", "in", "not in", "=", "!="],
|
||||
Data: ["Between", "Timespan"],
|
||||
Select: ["like", "not like", "Between", "Timespan"],
|
||||
Link: ["Between", "Timespan", ">", "<", ">=", "<="],
|
||||
Currency: ["Between", "Timespan"],
|
||||
Color: ["Between", "Timespan"],
|
||||
Check: this.conditions.map((c) => c[0]).filter((c) => c !== "="),
|
||||
Code: ["Between", "Timespan", ">", "<", ">=", "<=", "in", "not in"],
|
||||
Password: ["Between", "Timespan", ">", "<", ">=", "<=", "in", "not in"],
|
||||
Rating: ["like", "not like", "Between", "in", "not in", "Timespan"],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -497,10 +500,14 @@ frappe.ui.filter_utils = {
|
|||
"Small Text",
|
||||
"Text Editor",
|
||||
"Code",
|
||||
"Attach",
|
||||
"Attach Image",
|
||||
"Markdown Editor",
|
||||
"HTML Editor",
|
||||
"Tag",
|
||||
"Phone",
|
||||
"Comments",
|
||||
"Barcode",
|
||||
"Dynamic Link",
|
||||
"Read Only",
|
||||
"Assign",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue