Built files from Bizgaze WebServer
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

changeofferstatus.min.js 5.0KB

1
  1. var Bizgaze;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){let i;(function(t){class i extends Unibase.Platform.Core.BaseComponent{cssFiles(){throw new Error("Method not implemented.");}jsFiles(){return["apps/transact/managers/offers/offermanager.js","apps/transact/components/offers/changeofferstatus.js"]}html(){throw new Error("Method not implemented.");}load(){throw new Error("Method not implemented.");}init(){}changeofferstatus(t,i){var r=this,u;u=i==2?"Are you sure you want to De-Activate ?":"Are you sure you want to Activate ?";bootbox.confirm({message:u,closeButton:!1,buttons:{confirm:{label:"Yes",className:"btn-success"},cancel:{label:"No",className:"btn-danger"}},callback:function(u){var f,e,o,s;u&&(f="",i==2?(f="Activate",e=2,$("#Id_"+t+"").removeClass("text-danger"),$("#Id_"+t+"").addClass("text-success")):(f="activate",e=1,$("#Id_"+t+"").removeClass("text-success"),$("#Id_"+t+"").addClass("text-danger")),o=Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+Unibase.Themes.Providers.DetailHelper.installedAppId+"_recordid").Value),s={offerid:t,Statusid:e},r.fileCacheHelper.loadJsFile("apps/transact/managers/offers/offermanager.js",function(){n.Apps.Transact.Managers.OfferManager.Instance().ChangeOfferStatus(s).then(function(n){var t,i,u;n.status==Unibase.Data.Status.Success&&(t=Unibase.Themes.Compact.Components.Details.Instance(),t._recordId=o,i=Unibase.Themes.Providers.DetailHelper.installedAppId,u=$("._bizgaze_detail_container:visible").attr("id"),Unibase.Platform.Helpers.NavigationHelper.Instance().close(u,null),r.navigationHelper.loadDetail(o,i,null),MessageHelper.Instance().showSuccess(n.message,""))})}))}})}gettabscheme(t,i,r,u,f,e){var o=this;o.fileCacheHelper.loadJsFile("apps/transact/managers/offers/offermanager.js",function(){n.Apps.Transact.Managers.OfferManager.Instance().gettabsachemedata(t).then(function(n){var t=n.result,o=(t/1e5).toFixed(3);$(i).val(o);$(i).attr("disabled","disabled");$(r).change(function(){var i=Number($(r).val()),n=(t*(i/100)/1e5).toFixed(3),o=Number(n);$(u).val(n);$(u).attr("disabled","disabled");$(f).change(function(){var n=Number($(f).val()),t=(o*(n/100)).toFixed(3);$(e).val(t);$(e).attr("disabled","disabled")})})})})}changeplanstatus(){var i=this,t=[];$(".Offer_Plan_Checked").each(function(){t.push({OfferId:Number($(this).attr("id")),PlanId:Number($(this).attr("value")),Planstatus:$(".Offer_Plan_Checked_"+Number($(this).attr("value"))).is(":checked")})});t.length>0&&bootbox.confirm("Are you sure you want Change Plan Status ?",function(r){r==!0&&i.fileCacheHelper.loadJsFile("apps/transact/managers/offers/offermanager.js",function(){n.Apps.Transact.Managers.OfferManager.Instance().changeplanstatus(t).then(function(n){if(n.errors==null){var t=Unibase.Themes.Compact.Components.Details.Instance(),i=$("._bizgaze_detail_container:visible").attr("id"),r=Unibase.Themes.Providers.DetailHelper.installedAppId,u=t.unibase_core_activeportletid;t.loadWidgets(r,u,"#"+i+"");MessageHelper.Instance().showSuccess(n.message,"StageChange_errormsg")}else MessageHelper.Instance().showError(n.message,"StageChange_errormsg")})})})}ActiveAllPlans(){var i=this,t=[];$(".Offer_Plan_Checked").each(function(){t.push({OfferId:Number($(this).attr("id")),PlanId:Number($(this).attr("value")),Planstatus:1})});t.length>0&&bootbox.confirm("Are you sure you want Activate All Plans ?",function(r){r==!0&&i.fileCacheHelper.loadJsFile("apps/transact/managers/offers/offermanager.js",function(){n.Apps.Transact.Managers.OfferManager.Instance().changeplanstatus(t).then(function(n){if(n.errors==null){var t=Unibase.Themes.Compact.Components.Details.Instance(),i=$("._bizgaze_detail_container:visible").attr("id"),r=Unibase.Themes.Providers.DetailHelper.installedAppId,u=t.unibase_core_activeportletid;t.loadWidgets(r,u,"#"+i+"");MessageHelper.Instance().showSuccess(n.message,"StageChange_errormsg")}else MessageHelper.Instance().showError(n.message,"StageChange_errormsg")})})})}InactiveAllPlans(){var i=this,t=[];$(".Offer_Plan_Checked").each(function(){t.push({OfferId:Number($(this).attr("id")),PlanId:Number($(this).attr("value")),Planstatus:2})});t.length>0&&bootbox.confirm("Are you sure you want In-Active All Plans ?",function(r){r==!0&&i.fileCacheHelper.loadJsFile("apps/transact/managers/offers/offermanager.js",function(){n.Apps.Transact.Managers.OfferManager.Instance().changeplanstatus(t).then(function(n){if(n.errors==null){var t=Unibase.Themes.Compact.Components.Details.Instance(),i=$("._bizgaze_detail_container:visible").attr("id"),r=Unibase.Themes.Providers.DetailHelper.installedAppId,u=t.unibase_core_activeportletid;t.loadWidgets(r,u,"#"+i+"");MessageHelper.Instance().showSuccess(n.message,"StageChange_errormsg")}else MessageHelper.Instance().showError(n.message,"StageChange_errormsg")})})})}static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}}t.ChangeOfferstatus=i})(i=t.Offers||(t.Offers={}))})(i=t.Components||(t.Components={}))})(i=t.Transact||(t.Transact={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));