Добрый день. Подскажите, кто-нибудь уже делал быстрые фильтры, для кастомной детали.
Пробовал сделать так, но фильтры на детали не отобразились:
define("UsrScheduleForAllDayDetail", [], function() {
return {
entitySchemaName: "UsrScheduleForAllDay",
messages: {
/**
* @message GetFixedFilter
* ######## ######## FixedFilter.
* @param {String} ######## #######.
* @return {Object} ######.
*/
"GetFixedFilter": {
mode: this.Terrasoft.MessageMode.PTP,
direction: this.Terrasoft.MessageDirectionType.PUBLISH
},
},
details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
diff: /**SCHEMA_DIFF*/[
{
"operation": "merge",
"name": "DataGrid",
"values": {
"type": "listed",
"hierarchical": true,
"sortColumnDirection": { "bindTo": "disableGridSorting" },
"hierarchicalColumnName": "ParentId",
"updateExpandHierarchyLevels": {
"bindTo": "onExpandHierarchyLevels"
},
"expandHierarchyLevels": {
"bindTo": "expandHierarchyLevels"
}
}
},
{
"operation": "insert",
"name": "QuickFilterModuleContainer",
"parentName": "Detail",
"propertyName": "items",
"values": {
"id": "QuickFilterModuleContainer",
"selectors": {wrapEl: "#QuickFilterModuleContainer"},
"itemType": Terrasoft.ViewItemType.CONTAINER,
"wrapClass": ["quick-filter-module-container-wrapClass"],
"items": []
}
}
]/**SCHEMA_DIFF*/,
methods: {
init: function() {
this.callParent(arguments);
this.initFixedFiltersConfig();
},
initFixedFiltersConfig: function() {
var fixedFilterConfig = {
entitySchema: this.entitySchema,
filters: [
{
name: "PeriodFilter",
caption: this.get("Resources.Strings.PeriodFilterCaption"),
dataValueType: this.Terrasoft.DataValueType.DATE,
startDate: {
columnName: "UsrDate",
defValue: this.Terrasoft.startOfWeek(new Date())
},
dueDate: {
columnName: "UsrDate",
defValue: this.Terrasoft.endOfWeek(new Date())
}
}
]
};
this.set("FixedFilterConfig", fixedFilterConfig);
},