var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{cssFiles(){return[]}jsFiles(){return["platform/integrations/managers/integrationmanager.js","platform/analytics/components/reportviewer/linkreport.js","platform/dataapis/managers/dataapimanager.js","platform/analytics/components/reportviewer/_reportviewer.js"]}html(){return`
`}load(){var t=this,i,r,u,f;$("#txtAutocomplete_Plant").change(function(){t.loadServiceIntegrators()});t.loadBranches();r="";n.Platform.Membership.Infos.Identity.getCurrentUser().settings!=null&&(i=n.Platform.Membership.Infos.Identity.getCurrentUser().settings.find(n=>n.settingName=="branchcode").settingValue,r=n.Platform.Membership.Infos.Identity.getCurrentUser().settings.find(n=>n.settingName=="branchname").settingValue);u=new Option(r+"("+i+")",i,!0);f=n.Platform.Membership.Infos.Identity.getCurrentUser().isAdmin;f==!0&&i==""&&(u=new Option("All","0",!0));$("#txtAutocomplete_Plant").append(u);$("#txt_fromDate").val(moment().format("YYYY-MM-DD"));$("#txt_toDate").val(moment().format("YYYY-MM-DD"));t.loadServiceIntegrators();$("#txt_fromDate").change(function(){t.loadServiceIntegrators()});$("#txt_toDate").change(function(){t.loadServiceIntegrators()})}init(t){var i=this;i.fileCacheHelper.loadJsFiles(["platform/integrations/components/integrationapilog.js"],function(){i.navigationHelper.loadSection(0,t,n.Platform.Integrations.Components.ApiLog.Instance(),null,null)})}loadBranches(){var i=n.Platform.Membership.Infos.Identity.getCurrentUser().userId,r=n.Platform.Membership.Infos.Identity.getCurrentUser().isAdmin,t=_appsettings.server_url()+"/apis/v4/bizgaze/crm/companies/getuserbranchesautoComplete/userid/"+i;r==!0&&(t=_appsettings.server_url()+"/apis/v4/bizgaze/crm/companies/getallbranchesautoComplete");AutoCompleteHelper.getHelper().Create($("#txtAutocomplete_Plant"),"#hfAutocomplete_Plant",t,function(){})}loadForm(){}loadServiceIntegrators(){var t='
Service Integrator Name<\/strong>Queue<\/strong>Success<\/strong>Fail<\/strong><\/div><\/li>';this.fileCacheHelper.loadJsFiles(["platform/integrations/managers/integrationmanager.js"],null);var i=$("#txtAutocomplete_Plant").val()!=null&&$("#txtAutocomplete_Plant").val()!="0"&&$("#txtAutocomplete_Plant").val()!="isadmin"?$("#txtAutocomplete_Plant").val():undefined,r=$("#txt_fromDate").val(),u=$("#txt_toDate").val();n.Platform.Integrations.Managers.IntegrationManager.Instance().getServiceIntegrators(i,r,u).then(function(n){var i;if(n.result.length>0)for(i=0;i'+f+'<\/span>'+r.DraftCount+'<\/a>'+r.SuccessCount+'<\/a>'+r.FailedCount+"<\/a><\/div><\/li>"}else t+='No Data Found<\/span><\/li>';$("#div_serviceintegrators").html(t)})}loadApiQueueReportByStatus(t,i){var r=[],u=[];r.push({Key:"RefId",Value:t.toString(),ExpOp:1},{Key:"ApiStatusId",Value:i.toString(),ExpOp:1});$("#txtAutocomplete_Plant").val()!="isadmin"&&r.push({Key:"RefColumnValue1",Value:$("#txtAutocomplete_Plant").val(),ExpOp:1});u.push({ParameterName:"createddate",ParameterValue:0,FromDate:$("#txt_fromDate").val(),ToDate:$("#txt_toDate").val()});n.Platform.Analytics.Components.ReportViewer.Instance().report_ViewAllByUniqueId("Unibase_Platform_DataLists_DataLists_Report_ApiQueueReport","",r,u)}loadApiQueueReport(t){var i=[],r=[];i.push({Key:"RefId",Value:t.toString()},{Key:"ApiStatusId",Value:"1"});$("#txtAutocomplete_Plant").val()!="isadmin"&&i.push({Key:"RefColumnValue1",Value:$("#txtAutocomplete_Plant").val()});r.push({ParameterName:"createddate",ParameterValue:0,FromDate:$("#txt_fromDate").val(),ToDate:$("#txt_toDate").val()});n.Platform.Analytics.Components.ReportViewer.Instance().report_ViewAllByUniqueId("Unibase_Platform_DataLists_DataLists_Report_ApiQueueReport","",i,r)}loadApiLogSuccessReport(t){var i=[],r=[];i.push({Key:"RefId",Value:t.toString()},{Key:"StatusCode",Value:"0"});$("#txtAutocomplete_Plant").val()!="isadmin"&&i.push({Key:"RefColumnValue1",Value:$("#txtAutocomplete_Plant").val()});r.push({ParameterName:"createddate",ParameterValue:0,FromDate:$("#txt_fromDate").val(),ToDate:$("#txt_toDate").val()});n.Platform.Analytics.Components.ReportViewer.Instance().report_ViewAllByUniqueId("Unibase_Platform_DataLists_DataLists_Report_DataApiLogReport","",i,r)}loadApiLogFailedReport(t){var i=[],r=[];i.push({Key:"RefId",Value:t.toString()},{Key:"StatusCode",Value:"2"});$("#txtAutocomplete_Plant").val()!="isadmin"&&i.push({Key:"RefColumnValue1",Value:$("#txtAutocomplete_Plant").val()});r.push({ParameterName:"createddate",ParameterValue:0,FromDate:$("#txt_fromDate").val(),ToDate:$("#txt_toDate").val()});n.Platform.Analytics.Components.ReportViewer.Instance().report_ViewAllByUniqueId("Unibase_Platform_DataLists_DataLists_Report_DataApiLogReport","",i,r)}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.ApiLog=i})(i=t.Components||(t.Components={}))})(i=t.Integrations||(t.Integrations={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));