Files
CRM/layouts/v7/modules/HelpDesk/dashboards/OpenTickets.tpl
BACHIR SOULDI 2794e62571 first commit
2025-09-28 08:49:37 +01:00

43 lines
1.5 KiB
Smarty

{*<!--
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
-->*}
<div class="dashboardWidgetHeader">
{include file="dashboards/WidgetHeader.tpl"|@vtemplate_path:$MODULE_NAME}
</div>
<div class="dashboardWidgetContent">
{include file="dashboards/DashBoardWidgetContents.tpl"|@vtemplate_path:$MODULE_NAME}
</div>
<div class="widgeticons dashBoardWidgetFooter">
<div class="footerIcons pull-right">
{include file="dashboards/DashboardFooterIcons.tpl"|@vtemplate_path:$MODULE_NAME}
</div>
</div>
<script type="text/javascript">
Vtiger_Pie_Widget_Js('Vtiger_OpenTickets_Widget_Js',{},{
/**
* Function which will give chart related Data
*/
generateData : function() {
var container = this.getContainer();
var jData = container.find('.widgetData').val();
var data = JSON.parse(jData);
var chartData = [];
for(var index in data) {
var row = data[index];
var rowData = [row.name, parseInt(row.count), row.id];
chartData.push(rowData);
}
return {literal}{'chartData':chartData}{/literal};
}
});
</script>