Subversion Repositories SmartDukaan

Rev

Rev 25175 | Rev 25180 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25175 Rev 25179
Line 116... Line 116...
116
 
116
 
117
	@RequestMapping(value = "/12dashboard34", method = RequestMethod.GET)
117
	@RequestMapping(value = "/12dashboard34", method = RequestMethod.GET)
118
	public String dashboard1(HttpServletRequest request, Model model) throws Exception {
118
	public String dashboard1(HttpServletRequest request, Model model) throws Exception {
119
		LOGGER.info("In Dashboard1");
119
		LOGGER.info("In Dashboard1");
120
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
120
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
-
 
121
		boolean isAdmin = roleManager.isAdmin(loginDetails.getRoleIds());
-
 
122
		model.addAttribute("isAdmin", isAdmin);
-
 
123
		if(!isAdmin) {
121
		model.addAttribute("brandStockPrices", this.getBrandStockPrices(loginDetails.getFofoId()));
124
			model.addAttribute("brandStockPrices", this.getBrandStockPrices(loginDetails.getFofoId()));
122
		model.addAttribute("salesMap", this.getSales(loginDetails.getFofoId()));
125
			model.addAttribute("salesMap", this.getSales(loginDetails.getFofoId()));
123
		model.addAttribute("investments", this.getInvestments(loginDetails.getFofoId()));
126
			model.addAttribute("investments", this.getInvestments(loginDetails.getFofoId()));
-
 
127
			return "dashboard1";
-
 
128
		}
124
		return "dashboard1";
129
		return "dashboard1";
125
	}
130
	}
126
 
131
 
127
	private Map<String, Object> getInvestments(int fofoId) throws Exception {
132
	private Map<String, Object> getInvestments(int fofoId) throws Exception {
128
		Map<String, Object> investments = new LinkedHashMap<>();
133
		Map<String, Object> investments = new LinkedHashMap<>();