getCompanyProfile function
Get company type from Enterprise Node (associatedProfiles) risk metric is different base on company tye
Implementation
Future getCompanyProfile() async {
try {
var enterpriseNode = await Storage.controller.get(':Enterprise');
var profile ='';
try {
//var sectorNode = await enterpriseNodeIterator.current.value.getValue('sector');
//var sectorNode = await enterpriseNode.getValue('sector');
//var sector = sectorNode!.getValue('en');
//logger.d('indiC getEnterpriseUUID1 sector $sector');
var locationNode = await enterpriseNode.getValue('location');
//var locationNode = await enterpriseNodeIterator.current.value.getValue('location');
var location = locationNode!.getValue('en');
//logger.d('indiC getEnterpriseUUID1 location $location');
var profileNode = await enterpriseNode.getValue('associatedProfiles');
//var profileNode = await enterpriseNodeIterator.current.value.getValue('associatedProfiles');
profile = profileNode!.getValue('en')!;
//logger.d('indiC getEnterpriseUUID1 profile $profile');
//CoreValues.enterpriseNode['sector'] = sector;
CoreValues.enterpriseNode['location'] = location;
CoreValues.enterpriseNode['associatedProfiles'] = profile;
} catch (e) {
logger.d('indiA getEnterpriseUUID1 ${e.toString()}');
}
return profile;
} catch (e) {
logger.e(e);
}
}