This commit is contained in:
2020-06-18 18:07:09 +00:00
parent 59bfd20488
commit f2b6f237db
4 changed files with 501 additions and 534 deletions

View File

@@ -114,7 +114,7 @@ namespace rockfishCore.Controllers
{ {
return NotFound(); return NotFound();
} }
var custInfo = await ct.Customer.AsNoTracking().Where(z => z.Id == site.CustomerId).Select(z => new { z.Name, z.Id, dbid = site.DbId }).SingleAsync(); var custInfo = await ct.Customer.AsNoTracking().Where(z => z.Id == site.CustomerId).Select(z => new { z.Name, z.Id, site.CustomerId, dbid = site.DbId }).SingleAsync();
return Ok(custInfo); return Ok(custInfo);
} }

View File

@@ -83,7 +83,9 @@ app.ravLicense = (function () {
if (res.error) { if (res.error) {
$.gevent.publish("app-show-error", res.msg); $.gevent.publish("app-show-error", res.msg);
} else { } else {
$("#key").val(res); page(
"#!/ravLicenses/" + stateMap.id + "/" + stateMap.context.params.cust_id
);
return false; return false;
} }
}); });
@@ -173,7 +175,12 @@ app.ravLicense = (function () {
// app.nav.contextAddLink("licenseRequests/", "Requests", "voice"); // app.nav.contextAddLink("licenseRequests/", "Requests", "voice");
// app.nav.contextAddLink("licenseTemplates/", "", "layers"); // app.nav.contextAddLink("licenseTemplates/", "", "layers");
//case 3233 //case 3233
app.nav.contextAddLink("licenses/", "List", "");
app.nav.contextAddLink(
"ravLicenses/" + stateMap.id + "/" + stateMap.context.params.cust_id,
"Licenses",
"ticket"
); //from here to new license
//set all date inputs to today plus one year //set all date inputs to today plus one year
var oneYearFromNow = moment() var oneYearFromNow = moment()

View File

@@ -63,7 +63,11 @@ app.ravLicenses = (function () {
"<li class='my-5'>" + "<li class='my-5'>" +
"<div class='" + "<div class='" +
itemClass + itemClass +
"' role='alert'><pre>" + "' role='alert'>"+
"<h4>"+
app.utilB.epochToLocalShortDateTime(obj.dtCreated)+
"</h4>"+
"<pre>" +
obj.key + obj.key +
"</pre></div>" + "</pre></div>" +
"</li>" "</li>"
@@ -77,7 +81,7 @@ app.ravLicenses = (function () {
//=========/licenses============== //=========/licenses==============
app.nav.contextClear(); ///ravLicense/122 app.nav.contextClear(); ///ravLicense/122
app.nav.contextAddLink("ravLicense/" + stateMap.id, "New", "plus"); app.nav.contextAddLink("ravLicense/" + stateMap.id+ "/" + stateMap.context.params.cust_id, "New", "plus");
app.nav.contextAddLink( app.nav.contextAddLink(
"customerSiteEdit/" + stateMap.id + "/" + stateMap.context.params.cust_id, "customerSiteEdit/" + stateMap.id + "/" + stateMap.context.params.cust_id,
"Site", "Site",

View File

@@ -12,37 +12,37 @@
/*global $, app */ /*global $, app */
app.shell = (function () { app.shell = (function () {
'use strict'; "use strict";
//---------------- BEGIN MODULE SCOPE VARIABLES -------------- //---------------- BEGIN MODULE SCOPE VARIABLES --------------
var var stateMap = {
stateMap = {
$container: undefined, $container: undefined,
anchor_map: {}, anchor_map: {},
user: { user: {
authenticated: false, authenticated: false,
token: '', token: "",
name: '', name: "",
id: 0 id: 0
}, },
apiUrl: '', apiUrl: "",
search_cache: { search_cache: {
has_cache: false has_cache: false
} }
}, },
tokenExpired, tokenExpired,
//onUPdate, //onUPdate,
onLogin, onLogout, onShowError, onClearError, onLogin,
onLogout,
onShowError,
onClearError,
initModule; initModule;
//----------------- END MODULE SCOPE VARIABLES --------------- //----------------- END MODULE SCOPE VARIABLES ---------------
//------------------- BEGIN UTILITY METHODS ------------------ //------------------- BEGIN UTILITY METHODS ------------------
tokenExpired = function () { tokenExpired = function () {
//fetch stored creds if available //fetch stored creds if available
var creds = store.get('rockfish.usercreds'); var creds = store.get("rockfish.usercreds");
if (creds) { if (creds) {
//check if token has expired //check if token has expired
//is the date greater than the expires date //is the date greater than the expires date
@@ -56,30 +56,28 @@ app.shell = (function () {
} else { } else {
return true; return true;
} }
} };
//-------------------- END UTILITY METHODS ------------------- //-------------------- END UTILITY METHODS -------------------
//------------------- BEGIN EVENT HANDLERS ------------------- //------------------- BEGIN EVENT HANDLERS -------------------
onLogin = function (event, login_user) { onLogin = function (event, login_user) {
//store creds //store creds
store.set('rockfish.usercreds', stateMap.user); store.set("rockfish.usercreds", stateMap.user);
//New token needs to reset lastNav //New token needs to reset lastNav
stateMap.lastNav = new Date(); stateMap.lastNav = new Date();
//Go to the home page //Go to the home page
page('#!/customers/'); page("#!/customers/");
return false; return false;
}; };
onLogout = function (event) { onLogout = function (event) {
store.clear(); store.clear();
stateMap.user.authenticated = false; stateMap.user.authenticated = false;
stateMap.user.name = ''; stateMap.user.name = "";
stateMap.user.token = ''; stateMap.user.token = "";
stateMap.user.id = 0; stateMap.user.id = 0;
page('#!/authenticate/'); page("#!/authenticate/");
return false; return false;
}; };
@@ -89,10 +87,9 @@ app.shell = (function () {
// return false; // return false;
// }; // };
onShowError = function (event, msg) { onShowError = function (event, msg) {
$("#app-error-div").removeClass("d-none"); $("#app-error-div").removeClass("d-none");
$('#app-error-message').text(msg); $("#app-error-message").text(msg);
return false; return false;
}; };
@@ -101,62 +98,58 @@ app.shell = (function () {
return false; return false;
}; };
//-------------------- END EVENT HANDLERS -------------------- //-------------------- END EVENT HANDLERS --------------------
//------------------- BEGIN PUBLIC METHODS ------------------- //------------------- BEGIN PUBLIC METHODS -------------------
initModule = function ($container) { initModule = function ($container) {
document.title = "Rockfish " + app.api.RockFishVersion;
document.title = 'Rockfish ' + app.api.RockFishVersion;
//PRE FLIGHT CHECK //PRE FLIGHT CHECK
//================ //================
//local storage required //local storage required
if (!store.enabled) { if (!store.enabled) {
alert('Local storage is not supported by your browser. Please disable "Private Mode", or upgrade to a modern browser.'); alert(
'Local storage is not supported by your browser. Please disable "Private Mode", or upgrade to a modern browser.'
);
return; return;
} }
//wait indicator for ajax functions //wait indicator for ajax functions
$(document).ajaxStart(function () { $(document)
.ajaxStart(function () {
//disable all buttons //disable all buttons
$('.app-frm-buttons button').prop('disabled', true).addClass('disabled'); $(".app-frm-buttons button")
.prop("disabled", true)
.addClass("disabled");
//$('.app-frm-buttons button').attr('disabled', 'disabled'); //$('.app-frm-buttons button').attr('disabled', 'disabled');
$("body").css("cursor", "progress"); $("body").css("cursor", "progress");
//add app-ajax-busy style to buttons div where user clicked //add app-ajax-busy style to buttons div where user clicked
$('.app-frm-buttons').addClass('app-ajax-busy'); $(".app-frm-buttons").addClass("app-ajax-busy");
})
}).ajaxStop(function () { .ajaxStop(function () {
//with delay in case it's too fast to see //with delay in case it's too fast to see
setTimeout(function () { setTimeout(function () {
$('.app-frm-buttons button').prop('disabled', false).removeClass('disabled'); $(".app-frm-buttons button")
.prop("disabled", false)
.removeClass("disabled");
//$('.app-frm-buttons button').removeAttr('disabled'); //$('.app-frm-buttons button').removeAttr('disabled');
$("body").css("cursor", "default"); $("body").css("cursor", "default");
$('.app-frm-buttons').removeClass('app-ajax-busy'); $(".app-frm-buttons").removeClass("app-ajax-busy");
}, 250); }, 250);
}); });
//save on app so can call from anywhere //save on app so can call from anywhere
// app.mdInit = mdInit; // app.mdInit = mdInit;
// load HTML and map jQuery collections // load HTML and map jQuery collections
stateMap.$container = $container; stateMap.$container = $container;
$container.html(Handlebars.templates['app.shell']({})); $container.html(Handlebars.templates["app.shell"]({}));
//auto hide navbar on click //auto hide navbar on click
//rfac is a class only on the items that should trigger collapse //rfac is a class only on the items that should trigger collapse
$('.rfac').on('click', function () { $(".rfac").on("click", function () {
$('.navbar-collapse').collapse('hide'); $(".navbar-collapse").collapse("hide");
}); });
//SEARCH //SEARCH
@@ -165,20 +158,17 @@ app.shell = (function () {
//determine API url and save it //determine API url and save it
stateMap.apiUrl = app.utilB.getApiUrl(); stateMap.apiUrl = app.utilB.getApiUrl();
//fetch stored creds if available //fetch stored creds if available
var creds = store.get('rockfish.usercreds'); var creds = store.get("rockfish.usercreds");
// if (creds) { // if (creds) {
//check if token has expired //check if token has expired
if (tokenExpired()) { if (tokenExpired()) {
stateMap.user.authenticated = false; stateMap.user.authenticated = false;
stateMap.user.name = ''; stateMap.user.name = "";
stateMap.user.token = ''; stateMap.user.token = "";
stateMap.user.id = 0; stateMap.user.id = 0;
} else { } else {
//Show the logout item in the menu //Show the logout item in the menu
$(".app-mnu-logout").removeClass("app-hidden"); $(".app-mnu-logout").removeClass("app-hidden");
@@ -189,92 +179,77 @@ app.shell = (function () {
} }
//} //}
//EVENT SUBSCRIPTIONS //EVENT SUBSCRIPTIONS
$.gevent.subscribe($container, 'app-login', onLogin); $.gevent.subscribe($container, "app-login", onLogin);
$.gevent.subscribe($container, 'app-logout', onLogout); $.gevent.subscribe($container, "app-logout", onLogout);
//$.gevent.subscribe($container, 'rf-update', onUpdate); //$.gevent.subscribe($container, 'rf-update', onUpdate);
$.gevent.subscribe($container, 'app-show-error', onShowError); $.gevent.subscribe($container, "app-show-error", onShowError);
$.gevent.subscribe($container, 'app-clear-error', onClearError); $.gevent.subscribe($container, "app-clear-error", onClearError);
//ROUTES //ROUTES
// //
page.base('/default.htm'); page.base("/default.htm");
page('*', beforeUrlChange); page("*", beforeUrlChange);
page('/authenticate', authenticate); page("/authenticate", authenticate);
page('/', inbox); page("/", inbox);
page('/reportData', reportData); page("/reportData", reportData);
page('/reportDataProdEmails', reportDataProdEmail); page("/reportDataProdEmails", reportDataProdEmail);
page('/reportDataExpires', reportDataExpires); page("/reportDataExpires", reportDataExpires);
page('/search', search); page("/search", search);
page('/logout', function () { page("/logout", function () {
$.gevent.publish('app-logout'); $.gevent.publish("app-logout");
}); });
page('/customers', customers); page("/customers", customers);
page('/customerEdit/:id', customerEdit); page("/customerEdit/:id", customerEdit);
page('/customerSites/:id', customerSites); page("/customerSites/:id", customerSites);
page('/customerSiteEdit/:id/:cust_id', customerSiteEdit); page("/customerSiteEdit/:id/:cust_id", customerSiteEdit);
page('/purchases/:id', purchases); page("/purchases/:id", purchases);
page('/purchaseEdit/:id/:site_id', purchaseEdit); page("/purchaseEdit/:id/:site_id", purchaseEdit);
page('/license', license); page("/license", license);
page('/licenseTemplates', licenseTemplates); page("/licenseTemplates", licenseTemplates);
page('/licenseRequests', licenseRequests); page("/licenseRequests", licenseRequests);
page('/licenseRequestEdit/:id', licenseRequestEdit); page("/licenseRequestEdit/:id", licenseRequestEdit);
//case 3233 //case 3233
page('/licenses', licenses); page("/licenses", licenses);
page('/licenseView/:id', licenseView); page("/licenseView/:id", licenseView);
page('/subscription', subscription); page("/subscription", subscription);
page('/subnotify', subnotify); page("/subnotify", subnotify);
page('/templates', templates); page("/templates", templates);
page('/templateEdit/:id', templateEdit); page("/templateEdit/:id", templateEdit);
page('/inbox', inbox); page("/inbox", inbox);
page.exit('/inbox', function(ctx,next) { page.exit("/inbox", function (ctx, next) {
app.inbox.terminateModule(); app.inbox.terminateModule();
next(); next();
}); });
page('/mailEdit/:mail_account/:mail_folder/:mail_id', mailEdit); page("/mailEdit/:mail_account/:mail_folder/:mail_id", mailEdit);
page('/rfcases', rfcases); page("/rfcases", rfcases);
page('/rfcaseEdit/:id', rfcaseEdit); page("/rfcaseEdit/:id", rfcaseEdit);
page('/rfsettings', rfsettings); page("/rfsettings", rfsettings);
page('/ops', ops); page("/ops", ops);
page('/trials', trials); page("/trials", trials);
page('/trialEdit/:id', trialEdit); page("/trialEdit/:id", trialEdit);
page('/ravLicenses/:id/:cust_id', ravLicenses); page("/ravLicenses/:id/:cust_id", ravLicenses);
page('/ravLicense/:id', ravLicense); page("/ravLicense/:id/:cust_id", ravLicense);
page('*', notFound); page("*", notFound);
page({ page({
hashbang: true hashbang: true
}); });
// /ROUTES // /ROUTES
}; };
// End PUBLIC method /initModule/ // End PUBLIC method /initModule/
var beforeUrlChange = function (ctx, next) { var beforeUrlChange = function (ctx, next) {
$.gevent.publish('app-clear-error'); $.gevent.publish("app-clear-error");
app.shell.stateMap.mediaSize = app.utilB.getMediaSize(); app.shell.stateMap.mediaSize = app.utilB.getMediaSize();
//case 3513 //case 3513
document.title = 'Rockfish ' + app.api.RockFishVersion; document.title = "Rockfish " + app.api.RockFishVersion;
//bypass stuff below if about to logout //bypass stuff below if about to logout
if (ctx.path == '/logout') { if (ctx.path == "/logout") {
return next(); return next();
} }
//================================================================ //================================================================
//Check authentication token to see if expired, but only if it's been a few minutes since last navigation //Check authentication token to see if expired, but only if it's been a few minutes since last navigation
if (stateMap.user.authenticated) { if (stateMap.user.authenticated) {
@@ -282,21 +257,19 @@ app.shell = (function () {
//default to one hour ago in case it hasn't ever been set yet or isn't in statemap //default to one hour ago in case it hasn't ever been set yet or isn't in statemap
if (!stateMap.lastNav) { if (!stateMap.lastNav) {
//Isn't this sketchy? Is this a date or a moment being set here //Isn't this sketchy? Is this a date or a moment being set here
stateMap.lastNav = moment().subtract(3600, 's').toDate();//60 minutes ago stateMap.lastNav = moment().subtract(3600, "s").toDate(); //60 minutes ago
} }
var mNow = moment(new Date()); //todays date var mNow = moment(new Date()); //todays date
var mLastNav = moment(stateMap.lastNav); // another date var mLastNav = moment(stateMap.lastNav); // another date
var duration = moment.duration(mNow.diff(mLastNav)); var duration = moment.duration(mNow.diff(mLastNav));
var secondsSinceLastNav = duration.asSeconds(); var secondsSinceLastNav = duration.asSeconds();
if (secondsSinceLastNav > 300)//have we checked in the last 5 minutes? if (secondsSinceLastNav > 300) {
{ //have we checked in the last 5 minutes?
if (tokenExpired()) { if (tokenExpired()) {
stateMap.user.authenticated = false; stateMap.user.authenticated = false;
} }
} }
stateMap.lastNav = new Date(); stateMap.lastNav = new Date();
} }
@@ -309,11 +282,8 @@ app.shell = (function () {
duration: 200 duration: 200
}); });
//page nav to authenticate //page nav to authenticate
if (ctx.path != '/authenticate/') if (ctx.path != "/authenticate/") return page("#!/authenticate/");
return page('#!/authenticate/');
} else { } else {
//logged in so make sure to show toolbar here //logged in so make sure to show toolbar here
$("#rf-nav").show({ $("#rf-nav").show({
@@ -322,294 +292,280 @@ app.shell = (function () {
} }
next(); next();
} };
//TODO: Clean up this coral reef steaming mess //TODO: Clean up this coral reef steaming mess
//replace with a function that generates these functions since they are all (nearly) identical //replace with a function that generates these functions since they are all (nearly) identical
var authenticate = function (ctx) { var authenticate = function (ctx) {
app.authenticate.configModule({ app.authenticate.configModule({
context: ctx context: ctx
}); });
app.authenticate.initModule(); app.authenticate.initModule();
} };
var reportData = function (ctx) { var reportData = function (ctx) {
app.nav.setSelectedMenuItem('reportData'); app.nav.setSelectedMenuItem("reportData");
app.reportData.configModule({ app.reportData.configModule({
context: ctx context: ctx
}); });
app.reportData.initModule(); app.reportData.initModule();
} };
var reportDataProdEmail = function (ctx) { var reportDataProdEmail = function (ctx) {
app.nav.setSelectedMenuItem('reportData'); app.nav.setSelectedMenuItem("reportData");
app.reportDataProdEmail.configModule({ app.reportDataProdEmail.configModule({
context: ctx context: ctx
}); });
app.reportDataProdEmail.initModule(); app.reportDataProdEmail.initModule();
} };
var reportDataExpires = function (ctx) { var reportDataExpires = function (ctx) {
app.nav.setSelectedMenuItem('reportData'); app.nav.setSelectedMenuItem("reportData");
app.reportDataExpires.configModule({ app.reportDataExpires.configModule({
context: ctx context: ctx
}); });
app.reportDataExpires.initModule(); app.reportDataExpires.initModule();
} };
var search = function (ctx) { var search = function (ctx) {
app.nav.setSelectedMenuItem('search'); app.nav.setSelectedMenuItem("search");
app.search.configModule({ app.search.configModule({
context: ctx context: ctx
}); });
app.search.initModule(); app.search.initModule();
} };
var customers = function (ctx) { var customers = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.customers.configModule({ app.customers.configModule({
context: ctx context: ctx
}); });
app.customers.initModule(); app.customers.initModule();
} };
var customerEdit = function (ctx) { var customerEdit = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.customerEdit.configModule({ app.customerEdit.configModule({
context: ctx context: ctx
}); });
app.customerEdit.initModule(); app.customerEdit.initModule();
} };
var customerSites = function (ctx) { var customerSites = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.customerSites.configModule({ app.customerSites.configModule({
context: ctx context: ctx
}); });
app.customerSites.initModule(); app.customerSites.initModule();
} };
var customerSiteEdit = function (ctx) { var customerSiteEdit = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.customerSiteEdit.configModule({ app.customerSiteEdit.configModule({
context: ctx context: ctx
}); });
app.customerSiteEdit.initModule(); app.customerSiteEdit.initModule();
} };
var purchases = function (ctx) { var purchases = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.purchases.configModule({ app.purchases.configModule({
context: ctx context: ctx
}); });
app.purchases.initModule(); app.purchases.initModule();
} };
var purchaseEdit = function (ctx) { var purchaseEdit = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.purchaseEdit.configModule({ app.purchaseEdit.configModule({
context: ctx context: ctx
}); });
app.purchaseEdit.initModule(); app.purchaseEdit.initModule();
} };
var license = function (ctx) { var license = function (ctx) {
app.nav.setSelectedMenuItem('license'); app.nav.setSelectedMenuItem("license");
app.license.configModule({ app.license.configModule({
context: ctx context: ctx
}); });
app.license.initModule(); app.license.initModule();
} };
var licenseTemplates = function (ctx) { var licenseTemplates = function (ctx) {
app.nav.setSelectedMenuItem('license'); app.nav.setSelectedMenuItem("license");
app.licenseTemplates.configModule({ app.licenseTemplates.configModule({
context: ctx context: ctx
}); });
app.licenseTemplates.initModule(); app.licenseTemplates.initModule();
} };
var licenseRequests = function (ctx) { var licenseRequests = function (ctx) {
app.nav.setSelectedMenuItem('license'); app.nav.setSelectedMenuItem("license");
app.licenseRequests.configModule({ app.licenseRequests.configModule({
context: ctx context: ctx
}); });
app.licenseRequests.initModule(); app.licenseRequests.initModule();
} };
var licenseRequestEdit = function (ctx) { var licenseRequestEdit = function (ctx) {
app.nav.setSelectedMenuItem('license'); app.nav.setSelectedMenuItem("license");
app.licenseRequestEdit.configModule({ app.licenseRequestEdit.configModule({
context: ctx context: ctx
}); });
app.licenseRequestEdit.initModule(); app.licenseRequestEdit.initModule();
} };
//case 3233 //case 3233
var licenses = function (ctx) { var licenses = function (ctx) {
app.nav.setSelectedMenuItem('license'); app.nav.setSelectedMenuItem("license");
app.licenses.configModule({ app.licenses.configModule({
context: ctx context: ctx
}); });
app.licenses.initModule(); app.licenses.initModule();
} };
//case 3233 //case 3233
var licenseView = function (ctx) { var licenseView = function (ctx) {
app.nav.setSelectedMenuItem('license'); app.nav.setSelectedMenuItem("license");
app.licenseView.configModule({ app.licenseView.configModule({
context: ctx context: ctx
}); });
app.licenseView.initModule(); app.licenseView.initModule();
} };
var subscription = function (ctx) { var subscription = function (ctx) {
app.nav.setSelectedMenuItem('subscription'); app.nav.setSelectedMenuItem("subscription");
app.subscription.configModule({ app.subscription.configModule({
context: ctx context: ctx
}); });
app.subscription.initModule(); app.subscription.initModule();
} };
var subnotify = function (ctx) { var subnotify = function (ctx) {
app.nav.setSelectedMenuItem('subscription'); app.nav.setSelectedMenuItem("subscription");
app.subnotify.configModule({ app.subnotify.configModule({
context: ctx context: ctx
}); });
app.subnotify.initModule(); app.subnotify.initModule();
} };
var templates = function (ctx) { var templates = function (ctx) {
app.nav.setSelectedMenuItem('templates'); app.nav.setSelectedMenuItem("templates");
app.templates.configModule({ app.templates.configModule({
context: ctx context: ctx
}); });
app.templates.initModule(); app.templates.initModule();
} };
var templateEdit = function (ctx) { var templateEdit = function (ctx) {
app.nav.setSelectedMenuItem('templates'); app.nav.setSelectedMenuItem("templates");
app.templateEdit.configModule({ app.templateEdit.configModule({
context: ctx context: ctx
}); });
app.templateEdit.initModule(); app.templateEdit.initModule();
} };
var inbox = function (ctx) { var inbox = function (ctx) {
app.nav.setSelectedMenuItem('inbox'); app.nav.setSelectedMenuItem("inbox");
app.inbox.configModule({ app.inbox.configModule({
context: ctx context: ctx
}); });
app.inbox.initModule(); app.inbox.initModule();
} };
var mailEdit = function (ctx) { var mailEdit = function (ctx) {
app.nav.setSelectedMenuItem('inbox'); app.nav.setSelectedMenuItem("inbox");
app.mailEdit.configModule({ app.mailEdit.configModule({
context: ctx context: ctx
}); });
app.mailEdit.initModule(); app.mailEdit.initModule();
} };
var rfcases = function (ctx) { var rfcases = function (ctx) {
app.nav.setSelectedMenuItem('rfcases'); app.nav.setSelectedMenuItem("rfcases");
app.rfcases.configModule({ app.rfcases.configModule({
context: ctx context: ctx
}); });
app.rfcases.initModule(); app.rfcases.initModule();
} };
var rfcaseEdit = function (ctx) { var rfcaseEdit = function (ctx) {
app.nav.setSelectedMenuItem('rfcases'); app.nav.setSelectedMenuItem("rfcases");
app.rfcaseEdit.configModule({ app.rfcaseEdit.configModule({
context: ctx context: ctx
}); });
app.rfcaseEdit.initModule(); app.rfcaseEdit.initModule();
} };
var rfsettings = function (ctx) { var rfsettings = function (ctx) {
app.nav.setSelectedMenuItem('rfsettings'); app.nav.setSelectedMenuItem("rfsettings");
app.rfsettings.configModule({ app.rfsettings.configModule({
context: ctx context: ctx
}); });
app.rfsettings.initModule(); app.rfsettings.initModule();
} };
var ops = function (ctx) { var ops = function (ctx) {
app.nav.setSelectedMenuItem('ops'); app.nav.setSelectedMenuItem("ops");
app.ops.configModule({ app.ops.configModule({
context: ctx context: ctx
}); });
app.ops.initModule(); app.ops.initModule();
} };
//case 3233 //case 3233
var trials = function (ctx) { var trials = function (ctx) {
app.nav.setSelectedMenuItem('trials'); app.nav.setSelectedMenuItem("trials");
app.trials.configModule({ app.trials.configModule({
context: ctx context: ctx
}); });
app.trials.initModule(); app.trials.initModule();
} };
//case 3233 //case 3233
var trialEdit = function (ctx) { var trialEdit = function (ctx) {
app.nav.setSelectedMenuItem('trials'); app.nav.setSelectedMenuItem("trials");
app.trialEdit.configModule({ app.trialEdit.configModule({
context: ctx context: ctx
}); });
app.trialEdit.initModule(); app.trialEdit.initModule();
} };
var trialEdit = function (ctx) { var trialEdit = function (ctx) {
app.nav.setSelectedMenuItem('trials'); app.nav.setSelectedMenuItem("trials");
app.trialEdit.configModule({ app.trialEdit.configModule({
context: ctx context: ctx
}); });
app.trialEdit.initModule(); app.trialEdit.initModule();
} };
var ravLicense = function (ctx) { var ravLicense = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.ravLicense.configModule({ app.ravLicense.configModule({
context: ctx context: ctx
}); });
app.ravLicense.initModule(); app.ravLicense.initModule();
} };
var ravLicenses = function (ctx) { var ravLicenses = function (ctx) {
app.nav.setSelectedMenuItem('customers'); app.nav.setSelectedMenuItem("customers");
app.ravLicenses.configModule({ app.ravLicenses.configModule({
context: ctx context: ctx
}); });
app.ravLicenses.initModule(); app.ravLicenses.initModule();
} };
var notFound = function (ctx) { var notFound = function (ctx) {
app.fourohfour.configModule({ app.fourohfour.configModule({
context: ctx context: ctx
}); });
app.fourohfour.initModule(); app.fourohfour.initModule();
} };
return { return {
initModule: initModule, initModule: initModule,
stateMap: stateMap stateMap: stateMap
}; };
//------------------- END PUBLIC METHODS --------------------- //------------------- END PUBLIC METHODS ---------------------
}()); })();