Subversion Repositories SmartDukaan

Rev

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

Rev 29675 Rev 29677
Line 232... Line 232...
232
		return "offer-edit";
232
		return "offer-edit";
233
 
233
 
234
	}
234
	}
235
	
235
	
236
	@RequestMapping(value = "/published-offers/{yearMonth}", method = RequestMethod.GET)
236
	@RequestMapping(value = "/published-offers/{yearMonth}", method = RequestMethod.GET)
237
	public String offerById(HttpServletRequest request, YearMonth yearMonth, Model model) throws ProfitMandiBusinessException {
237
	public String publishedOffersOnMonthBefore(HttpServletRequest request, @PathVariable int yearMonth, Model model) throws ProfitMandiBusinessException {
238
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
238
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
239
		int fofoId = loginDetails.getFofoId();
239
		int fofoId = loginDetails.getFofoId();
240
		List<CreateOfferRequest> createOffers = offerService.getPublishedOffers(fofoId, yearMonth);
240
		List<CreateOfferRequest> createOffers = offerService.getPublishedOffers(fofoId, YearMonth.from(LocalDate.now()).minusMonths(yearMonth));
241
		
241
		
242
		model.addAttribute("publishedOffers", createOffers);
242
		model.addAttribute("publishedOffers", createOffers);
243
		
243
		
244
		return "published-offers";
244
		return "published-offers";
245
		
245