class InternalUserProjectStatusServiceImpl extends AbstractProjectServiceImpl implements InternalUserProjectStatusService {

    private ProjectStatusResource getProjectStatusResourceByProject(Project project) {
        boolean locationPerPartnerRequired = project.getApplication().getCompetition().isLocationPerPartner();
        ProjectActivityStates partnerProjectLocationStatus = getPartnerProjectLocationStatus(project);
        ProjectActivityStates projectDetailsStatus = getProjectDetailsStatus(project, locationPerPartnerRequired, partnerProjectLocationStatus);
        ProjectActivityStates projectTeamStatus = getProjectTeamStatus(project);
        ProjectActivityStates financeChecksStatus = getFinanceChecksStatus(project);
        ProjectActivityStates bankDetailsStatus = getBankDetailsStatus(project);
        ProjectActivityStates spendProfileStatus = getSpendProfileStatus(project, financeChecksStatus);
        ProjectActivityStates documentsStatus = documentsState(project);
        boolean sentToIfsPa = sentToIfsPa(project);

        return new ProjectStatusResource(
                project.getName(),
                project.getId(),
                project.getId().toString(),
                project.getApplication().getId(),
                project.getApplication().getId().toString(),
                project.getPartnerOrganisations().size(),
                project.getLeadOrganisation().map(PartnerOrganisation::getOrganisation).map(Organisation::getName).orElse(""),
                projectDetailsStatus,
                projectTeamStatus,
                bankDetailsStatus,
                financeChecksStatus,
                spendProfileStatus,
                getMonitoringOfficerStatus(project, projectDetailsStatus, locationPerPartnerRequired, partnerProjectLocationStatus),
                documentsStatus,
                getGrantOfferLetterState(project, bankDetailsStatus, spendProfileStatus, documentsStatus),
                getProjectSetupCompleteState(project, spendProfileStatus, documentsStatus),
                golWorkflowHandler.isSent(project),
                project.getProjectState(),
                sentToIfsPa);
    }

}