mirror of
https://github.com/frappe/books.git
synced 2025-01-08 01:14:39 +00:00
incr: add filter prop on Field
This commit is contained in:
parent
f59120e2a6
commit
48be520b20
@ -91,7 +91,8 @@
|
|||||||
"fieldname": "outstandingAmount",
|
"fieldname": "outstandingAmount",
|
||||||
"label": "Outstanding Amount",
|
"label": "Outstanding Amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"readOnly": true
|
"readOnly": true,
|
||||||
|
"filter": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "setDiscountAmount",
|
"fieldname": "setDiscountAmount",
|
||||||
|
@ -90,7 +90,8 @@
|
|||||||
"fieldname": "outstandingAmount",
|
"fieldname": "outstandingAmount",
|
||||||
"label": "Outstanding Amount",
|
"label": "Outstanding Amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"readOnly": true
|
"readOnly": true,
|
||||||
|
"filter": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "setDiscountAmount",
|
"fieldname": "setDiscountAmount",
|
||||||
|
@ -33,6 +33,7 @@ export interface BaseField {
|
|||||||
groupBy?: string; // UI Facing used in dropdowns fields
|
groupBy?: string; // UI Facing used in dropdowns fields
|
||||||
meta?: boolean; // Field is a meta field, i.e. only for the db, not UI
|
meta?: boolean; // Field is a meta field, i.e. only for the db, not UI
|
||||||
inline?: boolean; // UI Facing config, whether to display doc inline.
|
inline?: boolean; // UI Facing config, whether to display doc inline.
|
||||||
|
filter?: boolean; // UI Facing config, whether to be used to filter the List.
|
||||||
computed?: boolean; // Computed values are not stored in the database.
|
computed?: boolean; // Computed values are not stored in the database.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,10 +214,11 @@ export default {
|
|||||||
];
|
];
|
||||||
return fyo.schemaMap[this.schemaName].fields.filter(
|
return fyo.schemaMap[this.schemaName].fields.filter(
|
||||||
(f) =>
|
(f) =>
|
||||||
!f.computed &&
|
f.filter ||
|
||||||
|
(!f.computed &&
|
||||||
!excludedFieldsTypes.includes(f.fieldtype) &&
|
!excludedFieldsTypes.includes(f.fieldtype) &&
|
||||||
!f.meta &&
|
!f.meta &&
|
||||||
!f.readOnly
|
!f.readOnly)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
fieldOptions() {
|
fieldOptions() {
|
||||||
|
Loading…
Reference in New Issue
Block a user