var Unibase;(function(n){let t;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{init(){return null}loadControl(){return null}loadControlSettings(){return null}loadPropertySettings(){return null}bindEditFormDetails(){return null}Refresh(){let i=0,r=!1,u=!1,f=this,t=n.Themes.Providers.DetailHelper.installedAppId,e=n.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+t+"_conflictid"),o=n.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+t+"_isexecuteinalldistributors"),s=n.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+t+"_iscomparisonconflict");e!=undefined&&(i=Number(e.Value));o!=undefined&&(r=o.Value);s!=undefined&&(u=s.Value);r==!0||u==!0?($("#DetailSetting_"+t+"_RefreshConflict").addClass("hidden"),$("#DetailSetting_"+t+"_RefreshConflictInAllDistributors").removeClass("hidden"),$("#DetailSetting_"+t+"_RefreshConflictInAllDistributors").unbind().click(function(){f.RefreshConflictInAllDistributors(i)})):($("#DetailSetting_"+t+"_RefreshConflict").removeClass("hidden"),$("#DetailSetting_"+t+"_RefreshConflictInAllDistributors").addClass("hidden"),$("#DetailSetting_"+t+"_RefreshConflict").unbind().click(function(){f.RefreshConflict(i)}))}RefreshAllConflicts(){let t=this,i={ConflictId:0,Page:0,PageSize:1};t.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js",function(){n.Utilities.Managers.ConflictManager.Instance().RefreshAllConflicts(i).then(function(n){n.errors!=null&&n.errors.length>0?MessageHelper.Instance().showError(n.message,"div_message"):MessageHelper.Instance().showSuccess(n.message,"div_message")})})}RefreshConflict(t){let i=this,r={ConflictId:t,Page:0,PageSize:1};i.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js",function(){n.Utilities.Managers.ConflictManager.Instance().RefreshConflict(r).then(function(n){n.errors!=null&&n.errors.length>0?MessageHelper.Instance().showError(n.message,"div_message"):MessageHelper.Instance().showSuccess(n.message,"div_message")})})}RefreshConflictInAllDistributors(t){let i=this,r={ConflictId:t,Page:0,PageSize:1};i.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js",function(){n.Utilities.Managers.ConflictManager.Instance().RefreshConflictInAllDistributors(r).then(function(n){n.errors!=null&&n.errors.length>0?MessageHelper.Instance().showError(n.message,"div_message"):MessageHelper.Instance().showSuccess(n.message,"div_message")})})}DeleteConflict(){let u=this,i=0,t=n.Themes.Providers.DetailHelper.installedAppId,r=n.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+t+"_conflictid"),f=n.Themes.Providers.Detail_Settings.Instance().InputParameters.find(n=>n.Key=="hf_"+t+"_isexecuteinalldistributors");r!=undefined&&(i=Number(r.Value));u.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js",function(){n.Utilities.Managers.ConflictManager.Instance().DeleteConflict(i).then(function(i){i.errors!=null&&i.errors.length>0?MessageHelper.Instance().showError(i.message,"div_message"):(MessageHelper.Instance().showSuccess(i.message,"div_message"),n.Themes.Compact.Components.Nav.Instance().loadList(t))})})}ConflictEvents(){let n=this;$(".divCustomProperties_distributorquery, .divCustomProperties_currentdbquery, .divCustomProperties_query").addClass("mb-20");var t=$(".hdn_conflictid").val();$(".divCustomProperties_countreportid, .divCustomProperties_datareportid").addClass("hidden");$(".divCustomProperties_iscomparison").addClass("hidden");$(".divCustomProperties_currentdbquery, .divCustomProperties_distributorquery").addClass("hidden");$("#chk_iscomparisonconflict").change(function(){n.ChangedIsCompConflict_chbx()});$("#chk_isexecuteinalldistributors").change(function(){n.ChangedIsExecInAllDistributors_chbx()});t!=0&&(n.ChangedIsExecInAllDistributors_chbx(),n.ChangedIsCompConflict_chbx())}ChangedIsExecInAllDistributors_chbx(){$("#chk_isexecuteinalldistributors").prop("checked")==!0?($(".divCustomProperties_countreportid, .divCustomProperties_datareportid").removeClass("hidden"),$("#chk_iscomparisonconflict").prop("checked",!1)):($(".divCustomProperties_countreportid, .divCustomProperties_datareportid").addClass("hidden"),$(".txtAutoComplete_countreportid, .txtAutoComplete_datareportid").val("").trigger("change"))}ChangedIsCompConflict_chbx(){$("#chk_iscomparisonconflict").prop("checked")==!0?($(".divCustomProperties_currentdbquery, .divCustomProperties_distributorquery").removeClass("hidden"),$("#chk_isexecuteinalldistributors").prop("checked",!1)):($(".divCustomProperties_currentdbquery, .divCustomProperties_distributorquery").addClass("hidden"),$(".divCustomProperties_currentdbquery textarea").val(""),$(".divCustomProperties_distributorquery textarea").val(""))}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.Conflicts=i})(i=t.Components||(t.Components={}))})(t=n.Utilities||(n.Utilities={}))})(Unibase||(Unibase={}));