Subversion Repositories SmartDukaan

Rev

Rev 37845 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37845 Rev 37873
Line 54... Line 54...
54
 
54
 
55
    @Autowired
55
    @Autowired
56
    private BillingWarehouseService billingWarehouseService;
56
    private BillingWarehouseService billingWarehouseService;
57
 
57
 
58
 
58
 
59
    // These users see every sidebar menu regardless of auth.menu_category (as do L5 position holders).
59
    // These users see every sidebar menu regardless of auth.menu_category (as do L8/L9 position holders).
60
    public static final List<String> ALL_MENU_EMAILS = Arrays.asList("amit.gupta@smartdukaan.com", "ranu.rajput@smartdukaan.com",
60
    public static final List<String> ALL_MENU_EMAILS = Arrays.asList("amit.gupta@smartdukaan.com", "ranu.rajput@smartdukaan.com",
61
            "vikas.jangra@smartdukaan.com", "tanay.gupta@smartdukaan.com", "rudy.kanwar@smartdukaan.com");
61
            "vikas.jangra@smartdukaan.com", "tanay.gupta@smartdukaan.com", "rudy.kanwar@smartdukaan.com");
62
    @Autowired
62
    @Autowired
63
    private Gson gson;
63
    private Gson gson;
64
 
64
 
Line 621... Line 621...
621
            }
621
            }
622
 
622
 
623
            if (ALL_MENU_EMAILS.contains(email)) {
623
            if (ALL_MENU_EMAILS.contains(email)) {
624
                menus = menuRepository.selectAllBySequence();
624
                menus = menuRepository.selectAllBySequence();
625
            } else if (positions.size() > 0) {
625
            } else if (positions.size() > 0) {
626
                if (positions.stream().filter(x -> x.getEscalationType().equals(EscalationType.L5)).count() > 0) {
626
                if (positions.stream().anyMatch(x -> x.getEscalationType().equals(EscalationType.L8)
-
 
627
                        || x.getEscalationType().equals(EscalationType.L9))) {
627
                    menus = menuRepository.selectAllBySequence();
628
                    menus = menuRepository.selectAllBySequence();
628
                } else {
629
                } else {
629
                    List<Integer> menuIds = menuCategoryRepository.selectAllByPositions(positions).stream()
630
                    List<Integer> menuIds = menuCategoryRepository.selectAllByPositions(positions).stream()
630
                            .map(x -> x.getMenuId()).collect(Collectors.toList());
631
                            .map(x -> x.getMenuId()).collect(Collectors.toList());
631
                    if (menuIds.size() > 0) {
632
                    if (menuIds.size() > 0) {