var Unibase; (function (Unibase) { let Platform; (function (Platform) { let Common; (function (Common) { let Components; (function (Components) { class Domain extends Unibase.Platform.Core.BaseComponent { constructor() { super(); } cssFiles() { return [""]; } jsFiles() { return ["platform/common/components/domain.js", "platform/common/managers/commonmanager.js"]; } loadForm(FormId, Pk_Value, AppConfigurationId, Callback, ElementId) { this.addprovider(Pk_Value); } addprovider(Pk_Value) { this.navigationHelper.popup(Pk_Value, '', Unibase.Platform.Common.Components.Domain.Instance(), null, Platform.Helpers.Size.Large); } loadDomainForm(iscreate) { var Pk_Value = 0; if (!iscreate) { Pk_Value = Unibase.Themes.Providers.DetailHelper.recordId; this.addprovider(Pk_Value); } this.navigationHelper.popup(Pk_Value, '', Unibase.Platform.Common.Components.Domain.Instance(), null, Platform.Helpers.Size.Large); } html(id, containerid) { var html = `
Domain
`; return html; } load(id, containerid, callback) { $("#btn_CloseApp").click(function () { $('#' + containerid).modal('hide'); $('#' + containerid).remove(); }); $("#btn_SaveApp").click(function () { event.preventDefault(); var url = $("#domain_url_name").val(); if (url.toString().length > 0) { var obj = { DomainUrl: url, TenantId: Unibase.Platform.Membership.Infos.Identity.getCurrentUser().tenantId }; Unibase.Platform.Common.Managers.CommonManager.Instance().saveDomain(obj).then((res) => { if (res.status == Unibase.Data.Status.Error) { MessageHelper.Instance().showError(res.message, "div_domainmessage"); } else { MessageHelper.Instance().showSuccess(res.message, "div_domainmessage"); $('#' + containerid).modal('hide'); $('#' + containerid).remove(); } }); } else { MessageHelper.Instance().showError("Enter Url", "div_domainmessage"); } }); } init(id) { var instance = this; var html = instance.html(id, ""); $("." + id).append(html); instance.load(0, id, null); } static Instance() { if (this.instance === undefined) { this.instance = new Domain(); } return this.instance; } } Components.Domain = Domain; })(Components = Common.Components || (Common.Components = {})); })(Common = Platform.Common || (Platform.Common = {})); })(Platform = Unibase.Platform || (Unibase.Platform = {})); })(Unibase || (Unibase = {}));