To add the tab in my account page as new tab in the elberes version we need to extend the view and the code for that.
Entry point file:
define('Inventory.Management'
, [
'Inventory.Management.Router','Profile.Model'
]
, function
(
Router,ProfileModel
)
{
'use strict';
return {
// @property {MenuItem} MenuItems
MenuItems: function() {
var profile = ProfileModel.getInstance();
var customerAdmin = _.find(profile.get('customfields'), function (field) { return field.name === 'custentity_dp_admin_settings' });
var adminSettingValue = SC.CONFIGURATION.product.segment;
var CustomerValue = customerAdmin && customerAdmin.value === adminSettingValue ? true : false;
if(CustomerValue){
return {
id: 'Inventorymanagement',
name: 'Inventory Management',
index: 5,
children: [{
id: 'inventoryoverview',
name: 'Inventory overview',
url: 'inventoryoverview',
index: 1
},
{
id: 'inventorylookup'
, name: 'Inventory Lookup'
, url: 'inventorylookup'
, index: 2
}
]
};
}
},
mountToApp: function (application)
{
return new Router(application)
}
}
});
View file:
Create view file with cosponding code.