| Line 396... |
Line 396... |
| 396 |
private String adminPanel(int fofoId, String email, Model model) throws ProfitMandiBusinessException {
|
396 |
private String adminPanel(int fofoId, String email, Model model) throws ProfitMandiBusinessException {
|
| 397 |
List<Menu> menus = null;
|
397 |
List<Menu> menus = null;
|
| 398 |
try {
|
398 |
try {
|
| 399 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
399 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
| 400 |
List<Position> positions = positionRepository.selectAll(authUser.getId());
|
400 |
List<Position> positions = positionRepository.selectAll(authUser.getId());
|
| - |
|
401 |
if(Arrays.asList("amit.gupta@shop2020.in", "tejbeer.kaur@shop2020.in").contains(email)) {
|
| - |
|
402 |
menus = menuRepository.selectAll();
|
| 401 |
if (positions.size() > 0) {
|
403 |
} else if (positions.size() > 0) {
|
| 402 |
if (positions.stream().filter(x -> x.getEscalationType().equals(EscalationType.L4)).count() > 0
|
404 |
if (positions.stream().filter(x -> x.getEscalationType().equals(EscalationType.L4)).count() > 0) {
|
| 403 |
|| Arrays.asList("amit.gupta@shop2020.in", "tejbeer.kaur@shop2020.in").contains(email)) {
|
- |
|
| 404 |
menus = menuRepository.selectAll();
|
405 |
menus = menuRepository.selectAll();
|
| 405 |
} else {
|
406 |
} else {
|
| 406 |
List<Integer> menuIds = menuCategoryRepository.selectAllByPositions(positions).stream()
|
407 |
List<Integer> menuIds = menuCategoryRepository.selectAllByPositions(positions).stream()
|
| 407 |
.map(x -> x.getMenuId()).collect(Collectors.toList());
|
408 |
.map(x -> x.getMenuId()).collect(Collectors.toList());
|
| 408 |
LOGGER.info("Menu Ids are {}", menuIds);
|
409 |
LOGGER.info("Menu Ids are {}", menuIds);
|