Subversion Repositories SmartDukaan

Rev

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

Rev 36227 Rev 36241
Line 498... Line 498...
498
            boolean isRbmL3OrAbove = positions.stream().anyMatch(pos ->
498
            boolean isRbmL3OrAbove = positions.stream().anyMatch(pos ->
499
                    pos.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_RBM
499
                    pos.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_RBM
500
                            && pos.getEscalationType() != null
500
                            && pos.getEscalationType() != null
501
                            && pos.getEscalationType() != EscalationType.L1
501
                            && pos.getEscalationType() != EscalationType.L1
502
                            && pos.getEscalationType() != EscalationType.L2);
502
                            && pos.getEscalationType() != EscalationType.L2);
503
            // Other categories: L2 and above can see all stores
-
 
504
            boolean isNonRbmL2OrAbove = positions.stream().anyMatch(pos ->
-
 
505
                    pos.getCategoryId() != ProfitMandiConstants.TICKET_CATEGORY_RBM
-
 
506
                            && pos.getEscalationType() != null
-
 
507
                            && pos.getEscalationType() != EscalationType.L1);
-
 
508
            model.addAttribute("isRBM", isRBM);
503
            model.addAttribute("isRBM", isRBM);
509
            model.addAttribute("authEmail", email);
504
            model.addAttribute("authEmail", email);
510
            Set<Integer> fofoIds = new HashSet<>();
505
            Set<Integer> fofoIds = new HashSet<>();
511
            if (isRbmL3OrAbove || isNonRbmL2OrAbove) {
506
            if (isRbmL3OrAbove) {
512
                fofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId()).collect(Collectors.toSet());
507
                fofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId()).collect(Collectors.toSet());
513
            } else {
508
            } else {
514
                fofoIds = csService1.getAuthFofoIds(email, true);
509
                fofoIds = csService1.getAuthFofoIds(email, true);
515
            }
510
            }
516
 
511