Search in sources :

Example 6 with IncludePage

use of freemarker.ext.servlet.IncludePage in project head by mifos.

the class ClientsAndAccountsPageController method showClientsAndAccounts.

@RequestMapping(value = "/clientsAndAccounts", method = { RequestMethod.POST, RequestMethod.GET })
public ModelAndView showClientsAndAccounts(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("customerSearch") CustomerSearchFormBean customerSearchFormBean, @RequestParam(required = false) Short officeId, @RequestParam(required = false) Short loanOfficerId) {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.addObject("include_page", new IncludePage(request, response));
    boolean isCenterHierarchyExists = configurationServiceFacade.getBooleanConfig("ClientRules.CenterHierarchyExists");
    modelAndView.addObject("isCenterHierarchyExists", isCenterHierarchyExists);
    if (officeId == null && loanOfficerId == null) {
        modelAndView = showClientsAndAccountsMainSearch(request, customerSearchFormBean, modelAndView);
    } else {
        if (loanOfficerId == null) {
            modelAndView = showClientsAndAccountsBranchSearch(request, customerSearchFormBean, modelAndView, officeId);
        } else {
            modelAndView = showClientsAndAccountsBranchSearchLoanOfficer(request, customerSearchFormBean, modelAndView, officeId, loanOfficerId);
        }
    }
    return modelAndView;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) IncludePage(freemarker.ext.servlet.IncludePage) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 7 with IncludePage

use of freemarker.ext.servlet.IncludePage in project head by mifos.

the class ViewCustomerDetailsController method showCenterDetails.

@RequestMapping(value = "/viewCenterDetails", method = RequestMethod.GET)
public ModelAndView showCenterDetails(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = new ModelAndView();
    sitePreferenceHelper.resolveSiteType(modelAndView, "viewCenterDetails", request);
    modelAndView.addObject("include_page", new IncludePage(request, response));
    String centerSystemId = request.getParameter("globalCustNum");
    CenterInformationDto centerInformationDto = this.centerServiceFacade.getCenterInformationDto(centerSystemId);
    modelAndView.addObject("centerInformationDto", centerInformationDto);
    modelAndView.addObject("currentPageUrl", UrlHelper.constructCurrentPageUrl(request));
    request.getSession().setAttribute("backPageUrl", request.getAttribute("currentPageUrl"));
    centerServiceFacade.putCenterBusinessKeyInSession(centerSystemId, request);
    return modelAndView;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) IncludePage(freemarker.ext.servlet.IncludePage) CenterInformationDto(org.mifos.dto.domain.CenterInformationDto) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 8 with IncludePage

use of freemarker.ext.servlet.IncludePage in project head by mifos.

the class ViewCustomerDetailsController method showGroupDetails.

@RequestMapping(value = "/viewGroupDetails", method = RequestMethod.GET)
public ModelAndView showGroupDetails(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = new ModelAndView();
    sitePreferenceHelper.resolveSiteType(modelAndView, "viewGroupDetails", request);
    modelAndView.addObject("include_page", new IncludePage(request, response));
    String groupSystemId = request.getParameter("globalCustNum");
    GroupInformationDto groupInformationDto = this.groupServiceFacade.getGroupInformationDto(groupSystemId);
    modelAndView.addObject("groupInformationDto", groupInformationDto);
    boolean isGroupLoanAllowed = configurationServiceFacade.getBooleanConfig("ClientRules.GroupCanApplyLoans");
    modelAndView.addObject("isGroupLoanAllowed", isGroupLoanAllowed);
    boolean isCenterHierarchyExists = configurationServiceFacade.getBooleanConfig("ClientRules.CenterHierarchyExists");
    modelAndView.addObject("isCenterHierarchyExists", isCenterHierarchyExists);
    modelAndView.addObject("currentPageUrl", UrlHelper.constructCurrentPageUrl(request));
    request.getSession().setAttribute("backPageUrl", request.getAttribute("currentPageUrl"));
    groupServiceFacade.putGroupBusinessKeyInSession(groupSystemId, request);
    return modelAndView;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) IncludePage(freemarker.ext.servlet.IncludePage) GroupInformationDto(org.mifos.dto.screen.GroupInformationDto) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 9 with IncludePage

use of freemarker.ext.servlet.IncludePage in project head by mifos.

the class ViewCustomerDetailsController method showClientDetails.

