Subversion Repositories SmartDukaan

Rev

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

Rev 33710 Rev 33711
Line 185... Line 185...
185
        String approverEmail = "gaurav.sharma@smartdukaan.com";
185
        String approverEmail = "gaurav.sharma@smartdukaan.com";
186
        if (email.equals(approverEmail)) {
186
        if (email.equals(approverEmail)) {
187
            isDocApprover = true;
187
            isDocApprover = true;
188
        }
188
        }
189
        boolean isAgreedBrandFeeChanger = agreedBrandFeeChangerEmail.stream().anyMatch(x -> x.equals(email));
189
        boolean isAgreedBrandFeeChanger = agreedBrandFeeChangerEmail.stream().anyMatch(x -> x.equals(email));
190
        List<String> authEmail = Arrays.asList("sm@smartdukaan.com", "gaurav.sharma@smartdukaan.com", "tejus.lohani@smartdukaan.com");
190
        List<String> authEmail = Arrays.asList("sm@smartdukaan.com", "tarun.verma@smartdukaan.com", "ashutosh.verma@smartdukaan.com");
191
        boolean isAuthUser = authEmail.stream().anyMatch(x -> x.equals(email));
191
        boolean isAuthUser = authEmail.stream().anyMatch(x -> x.equals(email));
192
        List<LoiFormModel> pendingFormList = loiFormService.pendingFormList(email);
192
        List<LoiFormModel> pendingFormList = loiFormService.pendingFormList(email);
193
        model.addAttribute("isDocApprover", isDocApprover);
193
        model.addAttribute("isDocApprover", isDocApprover);
194
        model.addAttribute("isAuthUser", isAuthUser);
194
        model.addAttribute("isAuthUser", isAuthUser);
195
        model.addAttribute("isAgreedBrandFeeChanger", isAgreedBrandFeeChanger);
195
        model.addAttribute("isAgreedBrandFeeChanger", isAgreedBrandFeeChanger);
Line 448... Line 448...
448
            throw new ProfitMandiBusinessException("failed in Authority check ", null, "Sorry " + authRepository.selectByEmailOrMobile(loginDetails.getEmailId()).getName() + " you have no authority to change agreed brand fee");
448
            throw new ProfitMandiBusinessException("failed in Authority check ", null, "Sorry " + authRepository.selectByEmailOrMobile(loginDetails.getEmailId()).getName() + " you have no authority to change agreed brand fee");
449
        }
449
        }
450
 
450
 
451
    }
451
    }
452
 
452
 
-
 
453
    @RequestMapping(value = "/cancelLoi", method = RequestMethod.PUT)
-
 
454
    public String loiCancellation(@RequestParam int loiId, Model model) throws Exception {
-
 
455
        LoiForm loiForm = loiFormRepository.selectById(loiId);
-
 
456
        loiForm.setStatus(LoiStatus.LOI_CANCELLED);
-
 
457
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
-
 
458
        return "response";
-
 
459
    }
-
 
460
 
453
}
461
}