AccountReachSummaryWidget = function( widgetOptions ) {
this.rootElement = null;
this.activeFilterPreferences = {};
this.widgetOptions = widgetOptions;
this.widgetOptions.config = $.extend( true, {}, this.getDefaultConfig(), widgetOptions.config );
}
AccountReachSummaryWidget.prototype.constructor = AccountReachSummaryWidget;
AccountReachSummaryWidget.prototype.getDefaultSize = function() {
return {
width : 1,
height : 2
}
}
AccountReachSummaryWidget.prototype.onDashboardLayout = function( layout ) {
// this.dataGrid.option( "height", layout.portletContentHeight - 15 );
}
AccountReachSummaryWidget.prototype.element = function() {
if( this.rootElement ) return this.rootElement;
let instance = this;
/*
instance.dataGrid = $("
").dxDataGrid( {
xwidth : 908,
//dataSource : Fse.Data.newDataSource( { object : "MFR207.accountReachSummary", paginate : false, keyField : "accountType", objectParams : objectParams }),
showBorders : true,
columns : [
{ dataField : "accountType", caption : "section", width : 100 },
{dataField : "totalAccounts", width : 100, dataType : "number"},
{dataField : "withOpps", width : 100, dataType : "number"},
{dataField : "active", width : 100, dataType : "number"},
{dataField : "activePlus", caption : "Active > 20%", width : 100, dataType : "number"},
{dataField : "sale", width : 100, dataType : "number"},
{dataField : "noSale", width : 100, dataType : "number"},
{dataField : "closeRate", width : 100, dataType : "number", format : "percent"},
{ dataField : "planReach", caption : "Reach", width : 100, dataType : "number", format : "percent" }
]
}).dxDataGrid( "instance" );
*/
instance.rootElement = $("
").addClass( "AccountReachSummaryWidget" );
// instance.rootElement.append( instance.dataGrid.element() )
instance.applyFilters();
return instance.rootElement.css( { "padding-right" : "8px" } );
}
AccountReachSummaryWidget.prototype.updateUI = function() {
let style = $("style#accountReachSummaryWidgetCSS" );
if( ! style.length ) {
$("