class CompetitionStatusController {

    @SecuredBySpring(value = "TODO", description = "TODO")
    @GetMapping("/pending-spend-profiles")
    @PreAuthorize("hasAnyAuthority('project_finance')")
    public String viewPendingSpendProfiles(Model model, UserResource loggedInUser,
                                           @PathVariable Long competitionId) {

        long openQueryCount = competitionPostSubmissionRestService.getCompetitionOpenQueriesCount(competitionId).getSuccess();
        List<SpendProfileStatusResource> pendingSpendProfiles = competitionPostSubmissionRestService.getPendingSpendProfiles(competitionId).getSuccess();

        model.addAttribute(MODEL,
                new CompetitionPendingSpendProfilesViewModel(competitionRestService.getCompetitionById(competitionId).getSuccess(),
                        pendingSpendProfiles,
                        openQueryCount,
                        pendingSpendProfiles.size(),
                        true));
        return "project/competition-pending-spend-profiles";
    }

}