123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443 |
- 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 Platform;
- (function (Platform) {
- let Automation;
- (function (Automation) {
- let Components;
- (function (Components) {
- class PropertyChange extends Platform.Core.BaseComponent {
- constructor() {
- super(...arguments);
- this.RowIndex = 0;
- this.RuleProviderId = 0;
- this.AutomationMode = 0;
- }
- jsFiles() {
- var jsfiles = ["platform/automation/managers/rulemanager.js",
- "platform/automation/enums/automationmode.js",
- "platform/automation/components/conditions.js",
- "platform/automation/components/contactselection.js",
- "platform/automation/requests/ruleaction.js",
- "platform/automation/requests/rulecondition.js",
- "platform/forms/components/formviewer/formviewer.js",
- "libs/parsley/parsley.min.js",
- "libs/querybuilder/query-builder.min.js",
- "libs/querybuilder/query-builder.standalone.min.js",
- "libs/querybuilder/query-builder.standalone.js",
- "libs/querybuilder/sql-parser.min.js", "libs/notificationbuilder/notificationbuilder.js", "platform/automation/components/rulebuilder/notificationgroup.js", "platform/automation/managers/notificationgroupmanager.js"
- ];
- return jsfiles;
- }
- cssFiles() {
- return [];
- }
- html(id, containerid) {
- let html = `<form id="frmUnibase_PropertyChange" data-validate="parsley" data-isdynamic="false">
- <div class="card bg-light">
- <div class="b-b bg-white card-header header">
- <strong class="text-dark title" id="Spn_PropertyChange">Create PropertyChange</strong>
- </div>
- <div class="card-body scrollable" style="overflow-y: scroll;">
- <div class="bg-white card" id="divPropertyChange">
- <div id="Validate_PropertyChnageAction" class="clear"></div>
- <div class="card-body">
- <div class="row">
- <div class="col-sm-12">
- <div class="floating-label-form-group">
- <label for="lbl" id="lbl_RuleActionName">Action<span class="text-danger required" id="spnIsRequired_RuleActionName"> *</span></label>
- <input type="text" id="txtPropertyChange_RuleActionName" class="form-control value-control required floating-label-control" placeholder="Action *" data-placeholder="Enter Action" data-label="Action *">
- <input type="hidden" id="hf_RuleActionName" />
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-6">
- <div class="input-group">
- <label for="InstalledApps" class="font-bold">InstalledApps<span class="text-danger">*</span></label>
- <select id="txtAutoComplete_InstalledApps" class="form-control text-control required" style="width:100%;" placeholder="InstalledApps" data-placeholder="InstalledApps" data-label="" data-istagselect="true"></select>
- <input type="hidden" id="hf_Autocomplete_InstalledApps" class="form-control value-control" data-isdynamic="true" />
- </div>
- </div>
- <div class="col-sm-6">
- <div class="input-group">
- <label for="AppDoctypes" class="font-bold">AppDoctypes<span class="text-danger">*</span></label>
- <select id="txtAutoComplete_AppDoctypes" class="form-control text-control required" style="width:100%;" placeholder="AppDoctypes" data-placeholder="AppDoctypes" data-label="" data-istagselect="true"></select>
- <input type="hidden" id="hf_Autocomplete_AppDoctypes" class="form-control value-control" data-isdynamic="true" />
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-6">
- <div class="input-group">
- <label for="DocProperties" class="font-bold">DocProperties<span class="text-danger">*</span></label>
- <select id="txtAutoComplete_DocProperties" class="form-control text-control required" style="width:100%;" placeholder="DocProperties" data-placeholder="DocProperties" data-label="" data-istagselect="true"></select>
- <input type="hidden" id="hf_Autocomplete_DocProperties" class="form-control value-control" data-isdynamic="true" />
- </div>
- </div>
- <div class="col-sm-6">
- <div class="floating-label-form-group">
- <label for="txt_Property" id="lbl_Property">Property Name<span class="text-danger">*</span></label>
- <input type="text" id="txt_Property" class="form-control required value-control floating-label-control" data-isdynamic="false" placeholder="Property Name*" data-placeholder="Enter Property Name" data-label="Property Name*" />
- <input type="hidden" id="hf_Property" />
- <label for="Validation" id="lblValidation_Property"></label>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <div id="div_Parameter" class="floating-label-form-group">
- <label for="lbl_ApiParameter" id="lbl_ApiParameter">Parameter<span class="text-danger"> *</span></label>
- <div class="input-group">
- <input type="text" id="txtPropertyChange_Parameter" class="col-sm-9 form-control value-control required floating-label-control" data-placeholder="Enter Parameter" placeholder="Parameter *" data-label="Parameter *">
- <select id="ddl_PropertyChangeParameters" class="col-sm-3 form-control value-control">
- <option value="0">Select Token</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div id="div_NotificationGrp" class="floating-label-form-group col-sm-6 floating-label-form-group-with-value">
- <label for="lbl_NotificationGrp" id="lbl_NotificationGroup">Notification Group<span class="text-danger"> *</span></label>
- <select id="ddl_NotificationGrp" class="form-control"><option value="0">Select Group</option></select>
- </div><div class="col-sm-6 createbtn_grp"><button class="badge badge-primary mt-30 ml-15" id="creategrp_btn">Create Group</button></div></div>
- <div class="row">
- <div class="ResultActions col-sm-6 hidden">
- <div id="div_ResultAction" class=" floating-label-form-group floating-label-form-group-with-value">
- <label for="lbl" id="lbl_ResultAction">Result Action</label>
- <select id="ddl_ResultAction" class="form-control">
- <option value="0">Select</option>
- </select>
- <label for="Validation" id="lblValidation_ResultAction"></label><input type="hidden" id="hfFormPropertyId" value="0" />
- </div>
- </div>
- <div class="col-sm-6">
- <div class="custom-control custom-checkbox divEnablePieces checkbox-primary mt-20">
- <input type="checkbox" class="custom-control-input" id="chkAutoApprovedPropertyChange" checked>
- <label class="custom-control-label" for="chkAutoApprovedPropertyChange">Perform this Action</label> 
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="bg-white card col-sm-3" id="btn_ActionConditions">
- <button type="button" class="btn btn-primary" onclick="Unibase.Platform.Automation.Components.PropertyChange.Instance().TogglePropertyChangeConditions();">Conditions</button>
- </div>
- <div class="bg-white card hidden" id="ActionConditionsDiv">
- <div class="card-header">Condition Details</div>
- <div class="card-body">
- <div class="ActionConditions">
- <!--For Action Conditions-->
- </div>
- </div>
- </div>
- </div>
- <div class="bg-white card-footer footer" id="CreatePropertyChangeFooter">
- <a href="javascript:;" id="btnClosePropertyChange" class="btn btn-light btn-sm mr-auto "> Close</a>
- <a href="javascript:;" id="btnSavePropertyChange" class="btn btn-primary btn-sm"> Save</a>
- </div>
- </div>
- </form>`;
- return html;
- }
- load(id, containerid, callback) {
- return __awaiter(this, void 0, void 0, function* () {
- var instance = this;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().ActionId = instance.ActionId;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleActionData = instance.RuleActionData;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().RowIndex = instance.RowIndex;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().AutomationMode = instance.AutomationMode;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleProviderId = instance.RuleProviderId;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().ParentActionId = instance.ParentActionId;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().IsAutomationMode = instance.IsAutomationMode;
- yield Unibase.Platform.Automation.Components.NotificationGroup.Instance().LoadNotificationGroups();
- $("#btnClosePropertyChange").click(function () {
- $('#' + containerid).modal('hide');
- $('#' + containerid).remove();
- if (Unibase.Platform.Automation.Components.PropertyChange.Instance().AutomationMode == Unibase.Platform.Automation.Enums.AutomationMode.NormalMode) {
- if (Unibase.Platform.Automation.Components.PropertyChange.Instance().AutomationMode) {
- if (Unibase.Platform.Automation.Components.PropertyChange.Instance().IsAutomationMode) {
- Unibase.Platform.Automation.Components.Rule.Instance().ChangeAction(instance.RowIndex, id);
- }
- }
- }
- Unibase.Platform.Automation.Components.Conditions.conditionArray = [];
- });
- $("#btnSavePropertyChange").click(function () {
- let appcontrolid = "frmUnibase_PropertyChange";
- let result = Unibase.Platform.Forms.Components.FormViewer.Instance().requiredFieldValidation(appcontrolid);
- if (result == false) {
- MessageHelper.Instance().showError("Mandatory fields are missing", "Validate_PropertyChnageAction");
- return false;
- }
- else {
- Unibase.Platform.Automation.Components.PropertyChange.Instance().SavePropertyChange(id, containerid);
- }
- });
- $("#ddl_PropertyChangeParameters").change(function () {
- var textAreaTxt = $("#txtPropertyChange_Parameter").val();
- var txtToAdd = '{{' + $("#ddl_PropertyChangeParameters option:selected").text() + '}}';
- $("#txtPropertyChange_Parameter").val(textAreaTxt + txtToAdd);
- $("#ddl_PropertyChangeParameters").val(0);
- });
- if (id != "") {
- Unibase.Platform.Automation.Components.PropertyChange.Instance().EditPropertyChange(id);
- }
- let rpid = instance.RuleProviderId;
- if (rpid != 0) {
- Unibase.Platform.Automation.Components.PropertyChange.Instance().LoadPropertyChangeParameters(rpid);
- Unibase.Platform.Automation.Components.ContactSelection.Instance().loadQueryBuilder(rpid, null);
- }
- if (instance.RuleActionData.length != 0) {
- Unibase.Platform.Automation.Components.PropertyChange.Instance().LoadPropertyChangeData(instance.RuleActionData);
- }
- $('#creategrp_btn').click(function () {
- Unibase.Platform.Automation.Components.NotificationGroup.Instance().init(0, null, true);
- });
- if (instance.ParentActionId != 0) {
- Unibase.Platform.Automation.Components.ContactSelection.Instance().getResultActions(instance.ParentActionId);
- yield Unibase.Platform.Automation.Components.PropertyChange.Instance().GetRuleActionInfo(Number(instance.ParentActionId));
- $('#ddl_NotificationGrp').prop("disabled", true);
- $('#creategrp_btn').addClass('d-none');
- }
- var url = _appsettings.server_url() + '/apis/v4/unibase/platform/apps/installedappautocomplete';
- AutoCompleteHelper.getHelper().Create("#txtAutoComplete_InstalledApps", "#hf_Autocomplete_InstalledApps", url, function (response) {
- var data = response;
- });
- $("#txtAutoComplete_InstalledApps").change(function () {
- Unibase.Platform.Automation.Components.PropertyChange.Instance().OnChangeInstalledApp();
- });
- $("#txtAutoComplete_AppDoctypes").change(function () {
- Unibase.Platform.Automation.Components.PropertyChange.Instance().OnChangeDoctype();
- });
- });
- }
- OnChangeInstalledApp() {
- return __awaiter(this, void 0, void 0, function* () {
- $("#txtAutoComplete_AppDoctypes").val(0);
- var url = _appsettings.server_url() + '/apis/v4/unibase/platform/doctypes/appdoctypesautocomplete/installedappid/' + Number($("#txtAutoComplete_InstalledApps option:selected").val());
- return yield AutoCompleteHelper.getHelper().Create("#txtAutoComplete_AppDoctypes", "#hf_Autocomplete_AppDoctypes", url, function (response) {
- var data = response;
- });
- });
- }
- OnChangeDoctype() {
- return __awaiter(this, void 0, void 0, function* () {
- $("#txtAutoComplete_DocProperties").val(0);
- var url = _appsettings.server_url() + '/apis/v4/unibase/platform/doctypes/docpropertiesautocomplete/doctypeid/' + Number($("#txtAutoComplete_AppDoctypes option:selected").val());
- return yield AutoCompleteHelper.getHelper().Create("#txtAutoComplete_DocProperties", "#hf_Autocomplete_DocProperties", url, function (response) {
- var data = response;
- });
- });
- }
- TogglePropertyChangeConditions() {
- $("#ActionConditionsDiv").toggle(function () {
- $("#btn_ActionConditions").addClass("hidden");
- $("#ActionConditionsDiv").removeClass("hidden");
- Unibase.Platform.Automation.Components.ContactSelection.Instance().loadQueryBuilder(Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleProviderId, null);
- });
- }
- LoadPropertyChangeData(Data) {
- for (var i = 0; i < Data.length; i++) {
- $("#txtPropertyChange_RuleActionName").val(Data[i].RuleActionName);
- $("#txt_Property").val(Data[i].BString1);
- $("#txtPropertyChange_Parameter").val(Data[i].BString2);
- $("#txtAutoComplete_InstalledApps").append(Data[i].String1);
- $("#txtAutoComplete_AppDoctypes").append(Data[i].String2);
- $("#txtAutoComplete_DocProperties").append(Data[i].String3);
- let id = Number(Data[i].String1);
- Unibase.Platform.Apps.Managers.AppManager.Instance().getInstallApp(id).then(function (res) {
- var selectedappoption = new Option(res.result.AppTitle, res.result.InstalledAppId.toString(), true);
- $("#txtAutoComplete_InstalledApps").append(selectedappoption);
- });
- let docid = Number(Data[i].String2);
- Unibase.Platform.DataSources.Managers.DocTypeManager.Instance().getDoctype(docid).then(function (docres) {
- var selecteddoctypeoption = new Option(docres.result.DocTypeName, docres.result.DocTypeId.toString(), true);
- $("#txtAutoComplete_AppDoctypes").append(selecteddoctypeoption);
- });
- let docpropid = Number(Data[i].String3);
- Unibase.Platform.DataSources.Managers.DocTypeManager.Instance().getDocProperty(docpropid).then(function (docpropres) {
- var selecteddocpropoption = new Option(docpropres.result.DocPropertyName, docpropres.result.DocPropertyId.toString(), true);
- $("#txtAutoComplete_DocProperties").append(selecteddocpropoption);
- });
- if (Data[i].ExecuteStatusId != Number(Unibase.Platform.Automation.Enums.ExecuteActionStatus.Approved))
- $("#chkAutoApprovedPropertyChange").prop("checked", false);
- else
- $("#chkAutoApprovedPropertyChange").prop("checked", true);
- if (Data[i].SqlWhere != "" && Data[i].SqlWhere != null) {
- Unibase.Platform.Automation.Components.ContactSelection.Instance().loadQueryBuilder(Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleProviderId, Data[i].SqlWhere);
- $("#btn_ActionConditions").addClass("hidden");
- $("#ActionConditionsDiv").removeClass("hidden");
- }
- $("#div_Parameter").addClass('floating-label-form-group-with-value');
- eval('_floatingLabelHelper.init();');
- }
- }
- LoadPropertyChangeParameters(ruleproviderid) {
- Unibase.Platform.Automation.Managers.RuleManager.Instance().getTokens(ruleproviderid).then(function (response) {
- let ApiParameters = document.getElementById('ddl_PropertyChangeParameters');
- $('#ddl_PropertyChangeParameters').empty();
- var defaultOpt1 = document.createElement("option");
- defaultOpt1.text = "Select Token";
- defaultOpt1.value = "0";
- ApiParameters.appendChild(defaultOpt1);
- for (let i = 0; i <= response.length - 1; i++) {
- var opt = document.createElement("option");
- opt.text = response[i];
- opt.value = (i + 1).toString();
- ApiParameters.appendChild(opt);
- }
- });
- }
- EditPropertyChange(id) {
- let actionid = Number(id);
- $("#Spn_PropertyChange").text("Edit PropertyChange");
- Unibase.Platform.Automation.Managers.RuleManager.Instance().getRuleAction(actionid).then(function (response) {
- $("#txtPropertyChange_RuleActionName").val(response.RuleActionName);
- $("#txtPropertyChange_Parameter").val(response.BString2);
- $("#txt_Property").val(response.BString1);
- $('#ddl_NotificationGrp option[value=' + response.NotificationGroupId + ']').prop('selected', true);
- if (!Unibase.Platform.Automation.Components.PropertyChange.Instance().IsAutomationMode) {
- Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleId = response.RuleId;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleEventId = response.RuleEventId;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().EventGroupId = response.EventGroupId;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().ActionId = response.ActionId;
- Unibase.Platform.Automation.Components.PropertyChange.Instance().ParentActionId = response.ParentActionId;
- }
- if (response.ExecuteStatusId != Number(Unibase.Platform.Automation.Enums.ExecuteActionStatus.Approved))
- $("#chkAutoApprovedPropertyChange").prop("checked", false);
- else
- $("#chkAutoApprovedPropertyChange").prop("checked", true);
- let id = Number(response.String1);
- Unibase.Platform.Apps.Managers.AppManager.Instance().getInstallApp(id).then(function (res) {
- var selectedappoption = new Option(res.result.AppTitle, res.result.InstalledAppId.toString(), true);
- $("#txtAutoComplete_InstalledApps").append(selectedappoption);
- });
- let docid = Number(response.String2);
- Unibase.Platform.DataSources.Managers.DocTypeManager.Instance().getDoctype(docid).then(function (docres) {
- var selecteddoctypeoption = new Option(docres.result.DocTypeName, docres.result.DocTypeId.toString(), true);
- $("#txtAutoComplete_AppDoctypes").append(selecteddoctypeoption);
- });
- let docpropid = Number(response.String3);
- Unibase.Platform.DataSources.Managers.DocTypeManager.Instance().getDocProperty(docpropid).then(function (docpropres) {
- var selecteddocpropoption = new Option(docpropres.result.DocPropertyName, docpropres.result.DocPropertyId.toString(), true);
- $("#txtAutoComplete_DocProperties").append(selecteddocpropoption);
- });
- Unibase.Platform.Automation.Components.ContactSelection.Instance().loadQueryBuilder(response.RuleProviderId, response.SqlWhere);
- $("#btn_ActionConditions").addClass("hidden");
- $("#ActionConditionsDiv").removeClass("hidden");
- $("#div_Parameter").addClass('floating-label-form-group-with-value');
- eval('_floatingLabelHelper.init();');
- });
- }
- GetRuleActionInfo(parentactionid) {
- return __awaiter(this, void 0, void 0, function* () {
- yield Unibase.Platform.Automation.Managers.RuleManager.Instance().getRuleAction(parentactionid).then(function (response) {
- if (response != null) {
- var html = '<option value=' + response.NotificationGroupId + ' selected>' + response.NotificationGroupName + '</option>';
- $('#ddl_NotificationGrp').html('').html(html);
- }
- });
- });
- }
- SavePropertyChange(PropertyChangeid, containerid) {
- let ruleactionid = Number(PropertyChangeid);
- let queryelmnt = $("#builder");
- let model = new Unibase.Platform.Automation.Requests.RuleAction();
- model.RuleActionId = ruleactionid;
- model.RuleActionName = $("#txtPropertyChange_RuleActionName").val().toString();
- model.String1 = $("#txtAutoComplete_InstalledApps option:selected").val().toString();
- model.String2 = $("#txtAutoComplete_AppDoctypes option:selected").val().toString();
- model.String3 = $("#txtAutoComplete_DocProperties option:selected").val().toString();
- model.BString1 = $("#txt_Property").val().toString();
- model.BString2 = $("#txtPropertyChange_Parameter").val().toString();
- model.ActionId = Unibase.Platform.Automation.Components.PropertyChange.Instance().ActionId;
- model.RuleId = 0;
- model.Users = "";
- model.NotificationGroupId = $('#ddl_NotificationGrp').val() == undefined ? 0 : Number($('#ddl_NotificationGrp').val());
- if (model.NotificationGroupId == 0) {
- MessageHelper.Instance().showError("Please Select Notification Group", "Validate_NotificationAction");
- return;
- }
- let query = queryelmnt.queryBuilder('getSQL', false, true);
- if (query != null) {
- model.SqlWhere = queryelmnt.queryBuilder('getSQL', false, true).sql.replace(/\n/g, " ").replace(/LIKE/g, "ILIKE");
- ;
- model.SqlWhereJson = JSON.stringify(queryelmnt.queryBuilder('getSQL', false, true));
- }
- model.ResultActionId = Number($("#ddl_ResultAction option:selected").val());
- if (model.ResultActionId != 0) {
- model.ResultActionName = $("#ddl_ResultAction option:selected").text();
- }
- else {
- model.ResultActionName = "";
- }
- model.DelayTime = 0;
- model.ParentActionId = Unibase.Platform.Automation.Components.PropertyChange.Instance().ParentActionId;
- model.AutoApproved = $('#chkAutoApprovedPropertyChange').is(':checked');
- model.RowIndex = Unibase.Platform.Automation.Components.PropertyChange.Instance().RowIndex;
- if (Unibase.Platform.Automation.Components.PropertyChange.Instance().IsAutomationMode) {
- if (Unibase.Platform.Automation.Components.PropertyChange.Instance().AutomationMode == Unibase.Platform.Automation.Enums.AutomationMode.NormalMode) {
- Unibase.Platform.Automation.Components.Rule.Instance().RuleActionsArray(model);
- $('#' + containerid).modal('hide');
- $('#' + containerid).remove();
- Unibase.Platform.Automation.Components.Conditions.conditionArray = [];
- }
- else {
- model.RuleId = eval("bizgaze_automation_flow_main.getruleid()");
- Automation.Managers.RuleManager.Instance().saveRuleAction(model).then(function (response) {
- if (response.status == Unibase.Data.Status.Error) {
- MessageHelper.Instance().showError(response.message, "Validate_PropertyChnageAction");
- }
- else {
- MessageHelper.Instance().showSuccess(response.message, "Validate_PropertyChnageAction");
- $('#' + containerid).modal('hide');
- $('#' + containerid).remove();
- Unibase.Platform.Automation.Components.Conditions.conditionArray = [];
- var actionname = response.result.RuleActionName;
- eval("bizgaze_automation_flow_main.savePropertyChangeblock('" + response.result.RuleActionId + "','" + actionname + "')");
- }
- });
- }
- }
- else {
- model.RuleId = Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleId;
- model.EventGroupId = Unibase.Platform.Automation.Components.PropertyChange.Instance().EventGroupId;
- model.RuleEventId = Unibase.Platform.Automation.Components.PropertyChange.Instance().RuleEventId;
- model.ActionId = Unibase.Platform.Automation.Components.PropertyChange.Instance().ActionId;
- model.ParentActionId = Unibase.Platform.Automation.Components.PropertyChange.Instance().ParentActionId;
- Automation.Managers.RuleManager.Instance().saveRuleAction(model).then(function (response) {
- if (response.status == Unibase.Data.Status.Error) {
- MessageHelper.Instance().showError(response.message, "Validate_PropertyChnageAction");
- }
- else {
- MessageHelper.Instance().showSuccess(response.message, "Validate_PropertyChnageAction");
- $('#' + containerid).modal('hide');
- $('#' + containerid).remove();
- Unibase.Platform.Automation.Components.Conditions.conditionArray = [];
- }
- });
- }
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new PropertyChange();
- }
- return this.instance;
- }
- }
- Components.PropertyChange = PropertyChange;
- })(Components = Automation.Components || (Automation.Components = {}));
- })(Automation = Platform.Automation || (Platform.Automation = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|