Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

createserviceprovider.min.js 5.7KB

1
  1. var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Unibase;(function(n){let t;(function(t){let i;(function(i){let r;(function(i){class r extends t.Core.BaseComponent{jsFiles(){return["platform/integrations/managers/integrationmanager.js","platform/integrations/components/createintegrator.js","platform/integrations/components/createserviceprovider.js","platform/integrations/components/synclog.js"]}cssFiles(){return[]}init(){return __awaiter(this,void 0,void 0,function*(){this.navigationHelper.popup(0,"",n.Platform.Integrations.Components.CreateServiceProvider.Instance(),null,t.Helpers.Size.Large)})}html(){return'<div id="Unibase_serviceProvider" default="" data-validate="parsley" data-isdynamic="false"><div class="b-b bg-white header serviceProviderHeader"><strong class="text-dark">Service Provider<\/strong><a class="btn btn-sm ml-auto"><i class="ti-help-alt" title="help" href="javascript:;" target="_blank"><\/i><\/a><\/div><div data-simplebar class="simple-scroll-bar scrollable service-provider-body"><div id="Unibase_ValidationSummary" class="clear mt-10"><\/div><div class="card"><div class="card-body"><div class="row"> <div class="col-sm-12"><ul class="list-group no-border m-t-n-sm list-group no-border providers-list divproviders"> <\/ul><\/div> <div class="alert alert-info wrapper-lg" id="div_Providers">There is no Providers<\/div><\/div><\/div><\/div><\/div><div id="div_serviceProviderFooter" class="bg-white footer"><a class="btn btn-light btn-sm btn-center mr-auto btn-close" id="btnClose">Close<\/a><a class="btn btn-primary btn-center btn-sm text-white" id="btnRefresh">Refresh<\/a><\/div><\/div>'}load(){r.Instance().loadServiceProviders()}loadForm(){}loadServiceProviders(){var t=n.Themes.Providers.DetailHelper.recordId;n.Platform.Integrations.Managers.IntegrationManager.Instance().getservicesbyIntegrator(t).then(function(n){var i;if(n.result.length==0)$("#div_Providers").show();else for($("#div_Providers").hide(),$(".providers-list").html('<li class="providers-item"><div class= "row card-header"><strong class="col-sm-5">Name<\/strong><strong class="col-sm-5">Display Text<\/strong> <\/div><\/li>'),i=0;i<n.result.length;i++){var r="",t=n.result[i],r='<li class="row list-group-item integ-details providers-item li-'+t.ServiceId+'"><div class="row"><div class="h5 col-sm-5 providerServiceName" id="providerServiceName" style="overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">'+t.ProviderName+"_"+t.ServiceName+'<\/div><div class="col-sm-6"><input type="textbox" id="txt_displayName_'+t.ServiceId+'" class="txt_displayName col-sm-12 required" value="'+t.ProviderName+"_"+t.ServiceName+'"/><\/div><a onclick="javascript:Unibase.Platform.Integrations.Components.CreateServiceProvider.Instance().saveServiceIntegrator('+t.ServiceId+');" class="btn btn-primary divInstall_'+t.ServiceId+' pull-right">Add<\/a><\/div>';r+="<\/li>";$(".providers-item:last").after(r)}$.when($(".providerServiceName").filter(function(){return $(this).css("text-overflow")=="ellipsis"}).each(function(){this.offsetWidth<this.scrollWidth&&!$(this).attr("title")&&$(this).attr("title",$(this).text())}))})}saveServiceIntegrator(t){if(t!=null&&t!=undefined){var i={ServiceId:t,IntegratorId:n.Themes.Providers.DetailHelper.recordId,TimeInterval:Number(0),IsUpdate:!1,DisplayText:$("#txt_displayName_"+t).val()!=undefined?$("#txt_displayName_"+t).val().toString():""};let r=n.Platform.Forms.Components.FormViewer.Instance().requiredFieldValidation("Unibase_serviceProvider");if(r==!1)return MessageHelper.Instance().showError("Mandatory fields are missing","Unibase_ValidationSummary"),!1;n.Platform.Integrations.Managers.IntegrationManager.Instance().saveServiceIntegrator(i).then(function(t){t.status==n.Data.Status.Success?($("#btnClose").click(),MessageHelper.Instance().showSuccess(t.message,"")):MessageHelper.Instance().showError(t.message,"Unibase_ValidationSummary")})}}saveSettings(t,i,r){var e=this,u,f;r==!1?$("#exeService_"+i).text("Executing..."):$("#downloadData_"+i).text("Downloading...");u=[];$("#div_InputSettings").find(".item-row").each(function(){var n=$(this).find(".hf_Header_Service").val(),t=$(this).find(".hf_Header_ServiceId").val(),i=$(this).find(".txt_ConfigKey_Collection").val(),r=$(this).find(".txt_ConfigValue_Collection").val(),f=$(this).find(".hf_Header_SettingTypeId").val(),e={ServiceSettingId:Number(n),ServiceId:Number(t),SettingName:i.toString(),SettingValue:r,SettingTypeId:Number(f),IsInput:!0};u.push(e)});f={ServiceSettings:u,ServiceIntegratorId:Number(i),IsDownload:r};this.fileCacheHelper.loadJsFile("platform/integrations/managers/integrationmanager.js",function(){n.Platform.Integrations.Managers.IntegrationManager.Instance().executeServiceRequest(f).then(function(n){if(r==!1?($("#exeService_"+i).text("Execute Service"),t!=""&&($("#"+t).modal("hide"),$("#"+t).remove())):(e.downloadfile(n.result),$("#downloadData_"+i).text("Download")),n.errors!=null)return alert(n.message),!1;MessageHelper.Instance().showSuccess(n.message,"")})})}downloadfile(n){var t=n.split("/"),r=t[t.length-1].split("."),i;n=n.split("/").join("\\");i="/apis/v4/Documents/DownloadFile?filename="+n.replace(window.location.origin+"/","");window.location.href=_appsettings.server_url()+i}loadSyncLog(t){n.Platform.Integrations.Components.SyncLog.serviceIntegratorId=t;n.Platform.Integrations.Components.SyncLog.Instance().loadForm(0,0,0,"","")}static Instance(){return new r}}i.CreateServiceProvider=r})(r=i.Components||(i.Components={}))})(i=t.Integrations||(t.Integrations={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));