UI Tweaks, persist cost tab open, revert outfitting order to original

This commit is contained in:
Colin McLeod
2015-07-03 15:30:49 -07:00
parent e0db9fdfb0
commit 381387c04f
3 changed files with 50 additions and 24 deletions

View File

@@ -204,6 +204,27 @@ angular.module('app').service('Persist', ['$window', 'lodash', function($window,
return null;
};
/**
* Persist selected cost tab
* @param {number} val Discount value/amount
*/
this.setCostTab = function(tabName) {
if (this.lsEnabled) {
return localStorage.setItem('costTab', tabName);
}
};
/**
* Get the saved discount
* @return {number} val Discount value/amount
*/
this.getCostTab = function() {
if (this.lsEnabled) {
return localStorage.getItem('costTab');
}
return null;
};
/**
* Retrieve the last router state from local storage
* @param {object} state State object containing state name and params