@RequestMapping(value = "/viewClientDetails", method = RequestMethod.GET)
public ModelAndView showClientDetails(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = new ModelAndView();
    sitePreferenceHelper.resolveSiteType(modelAndView, "viewClientDetails", request);
    modelAndView.addObject("include_page", new IncludePage(request, response));
    String clientSystemId = request.getParameter("globalCustNum");
    ClientInformationDto clientInformationDto;
    clientInformationDto = clientServiceFacade.getClientInformationDto(clientSystemId);
    modelAndView.addObject("clientInformationDto", clientInformationDto);
    boolean isPhotoFieldHidden = this.adminServiceFacade.isHiddenMandatoryField("photo");
    modelAndView.addObject("isPhotoFieldHidden", isPhotoFieldHidden);
    modelAndView.addObject("currentPageUrl", UrlHelper.constructCurrentPageUrl(request));
    boolean containsQGForCloseClient = false;
    containsQGForCloseClient = questionnaireServiceFacade.getQuestionGroupInstances(clientInformationDto.getClientDisplay().getCustomerId(), "Close", "Client").size() > 0;
    modelAndView.addObject("containsQGForCloseClient", containsQGForCloseClient);
    request.getSession().setAttribute("backPageUrl", request.getAttribute("currentPageUrl"));
    clientServiceFacade.putClientBusinessKeyInSession(clientSystemId, request);
    return modelAndView;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) IncludePage(freemarker.ext.servlet.IncludePage) ClientInformationDto(org.mifos.dto.screen.ClientInformationDto) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 10 with IncludePage

use of freemarker.ext.servlet.IncludePage in project head by mifos.

the class ViewLoanAccountDetailsController method showLoanAccountRepaymentSchedule.

@RequestMapping(value = "/viewLoanAccountRepaymentSchedule", method = RequestMethod.GET)
public ModelAndView showLoanAccountRepaymentSchedule(HttpServletRequest request, HttpServletResponse response) {
    ModelAndView modelAndView = new ModelAndView();
    sitePreferenceHelper.resolveSiteType(modelAndView, "viewLoanAccountRepaymentSchedule", request);
    modelAndView.addObject("include_page", new IncludePage(request, response));
    String globalAccountNum = request.getParameter("globalAccountNum");
    LoanInformationDto loanInformationDto = loanAccountServiceFacade.retrieveLoanInformation(globalAccountNum);
    modelAndView.addObject("loanInformationDto", loanInformationDto);
    modelAndView.addObject("currentDate", new Date());
    OriginalScheduleInfoDto originalScheduleInfoDto = loanAccountServiceFacade.retrieveOriginalLoanSchedule(globalAccountNum);
    modelAndView.addObject("isOriginalScheduleAvailable", originalScheduleInfoDto.hasOriginalInstallments());
    this.loanAccountServiceFacade.putLoanBusinessKeyInSession(globalAccountNum, request);
    return modelAndView;
}
Also used : OriginalScheduleInfoDto(org.mifos.dto.domain.OriginalScheduleInfoDto) ModelAndView(org.springframework.web.servlet.ModelAndView) IncludePage(freemarker.ext.servlet.IncludePage) LoanInformationDto(org.mifos.dto.screen.LoanInformationDto) Date(java.util.Date) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

IncludePage (freemarker.ext.servlet.IncludePage)15 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)15 ModelAndView (org.springframework.web.servlet.ModelAndView)15 LoanInformationDto (org.mifos.dto.screen.LoanInformationDto)6 SavingsAccountDetailDto (org.mifos.dto.domain.SavingsAccountDetailDto)4 Date (java.util.Date)3 LoanActivityDto (org.mifos.dto.domain.LoanActivityDto)2 OriginalScheduleInfoDto (org.mifos.dto.domain.OriginalScheduleInfoDto)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 AccountingConfigurationDto (org.mifos.config.servicefacade.dto.AccountingConfigurationDto)1 CenterInformationDto (org.mifos.dto.domain.CenterInformationDto)1 LoanAccountDetailsDto (org.mifos.dto.domain.LoanAccountDetailsDto)1 LoanInstallmentDetailsDto (org.mifos.dto.domain.LoanInstallmentDetailsDto)1 UserDetailDto (org.mifos.dto.domain.UserDetailDto)1 ValueListElement (org.mifos.dto.domain.ValueListElement)1 ClientInformationDto (org.mifos.dto.screen.ClientInformationDto)1 CustomerStatusDetailDto (org.mifos.dto.screen.CustomerStatusDetailDto)1 GroupInformationDto (org.mifos.dto.screen.GroupInformationDto)1 SavingsRecentActivityDto (org.mifos.dto.screen.SavingsRecentActivityDto)1