Iniit
Этот коммит содержится в:
@@ -0,0 +1,500 @@
|
||||
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());
|
||||
});
|
||||
};
|
||||
class RouteHelper {
|
||||
constructor() {
|
||||
this._sammy = window['Sammy'];
|
||||
}
|
||||
init() {
|
||||
var instance = this;
|
||||
var app = this._sammy('#bizgaze_body', function () {
|
||||
var id = 0;
|
||||
this.get('#/detail/:pkid/:installedappid', function () {
|
||||
let _pkid = this.params['pkid'];
|
||||
let _installedappid = this.params['installedappid'];
|
||||
instance.navHelper.welcome(function () {
|
||||
RouteHelper.Instance().navHelper.loadDetail(_pkid, _installedappid, null);
|
||||
}, false);
|
||||
});
|
||||
this.get('#/login', function () {
|
||||
instance.navHelper.login(null);
|
||||
});
|
||||
this.get('#/logoff', function () {
|
||||
instance.navHelper.login(null);
|
||||
});
|
||||
this.get('#/welcome', function () {
|
||||
instance.navHelper.welcome(null, false);
|
||||
});
|
||||
this.get('#/registeruser', function () {
|
||||
instance.navHelper.registerUser(null);
|
||||
});
|
||||
this.get('#/register/:id/:tenantid/:email/:phonenumber', function () {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var id = this.params['id'];
|
||||
var tenantid = this.params['tenantid'];
|
||||
var email = this.params['email'];
|
||||
var phonenumber = this.params['phonenumber'];
|
||||
instance.navHelper.registerUser(function () {
|
||||
$('#txt_EmailorPhone').val(`${phonenumber.toString()}`);
|
||||
$('#ddl_Tenant').val(`${tenantid.toString()}`);
|
||||
$('#ddl_Tenant').addClass("d-none");
|
||||
let selectedTenantName = $('#ddl_Tenant option:selected').text();
|
||||
let append_Div = $("#frm_RegisterUser").find(".Selected_Tenant_Text").length;
|
||||
if (append_Div == 0) {
|
||||
$("#div_ValidationSummary").after('<div class="Selected_Tenant_Text"></div>');
|
||||
}
|
||||
$(".Selected_Tenant_Text").html('<div class="font-18 text-dark my-3 text-center ">Selected Tenant is <span class="font-weight-600">' + selectedTenantName + '</span>');
|
||||
});
|
||||
});
|
||||
});
|
||||
this.get('#/confirmregister/:id/:tenantid/:email/:phonenumber', function () {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var id = this.params['id'];
|
||||
var tenantid = this.params['tenantid'];
|
||||
var email = this.params['email'];
|
||||
var phonenumber = this.params['phonenumber'];
|
||||
instance.navHelper.register(id, tenantid, email, phonenumber, null);
|
||||
});
|
||||
});
|
||||
this.get('#/signup', function () {
|
||||
instance.navHelper.signup(null);
|
||||
});
|
||||
this.get('#/createcustomer', function () {
|
||||
instance.navHelper.createcontact(null);
|
||||
});
|
||||
this.get('#/forgotpassword', function () {
|
||||
id = this.params['id'];
|
||||
instance.navHelper.forgotPassword(null);
|
||||
});
|
||||
this.get('#/create/:id', function () {
|
||||
id = this.params['id'];
|
||||
alert("create " + id);
|
||||
});
|
||||
this.get('#/documents/:id/:documentgroup/:userid', function () {
|
||||
let _docid = this.params['id'];
|
||||
_docid = _docid.replace(':', '');
|
||||
let _docgroup = this.params['documentgroup'];
|
||||
_docgroup = _docgroup.replace(':', '');
|
||||
let _userid = this.params['userid'];
|
||||
_userid = _userid.replace(':', '');
|
||||
instance.navHelper.welcome(function () {
|
||||
$(".unibase_modal_backdrop").removeAttr('style');
|
||||
$(".preloader-it").fadeIn();
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/collaboration/components/documents.js', function () {
|
||||
var documents = Unibase.Apps.Collaboration.Components.Documents.Instance();
|
||||
if (_docgroup == "newexcel") {
|
||||
documents.newExcel(0, null);
|
||||
}
|
||||
else if (_docgroup == "newword") {
|
||||
documents.newWordDoc(null);
|
||||
}
|
||||
else {
|
||||
documents.previewDocument(_docid, _docgroup, _userid);
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
});
|
||||
this.get('#/appperformance/threads/:time', function () {
|
||||
let _time = this.params['time'];
|
||||
_time = _time.replace(':', '');
|
||||
let time = 0;
|
||||
if (_time != null && _time != undefined && _time != "") {
|
||||
time = Number(_time);
|
||||
}
|
||||
instance.navHelper.welcome(function () {
|
||||
$(".unibase_modal_backdrop").removeAttr('style');
|
||||
$(".preloader-it").fadeIn();
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('platform/common/components/threadtable.js', function () {
|
||||
var threads = Unibase.Platform.Common.Components.ThreadTable.Instance().getThreads(time);
|
||||
});
|
||||
}, true);
|
||||
});
|
||||
this.get('#/newdocuments/:type/:id/:documentgroup', function () {
|
||||
let _docid = this.params['id'];
|
||||
_docid = _docid.replace(':', '');
|
||||
let _docgroup = this.params['documentgroup'];
|
||||
_docgroup = _docgroup.replace(':', '');
|
||||
let _type = this.params['type'];
|
||||
_type = _type.replace(':', '');
|
||||
instance.navHelper.welcome(function () {
|
||||
$(".unibase_modal_backdrop").removeAttr('style');
|
||||
$(".preloader-it").fadeIn();
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/collaboration/components/documents.js', function () {
|
||||
var documents = Unibase.Apps.Collaboration.Components.Documents.Instance();
|
||||
if (_docgroup == "newexcel") {
|
||||
documents.newExcel(_type, null);
|
||||
}
|
||||
else if (_docgroup == "newword") {
|
||||
documents.newWordDoc(null);
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
});
|
||||
this.get('#/register', function () {
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
var jsfiles = ["platform/membership/managers/accountmanager.js", "apps/support/components/helpprovider.component.js", "platform/forms/managers/formmanager.js", "platform/forms/components/formviewer/formviewer.js", "apps/transact/components/subscriptions/userregistration.component.js"];
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(jsfiles, function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().parentanonymouslogin().then((response) => {
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(response.result);
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("tenants/themes/compact/index.js", function () {
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Transact.Components.Subscriptions.Userregistration.Instance().register();
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/paymentgateway/:order_id/:order_token', function () {
|
||||
var orderid = this.params['order_id'];
|
||||
orderid = orderid.replace('order_id =', '');
|
||||
var ordertoken = this.params['order_token'];
|
||||
ordertoken = ordertoken.replace('order_token=', '');
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getCookie("Identity");
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
var jsfiles = ["platform/membership/managers/accountmanager.js", "apps/support/components/helpprovider.component.js", "platform/forms/managers/formmanager.js", "platform/core/helpers/navigation/interfaces/inavigationhelper.js", "tenants/themes/compact/js/navigation/navigationhelper.js", "platform/forms/components/formviewer/formviewer.js", "platform/core/helpers/navigation/navigationhelper.js", "apps/transact/components/subscriptions/userregistration.component.js", "apps/transact/controls/subscriptions/orderdetails.component.js"];
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(jsfiles, function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().parentanonymouslogin().then((response) => {
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(response.result);
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("tenants/themes/compact/index.js", function () {
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Transact.Components.Subscriptions.Userregistration.Instance().tenantCreation(orderid, ordertoken);
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/paymentorder/:order_id/:order_token', function () {
|
||||
var orderid = this.params['order_id'];
|
||||
orderid = orderid.replace('order_id=', '');
|
||||
var ordertoken = this.params['order_token'];
|
||||
ordertoken = ordertoken.replace('order_token=', '');
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getCookie("Identity");
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
var jsfiles = ["platform/membership/managers/accountmanager.js", "apps/support/components/helpprovider.component.js", "platform/forms/managers/formmanager.js", "platform/core/helpers/navigation/interfaces/inavigationhelper.js", "tenants/themes/compact/js/navigation/navigationhelper.js", "platform/forms/components/formviewer/formviewer.js", "platform/core/helpers/navigation/navigationhelper.js", "apps/transact/components/subscriptions/userregistration.component.js", "apps/transact/controls/subscriptions/orderdetails.component.js"];
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(jsfiles, function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().parentanonymouslogin().then((response) => {
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(response.result);
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("tenants/themes/compact/index.js", function () {
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Transact.Components.Subscriptions.Userregistration.Instance().UpdatePayemtInfo(orderid, ordertoken);
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/axisgateway/', function (context) {
|
||||
var iparam = context.params.i;
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/sprl/components/salesinvoice/makepayment.js', function () {
|
||||
SPRL.Apps.Sap.Components.MakePayment.Instance().PaymentStatus(iparam);
|
||||
});
|
||||
});
|
||||
this.get('#/loadingallplan/:orgname', function () {
|
||||
var OragnizationName = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['orgname']);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
var jsfiles = ["platform/membership/managers/accountmanager.js", "apps/support/components/helpprovider.component.js", "platform/forms/managers/formmanager.js", "platform/forms/components/formviewer/formviewer.js", "apps/transact/components/subscriptions/userregistration.component.js", "apps/transact/controls/subscriptions/upgradeplan.component.js"];
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(jsfiles, function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().parentanonymouslogin().then((response) => {
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(response.result);
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("tenants/themes/compact/index.js", function () {
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Transact.Components.Subscriptions.Userregistration.Instance().laodingAllPlan(OragnizationName);
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/paynow/:orgname', function () {
|
||||
var organizationame = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['orgname']);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
var jsfiles = ["platform/membership/managers/accountmanager.js", "apps/support/components/helpprovider.component.js", "platform/forms/managers/formmanager.js", "platform/forms/components/formviewer/formviewer.js", "apps/transact/components/subscriptions/userregistration.component.js"];
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(jsfiles, function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().parentanonymouslogin().then((response) => {
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(response.result);
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("tenants/themes/compact/index.js", function () {
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Transact.Components.Subscriptions.Userregistration.Instance().oldPlan(organizationame);
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/subscribe/plan/:planid/tenure/:tenureid', function () {
|
||||
var planid = this.params['planid'];
|
||||
var tenureid = this.params['tenureid'];
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
var jsfiles = ["platform/bundle/index.subscriptions.min.js"];
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(jsfiles, function () {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().addCacheFiles(["apps/transact/components/subscriptions/userregistration.component.js", "apps/transact/controls/subscriptions/subscribeuserregistrations.js", "apps/transact/controls/subscriptions/orderdetails.component.js", "apps/transact/managers/subscriptions/subscriptionmanager.js"]);
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().parentanonymouslogin().then((response) => {
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(response.result);
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Transact.Controls.Subscriptions.SubcribeUserRegistrations.Instance().subcribeUserRegistration(planid, tenureid);
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/list/:id', function () {
|
||||
id = this.params['id'];
|
||||
instance.navHelper.loadList(id, null);
|
||||
});
|
||||
this.get('#/open/:group/:url', function () {
|
||||
var __documentgroup = this.params['group'];
|
||||
var __url = this.params['url'];
|
||||
let identity = Unibase.Platform.Membership.Infos.Identity.getCurrentUser();
|
||||
if (identity == null) {
|
||||
var jsfiles = ["tenants/themes/compact/components/login/defaultlogin.js", "tenants/themes/compact/js/navigation/navigationhelper.js"];
|
||||
instance.navHelper.login(function () {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/components/documents.js", function () {
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
instance.navHelper.welcome(function () {
|
||||
var jsfiles = ["tenants/themes/compact/js/navigation/navigationhelper.js", "apps/collaboration/components/documents.js"];
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(jsfiles, function () {
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
});
|
||||
this.get('#/loginhelp', function () {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["platform/membership/managers/accountmanager.js", "apps/support/components/helpprovider.component.js", "platform/core/helpers/html/htmlhelper.js"], function () {
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Support.Components.HelpProvider.Instance().loadloginhelpapp();
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
this.get('#/ticket/:contactname/:emailaddress/:phonenumber/:logintenantid/:unibaseid/:userid', function () {
|
||||
var ContactName = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['contactname']);
|
||||
var EmailAddress = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['emailaddress']);
|
||||
var PhoneNumber = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['phonenumber']);
|
||||
var oldtenantid = this.params['logintenantid'];
|
||||
var oldunibaseid = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['unibaseid']);
|
||||
var UserId = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['userid']);
|
||||
var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance();
|
||||
var str = JSON.stringify(Unibase.Platform.Membership.Infos.Identity.getCurrentUser());
|
||||
cookieHelper.setUserIdentityCookie(str);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["platform/membership/managers/accountmanager.js", "platform/core/helpers/navigation/interfaces/inavigationhelper.js", "tenants/themes/compact/js/navigation/navigationhelper.js", "platform/forms/enums/enums.js", "platform/forms/managers/formmanager.js", "platform/forms/components/formviewer/formviewer.js", "apps/support/components/helpprovider.component.js", "platform/core/helpers/html/htmlhelper.js", "platform/core/helpers/autocomplete/autocompletehelper.js", "platform/apps/managers/appmanager.js", "apps/support/components/support.component.js", "platform/controls/navigationtag/navigationtag.component.js", "libs/summernote/summernote.min.js", "libs/summernote/summernote.css", "libs/gpslocation/jquery.geocomplete.js"], function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().anonymousLogin().then(function (aresponse) {
|
||||
var identity = aresponse.result;
|
||||
identity.parentUserId = Number(UserId);
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Support.Components.HelpProvider.Instance().loadticketform(ContactName, EmailAddress, PhoneNumber, oldunibaseid, oldtenantid, UserId);
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/:unibaseid/:tenantid/:oldtenantid/:userId/ticketcreate', function () {
|
||||
var tenantid = this.params['tenantid'];
|
||||
var unibaseid = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['unibaseid']);
|
||||
var oldtenantid = this.params['oldtenantid'];
|
||||
var userId = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['userId']);
|
||||
var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance();
|
||||
var str = JSON.stringify(Unibase.Platform.Membership.Infos.Identity.getCurrentUser());
|
||||
cookieHelper.setUserIdentityCookie(str);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["platform/membership/managers/accountmanager.js", "apps/support/components/helpprovider.component.js", "platform/forms/managers/formmanager.js", "platform/forms/components/formviewer/formviewer.js", "platform/core/helpers/html/htmlhelper.js", "platform/apps/managers/appmanager.js", "platform/core/helpers/autocomplete/autocompletehelper.js"], function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().generatesessionbytenantid(unibaseid, tenantid).then(function (cresponse) {
|
||||
var identity = cresponse.result;
|
||||
identity.parentUserId = Number(userId);
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
instance.navHelper.welcome(function () {
|
||||
Bizgaze.Apps.Support.Components.HelpProvider.Instance().autoloadticketform(unibaseid, oldtenantid);
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/:unibaseid/:tenantid/:oldtenantid/:userId/ticketlist', function () {
|
||||
var unibaseid = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['unibaseid']);
|
||||
var tenantid = this.params['tenantid'];
|
||||
var oldtenantid = this.params['oldtenantid'];
|
||||
var userId = Unibase.Platform.Helpers.CryptoHelper.Instance().decryptURIcomponent(this.params['userId']);
|
||||
var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance();
|
||||
var str = JSON.stringify(Unibase.Platform.Membership.Infos.Identity.getCurrentUser());
|
||||
cookieHelper.setUserIdentityCookie(str);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = Unibase.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["tenants/themes/compact/index.js", "platform/membership/managers/accountmanager.js", "apps/support/managers/supportmanager.js", "platform/apps/managers/appmanager.js", "tenants/themes/compact/components/nav/nav.js", "tenants/themes/compact/components/list/list.js", "platform/core/helpers/navigation/interfaces/inavigationhelper.js", "tenants/themes/compact/js/navigation/navigationhelper.js", "tenants/themes/compact/components/details/details.js"], function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().generatesessionbytenantid(unibaseid, tenantid).then(function (cresponse) {
|
||||
var identity = cresponse.result;
|
||||
identity.parentUserId = Number(userId);
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
instance.navHelper.welcome(function () {
|
||||
Unibase.Platform.Apps.Managers.AppManager.Instance().getInstallAppId("Bizgaze_Extension_Support_Tickets_App_Tickets").then(function (res) {
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().loadList(res.result.InstalledAppId);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/:unibaseid/:tenantid/:userId/:refId/:installedAppId/:remindertype/:reminderid/:ispopup/loadDetail', function () {
|
||||
var unibaseid = this.params['unibaseid'];
|
||||
var tenantid = this.params['tenantid'];
|
||||
var userId = this.params['userId'];
|
||||
const refId = this.params['refId'];
|
||||
const ispopup = this.params['ispopup'];
|
||||
const installedAppId = this.params['installedAppId'];
|
||||
const remindertype = Number(this.params['remindertype']);
|
||||
const reminderid = this.params['reminderid'];
|
||||
var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance();
|
||||
var str = JSON.stringify(Unibase.Platform.Membership.Infos.Identity.getCurrentUser());
|
||||
cookieHelper.setUserIdentityCookie(str);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = "";
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().generatesessionbytenantid(unibaseid, tenantid).then(function (cresponse) {
|
||||
var identity = cresponse.result;
|
||||
identity.parentUserId = userId;
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
instance.navHelper.welcome(function () {
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframe = true;
|
||||
if (remindertype != Number(Unibase.Platform.Communications.Enums.ReminderType.Task)) {
|
||||
let status = "Read";
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().changeReminderStatus(reminderid, status).then(function (response) {
|
||||
if (ispopup == "true") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('tenants/themes/compact/components/popupdetails/popupdetails.js', function () {
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframeObj.isPopupPage = true;
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().popup(0, '', Unibase.Platform.Membership.Components.PopupDetails.Instance(), function () {
|
||||
Unibase.Platform.Membership.Components.PopupDetails.Instance().loadDetailsForPopup(refId, installedAppId, "");
|
||||
}, Unibase.Platform.Helpers.Size.ExtraLarge);
|
||||
});
|
||||
}
|
||||
else {
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframeObj.isDetailsPage = true;
|
||||
RouteHelper.Instance().navHelper.loadDetail(refId, installedAppId, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 'detail');
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/:unibaseid/:tenantid/:userId/:installedAppId/:reminderid/:isRead/loadList', function () {
|
||||
var unibaseid = this.params['unibaseid'];
|
||||
var tenantid = +this.params['tenantid'];
|
||||
var userId = +this.params['userId'];
|
||||
const installedAppId = +this.params['installedAppId'];
|
||||
const isRead = this.params['isRead'];
|
||||
const reminderid = this.params['reminderid'];
|
||||
var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance();
|
||||
var str = JSON.stringify(Unibase.Platform.Membership.Infos.Identity.getCurrentUser());
|
||||
cookieHelper.setUserIdentityCookie(str);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = "";
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().generatesessionbytenantid(unibaseid, tenantid).then(function (cresponse) {
|
||||
var identity = cresponse.result;
|
||||
identity.parentUserId = userId;
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
instance.navHelper.welcome(function () {
|
||||
if (isRead == "true") {
|
||||
let status = "Read";
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().changeReminderStatus(reminderid, status).then(function (response) {
|
||||
});
|
||||
}
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframe = true;
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframeObj.isListPage = true;
|
||||
RouteHelper.Instance().navHelper.loadList(installedAppId, null);
|
||||
}, 'List');
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/:unibaseid/:tenantid/:userId/:installedAppId/:formId/:pk_id/:appConfigurationId/:reminderid/:isRead/loadform', function () {
|
||||
var unibaseid = this.params['unibaseid'];
|
||||
var tenantid = +this.params['tenantid'];
|
||||
var userId = +this.params['userId'];
|
||||
const installedAppId = +this.params['installedAppId'];
|
||||
const Pk_Value = +this.params['pk_id'];
|
||||
const AppConfigurationId = +this.params['appConfigurationId'];
|
||||
const FormId = +this.params['formId'];
|
||||
const isRead = this.params['isRead'];
|
||||
const reminderid = this.params['reminderid'];
|
||||
var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance();
|
||||
var str = JSON.stringify(Unibase.Platform.Membership.Infos.Identity.getCurrentUser());
|
||||
cookieHelper.setUserIdentityCookie(str);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = "";
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().generatesessionbytenantid(unibaseid, tenantid).then(function (cresponse) {
|
||||
var identity = cresponse.result;
|
||||
identity.parentUserId = userId;
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
instance.navHelper.welcome(function () {
|
||||
if (isRead == "true") {
|
||||
let status = "Read";
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframeObj.isDetailsForm = true;
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().changeReminderStatus(reminderid, status).then(function (response) {
|
||||
});
|
||||
}
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframe = true;
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframeObj.isForm = true;
|
||||
RouteHelper.Instance().navHelper.loadForm(Number(FormId), Number(Pk_Value), Number(AppConfigurationId), undefined, null);
|
||||
}, 'form');
|
||||
});
|
||||
}
|
||||
});
|
||||
this.get('#/:unibaseid/:tenantid/:userId/loadChat', function () {
|
||||
var unibaseid = this.params['unibaseid'];
|
||||
var tenantid = +this.params['tenantid'];
|
||||
var userId = +this.params['userId'];
|
||||
var cookieHelper = Unibase.Platform.Helpers.CookieHelper.Instance();
|
||||
var str = JSON.stringify(Unibase.Platform.Membership.Infos.Identity.getCurrentUser());
|
||||
cookieHelper.setUserIdentityCookie(str);
|
||||
Unibase.Platform.Helpers.CookieHelper.Instance().setIdentityCookie("");
|
||||
var identity = "";
|
||||
if (identity == null || identity == "" || identity == "idenity=" || identity == "idenity") {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().generatesessionbytenantid(unibaseid, tenantid).then(function (cresponse) {
|
||||
var identity = cresponse.result;
|
||||
identity.parentUserId = userId;
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
Unibase.Themes.Compact.Components.Index.Instance().isIframe = true;
|
||||
$("#bizgaze_body").addClass("invisible");
|
||||
instance.navHelper.welcome(null, 'ChatFull');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
this.provider = app;
|
||||
app.run('#/login');
|
||||
}
|
||||
navigate(route) {
|
||||
this.provider.setLocation(route);
|
||||
}
|
||||
setNavigationHelper(helper) {
|
||||
this.navHelper = helper;
|
||||
}
|
||||
static Instance() {
|
||||
if (this.routeHelper === null || this.routeHelper === undefined)
|
||||
this.routeHelper = new RouteHelper();
|
||||
return this.routeHelper;
|
||||
}
|
||||
}
|
||||
Исполняемый файл
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Ссылка в новой задаче
Block a user