This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,176 @@
var Unibase;
(function (Unibase) {
let Utilities;
(function (Utilities) {
let Components;
(function (Components) {
class Conflicts extends Unibase.Platform.Core.BaseComponent {
init() {
return null;
}
loadControl(containerid, prop) {
return null;
}
loadControlSettings(controlsettingjson, formpropertyid) {
return null;
}
loadPropertySettings(propertysettings, formpropertyid) {
return null;
}
bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
return null;
}
Refresh() {
let ConflictId = 0, IsExecuteInAllDistributors = false, IsComparisonConflict = false;
let instance = this;
let InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
let Conflict = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_conflictid");
let ExecuteInAllDistributors = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_isexecuteinalldistributors");
let ComparisonConflict = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_iscomparisonconflict");
if (Conflict != undefined)
ConflictId = Number(Conflict.Value);
if (ExecuteInAllDistributors != undefined) {
IsExecuteInAllDistributors = ExecuteInAllDistributors.Value;
}
if (ComparisonConflict != undefined) {
IsComparisonConflict = ComparisonConflict.Value;
}
if (IsExecuteInAllDistributors == true || IsComparisonConflict == true) {
$("#DetailSetting_" + InstalledAppId + "_RefreshConflict").addClass("hidden");
$("#DetailSetting_" + InstalledAppId + "_RefreshConflictInAllDistributors").removeClass("hidden");
$("#DetailSetting_" + InstalledAppId + "_RefreshConflictInAllDistributors").unbind().click(function () {
instance.RefreshConflictInAllDistributors(ConflictId);
});
}
else {
$("#DetailSetting_" + InstalledAppId + "_RefreshConflict").removeClass("hidden");
$("#DetailSetting_" + InstalledAppId + "_RefreshConflictInAllDistributors").addClass("hidden");
$("#DetailSetting_" + InstalledAppId + "_RefreshConflict").unbind().click(function () {
instance.RefreshConflict(ConflictId);
});
}
}
RefreshAllConflicts() {
let instance = this;
let PostData = {
ConflictId: 0,
Page: 0,
PageSize: 1,
};
instance.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js", function () {
Unibase.Utilities.Managers.ConflictManager.Instance().RefreshAllConflicts(PostData).then(function (response) {
if (response.errors != null && response.errors.length > 0) {
MessageHelper.Instance().showError(response.message, "div_message");
}
else {
MessageHelper.Instance().showSuccess(response.message, "div_message");
}
});
});
}
RefreshConflict(ConflictId) {
let instance = this;
let PostData = {
ConflictId: ConflictId,
Page: 0,
PageSize: 1,
};
instance.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js", function () {
Unibase.Utilities.Managers.ConflictManager.Instance().RefreshConflict(PostData).then(function (response) {
if (response.errors != null && response.errors.length > 0) {
MessageHelper.Instance().showError(response.message, "div_message");
}
else {
MessageHelper.Instance().showSuccess(response.message, "div_message");
}
});
});
}
RefreshConflictInAllDistributors(ConflictId) {
let instance = this;
let PostData = {
ConflictId: ConflictId,
Page: 0,
PageSize: 1,
};
instance.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js", function () {
Unibase.Utilities.Managers.ConflictManager.Instance().RefreshConflictInAllDistributors(PostData).then(function (response) {
if (response.errors != null && response.errors.length > 0) {
MessageHelper.Instance().showError(response.message, "div_message");
}
else {
MessageHelper.Instance().showSuccess(response.message, "div_message");
}
});
});
}
DeleteConflict() {
let instance = this;
let ConflictId = 0;
let InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
let Conflict = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_conflictid");
let ExecuteInAllDistributors = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_isexecuteinalldistributors");
if (Conflict != undefined)
ConflictId = Number(Conflict.Value);
instance.fileCacheHelper.loadJsFile("platform/utilities/managers/conflictmanager.js", function () {
Unibase.Utilities.Managers.ConflictManager.Instance().DeleteConflict(ConflictId).then(function (response) {
if (response.errors != null && response.errors.length > 0) {
MessageHelper.Instance().showError(response.message, "div_message");
}
else {
MessageHelper.Instance().showSuccess(response.message, "div_message");
Unibase.Themes.Compact.Components.Nav.Instance().loadList(InstalledAppId);
}
});
});
}
ConflictEvents() {
let instance = this;
$(".divCustomProperties_distributorquery, .divCustomProperties_currentdbquery, .divCustomProperties_query").addClass("mb-20");
var ConflictId = $(".hdn_conflictid").val();
$(".divCustomProperties_countreportid, .divCustomProperties_datareportid").addClass("hidden");
$(".divCustomProperties_iscomparison").addClass("hidden");
$(".divCustomProperties_currentdbquery, .divCustomProperties_distributorquery").addClass("hidden");
$("#chk_iscomparisonconflict").change(function () {
instance.ChangedIsCompConflict_chbx();
});
$("#chk_isexecuteinalldistributors").change(function () {
instance.ChangedIsExecInAllDistributors_chbx();
});
if (ConflictId != 0) {
instance.ChangedIsExecInAllDistributors_chbx();
instance.ChangedIsCompConflict_chbx();
}
}
ChangedIsExecInAllDistributors_chbx() {
if ($("#chk_isexecuteinalldistributors").prop("checked") == true) {
$(".divCustomProperties_countreportid, .divCustomProperties_datareportid").removeClass("hidden");
$("#chk_iscomparisonconflict").prop("checked", false);
}
else {
$(".divCustomProperties_countreportid, .divCustomProperties_datareportid").addClass("hidden");
$(".txtAutoComplete_countreportid, .txtAutoComplete_datareportid").val("").trigger("change");
}
}
ChangedIsCompConflict_chbx() {
if ($("#chk_iscomparisonconflict").prop("checked") == true) {
$(".divCustomProperties_currentdbquery, .divCustomProperties_distributorquery").removeClass("hidden");
$("#chk_isexecuteinalldistributors").prop("checked", false);
}
else {
$(".divCustomProperties_currentdbquery, .divCustomProperties_distributorquery").addClass("hidden");
$(".divCustomProperties_currentdbquery textarea").val("");
$(".divCustomProperties_distributorquery textarea").val("");
}
}
static Instance() {
if (this.instance === undefined) {
this.instance = new Conflicts();
}
return this.instance;
}
}
Components.Conflicts = Conflicts;
})(Components = Utilities.Components || (Utilities.Components = {}));
})(Utilities = Unibase.Utilities || (Unibase.Utilities = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,66 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Unibase;
(function (Unibase) {
let Utilities;
(function (Utilities) {
let Managers;
(function (Managers) {
class ConflictManager extends Unibase.Platform.Core.BaseManager {
RefreshConflict(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/platform/conflicts/refreshconflict';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
RefreshConflictInAllDistributors(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/platform/conflicts/refreshconflictinalldistributors';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
RefreshAllConflicts(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/platform/conflicts/refreshallconflicts';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
DeleteConflict(ConflictId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/unibase/platform/conflicts/deleteconflict/conflictid/' + ConflictId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new ConflictManager();
return this._instance;
}
}
Managers.ConflictManager = ConflictManager;
})(Managers = Utilities.Managers || (Utilities.Managers = {}));
})(Utilities = Unibase.Utilities || (Unibase.Utilities = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"conflictmanager.js","sourceRoot":"","sources":["conflictmanager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAU,OAAO,CAkDhB;AAlDD,WAAU,OAAO;IACb,IAAiB,SAAS,CAgDzB;IAhDD,WAAiB,SAAS;QACtB,IAAiB,QAAQ,CA8CxB;QA9CD,WAAiB,QAAQ;YACrB,MAAa,eAAgB,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW;gBAE5D,eAAe,CAAC,QAAa;;wBAC/B,MAAM,GAAG,GAAG,oDAAoD,CAAC;wBACjE,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,QAAa;4BAChF,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,IAAI,QAAQ,CAAC,MAAM,IAAI,EAAE;gCACjD,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;4BAClD,OAAO,QAAQ,CAAC;wBACpB,CAAC,CAAC,CAAC;oBACP,CAAC;iBAAA;gBAEK,gCAAgC,CAAC,QAAa;;wBAChD,MAAM,GAAG,GAAG,qEAAqE,CAAC;wBAClF,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,QAAa;4BAChF,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,IAAI,QAAQ,CAAC,MAAM,IAAI,EAAE;gCACjD,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,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KAAR,kBAAQ,QA8CxB;IACL,CAAC,EAhDgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAgDzB;AACL,CAAC,EAlDS,OAAO,KAAP,OAAO,QAkDhB"}
+1
View File
@@ -0,0 +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(t){class i extends n.Platform.Core.BaseManager{RefreshConflict(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/platform/conflicts/refreshconflict",n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}RefreshConflictInAllDistributors(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/platform/conflicts/refreshconflictinalldistributors",n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}RefreshAllConflicts(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/unibase/platform/conflicts/refreshallconflicts",n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}DeleteConflict(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/unibase/platform/conflicts/deleteconflict/conflictid/"+n;return yield this.dataHelper().postAsync(t,null).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this._instance===undefined&&(this._instance=new i),this._instance}}t.ConflictManager=i})(i=t.Managers||(t.Managers={}))})(t=n.Utilities||(n.Utilities={}))})(Unibase||(Unibase={}));
@@ -0,0 +1 @@
{"version":3,"file":"iconflictmanager.js","sourceRoot":"","sources":["iconflictmanager.ts"],"names":[],"mappings":""}