EOS/Scripts/out/files/Report_declinedCalls.js.html
Nidhi Bhargava f0c1ab20e1 code push
2025-09-04 16:25:07 +05:30

440 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Report\declinedCalls.js</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="../assets/css/logo.png" title=""></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: </em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/CallFeedbackRating.html">CallFeedbackRating</a></li>
<li><a href="../classes/CloseTicketReport.html">CloseTicketReport</a></li>
<li><a href="../classes/ConsolidatedReport.html">ConsolidatedReport</a></li>
<li><a href="../classes/CustomerReport.html">CustomerReport</a></li>
<li><a href="../classes/DealerWiseCallDetails.html">DealerWiseCallDetails</a></li>
<li><a href="../classes/DeclinedCalls.html">DeclinedCalls</a></li>
<li><a href="../classes/DropDownData.html">DropDownData</a></li>
<li><a href="../classes/EicherPromise.html">EicherPromise</a></li>
<li><a href="../classes/EosCallCount.html">EosCallCount</a></li>
<li><a href="../classes/GeoAnalysis.html">GeoAnalysis</a></li>
<li><a href="../classes/HdBusLmdContrCallFeedbackRatingibution.html">HdBusLmdContrCallFeedbackRatingibution</a></li>
<li><a href="../classes/HdBusLmdContribution.html">HdBusLmdContribution</a></li>
<li><a href="../classes/HistoryTracking.html">HistoryTracking</a></li>
<li><a href="../classes/LiveTracking.html">LiveTracking</a></li>
<li><a href="../classes/ManageEscalation.html">ManageEscalation</a></li>
<li><a href="../classes/ManageFleet.html">ManageFleet</a></li>
<li><a href="../classes/ManageFleet_Detail.html">ManageFleet_Detail</a></li>
<li><a href="../classes/ManageFleet_details.html">ManageFleet_details</a></li>
<li><a href="../classes/ManageOwner.html">ManageOwner</a></li>
<li><a href="../classes/ManageReason.html">ManageReason</a></li>
<li><a href="../classes/ManageVechile.html">ManageVechile</a></li>
<li><a href="../classes/ManageVehicle.html">ManageVehicle</a></li>
<li><a href="../classes/NonVecvUserManagement.html">NonVecvUserManagement</a></li>
<li><a href="../classes/Notifications.html">Notifications</a></li>
<li><a href="../classes/OpenTicketReport.html">OpenTicketReport</a></li>
<li><a href="../classes/OrganizationChart.html">OrganizationChart</a></li>
<li><a href="../classes/PositioningTool.html">PositioningTool</a></li>
<li><a href="../classes/PositioningTool_Report.html">PositioningTool_Report</a></li>
<li><a href="../classes/ReasonForClosure.html">ReasonForClosure</a></li>
<li><a href="../classes/Report.html">Report</a></li>
<li><a href="../classes/ShowDealerMap.html">ShowDealerMap</a></li>
<li><a href="../classes/TicketAdministration.html">TicketAdministration</a></li>
<li><a href="../classes/TicketAdministration_FullDetail.html">TicketAdministration_FullDetail</a></li>
<li><a href="../classes/TicketFeedback.html">TicketFeedback</a></li>
<li><a href="../classes/TicketForDealer.html">TicketForDealer</a></li>
<li><a href="../classes/TicketForDealer_FullDetails.html">TicketForDealer_FullDetails</a></li>
<li><a href="../classes/TicketReassign.html">TicketReassign</a></li>
<li><a href="../classes/TileDashboard.html">TileDashboard</a></li>
<li><a href="../classes/TimeSlotClosure.html">TimeSlotClosure</a></li>
<li><a href="../classes/TollFreeAndOpportunityLoss.html">TollFreeAndOpportunityLoss</a></li>
<li><a href="../classes/VanCoverageDesigner.html">VanCoverageDesigner</a></li>
<li><a href="../classes/VecvUserManagement.html">VecvUserManagement</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="../modules/Dashboard.html">Dashboard</a></li>
<li><a href="../modules/DropDownData.html">DropDownData</a></li>
<li><a href="../modules/Geo.html">Geo</a></li>
<li><a href="../modules/Inventory.html">Inventory</a></li>
<li><a href="../modules/Notifications.html">Notifications</a></li>
<li><a href="../modules/ReportModule.html">ReportModule</a></li>
<li><a href="../modules/Ticket.html">Ticket</a></li>
<li><a href="../modules/TrackingModule.html">TrackingModule</a></li>
<li><a href="../modules/UserManagement.html">UserManagement</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: Report\declinedCalls.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
/*================================================================================================================\
+
+ Project : GODATA-VECV
+ Filename : declinedCalls.js
+ Module Name : ReportModule
+ Purpose : To show and export Declined Calls report.
+ Coded By : Pankaj Khandal
+
+================================================================================================================*/
/**
* To show and export reports.
* @module ReportModule
*/
/**
* To show and export Declined Calls report.
* @class DeclinedCalls
* @constructor
*/
/**
* Global References: To store ajax request&#x27;s XHR objects.
* @for DeclinedCalls
*/
var xhr_report = null;
var xhr_exportExport = null;
//================== FILTERS Section Start =========================
/**
* To populate state combobox.
* @method loadStateChoices
* @for DeclinedCalls
*/
function loadStateChoices() {
SecurityToken = securityToken;
utcMinutes = parseInt(UtcMinutes, 10);
UserId = userId;
$.ajax({
type: &quot;POST&quot;,
url: WCFRESTURL.GetStateListIdWise,
data: { Token: SecurityToken, UtcMinutes: utcMinutes, UserId: UserId },
dataType: &quot;json&quot;,
success: function (data) {
$(&quot;#stateCombobox&quot;).kendoComboBox({
dataTextField: &quot;StateAlias&quot;,
dataValueField: &quot;StateId&quot;,
filter: &quot;contains&quot;,
dataSource: data,
change: function () {
// loading cities according to state id
loadCityChoices($(&quot;#stateCombobox&quot;).val());
loadDealerChoices($(&quot;#stateCombobox&quot;).data(&quot;kendoComboBox&quot;).text(), $(&quot;#cityCombobox&quot;).data(&quot;kendoComboBox&quot;).text());
}
});
},
complete: function () {
//$(&quot;#stateCombobox&quot;).data(&#x27;kendoComboBox&#x27;).select(0);
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
}
/**
* To populate city combobox.
* @method loadCityChoices
* @param {String} stateId id of state
* @for DeclinedCalls
*/
function loadCityChoices(stateId) {
SecurityToken = securityToken;
utcMinutes = parseInt(UtcMinutes, 10);
UserId = userId;
$.ajax({
type: &quot;POST&quot;,
url: WCFRESTURL.GetCityListStateIdWise,
data: { Token: SecurityToken, UtcMinutes: utcMinutes, UserId: UserId, StateId: stateId },
dataType: &quot;json&quot;,
success: function (data) {
$(&quot;#cityCombobox&quot;).kendoComboBox({
dataTextField: &quot;CityName&quot;,
dataValueField: &quot;CityId&quot;,
filter: &quot;contains&quot;,
dataSource: data,
change: function () {
loadDealerChoices($(&quot;#stateCombobox&quot;).data(&quot;kendoComboBox&quot;).text(), $(&quot;#cityCombobox&quot;).data(&quot;kendoComboBox&quot;).text());
}
});
},
complete: function () {
$(&quot;#cityCombobox&quot;).data(&quot;kendoComboBox&quot;).text(&#x27;&#x27;);
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
}
/**
* To populate city combobox.
* @method loadCityChoices
* @param {String} state state-name
* @param {String} city city-name
* @for DeclinedCalls
*/
function loadDealerChoices(state, city) {
SecurityToken = securityToken;
utcMinutes = parseInt(UtcMinutes, 10);
UserId = userId;
$.ajax({
type: &quot;POST&quot;,
url: WCFRESTURL.GetDealerStateCityWise,
data: { Token: SecurityToken, UtcMinutes: utcMinutes, UserId: UserId, DealerStateParam: state, DealerCityParam: city },
dataType: &quot;json&quot;,
success: function (data) {
$(&quot;#dealerCombobox&quot;).kendoComboBox({
dataTextField: &quot;DealerDealerName&quot;,
dataValueField: &quot;DealerId&quot;,
filter: &quot;contains&quot;,
dataSource: data,
});
},
complete: function () {
$(&quot;#dealerCombobox&quot;).data(&quot;kendoComboBox&quot;).text(&#x27;&#x27;);
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
}
//================== FILTERS Section End =========================
/**
* To get filter parameters and show report and showing/hiding export functionality accordingly.
* @method showReport
* @for DeclinedCalls
*/
function showReport() {
// hiding the excel icon
$(&#x27;.excelIcon&#x27;).hide();
// Making the target Div Container empty
$(&#x27;#divGrid&#x27;).empty();
SecurityToken = securityToken;
utcMinutes = parseInt(UtcMinutes, 10);
UserId = userId;
var startDate = $(&quot;#fromDatePicker&quot;).val(),
endDate = $(&quot;#fromDatePicker&quot;).val(),
state = $(&quot;#stateCombobox&quot;).data(&quot;kendoComboBox&quot;).text(),
city = $(&quot;#cityCombobox&quot;).data(&quot;kendoComboBox&quot;).text(),
dealerId = $(&quot;#dealerCombobox&quot;).val();
// sending the Ajax request to show the outage report and handling its completion
if (xhr_report &amp;&amp; xhr_report.readystate != 4) {
xhr_report.abort();
}
xhr_report = $.ajax({
type: &quot;POST&quot;,
url: &quot;/Report/ShowDeclinedCalls/&quot;,
data: { Token: SecurityToken, UtcMinutes: utcMinutes, UserId: UserId, fromDate: startDate, toDate: endDate, state: state, city: city, dealerId: dealerId },
success: function (data) {
// populating HTML on page
$(&#x27;#divGrid&#x27;).html(data);
// Showing/Hising the Excel Icon according to received data.
if (data.length &lt; 300) { $(&#x27;.excelIcon&#x27;).hide(); }
else { $(&#x27;.excelIcon&#x27;).show(); }
},
complete: function () {
},
error: function (data) {
// hiding the excel icon
$(&#x27;.excelIcon&#x27;).hide();
console.log(&quot;Error&quot;);
}
});
}
/**
* To get filter parameters and export report.
* @method exportReport
* @for DeclinedCalls
*/
function exportReport() {
SecurityToken = securityToken;
utcMinutes = parseInt(UtcMinutes, 10);
UserId = userId;
var startDate = $(&quot;#fromDatePicker&quot;).val(),
endDate = $(&quot;#fromDatePicker&quot;).val(),
state = $(&quot;#stateCombobox&quot;).data(&quot;kendoComboBox&quot;).text(),
city = $(&quot;#cityCombobox&quot;).data(&quot;kendoComboBox&quot;).text(),
dealerId = $(&quot;#dealerCombobox&quot;).val();
// sending ajax request to export ICR Unique Users and Data Usage to Excel, and hadling its completion
if (xhr_exportExport &amp;&amp; xhr_exportExport.readystate != 4) {
xhr_exportExport.abort();
}
xhr_exportExport = $.ajax({
type: &quot;POST&quot;,
url: &quot;/Report/ExportDeclinedCalls/&quot;,
data: { Token: SecurityToken, UtcMinutes: utcMinutes, UserId: UserId, fromDate: startDate, toDate: endDate, state: state, city: city, dealerId: dealerId },
success: function (data) {
// making the generated Excel available for downloading.
window.location.href = data;
},
complete: function () {
},
error: function (data) {
console.log(&quot;Error in Export to Excel&quot;);
}
});
}
/**
* Fired when Html-DOM is ready.
* @event $(document).ready
* @for DeclinedCalls
*/
$(document).ready(function () {
// populating state, city &amp; dealer comboboxes
loadStateChoices();
loadCityChoices($(&quot;#stateCombobox&quot;).val())
loadDealerChoices($(&quot;#stateCombobox&quot;).val(), $(&quot;#cityCombobox&quot;).val());
});
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>