Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TAM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
TAM
Merge requests
!225
Resolve "Job offers without actions should be collapsed by default"
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "Job offers without actions should be collapsed by default"
81-job-offers-without-actions-should-be-collapsed-by-default
into
dev
Overview
3
Commits
4
Pipelines
10
Changes
2
Merged
Resolve "Job offers without actions should be collapsed by default"
Henry Page
requested to merge
81-job-offers-without-actions-should-be-collapsed-by-default
into
dev
Oct 24, 2022
Overview
3
Commits
4
Pipelines
10
Changes
2
Closes
#81 (closed)
see issue desc
Edited
Oct 24, 2022
by
Henry Page
1
0
Merge request reports
Compare
dev
version 3
55ff7014
Oct 26, 2022
version 2
fef394e1
Oct 25, 2022
version 1
00a2e737
Oct 24, 2022
dev (base)
and
latest version
latest version
9200f736
4 commits,
Oct 26, 2022
version 3
55ff7014
3 commits,
Oct 26, 2022
version 2
fef394e1
2 commits,
Oct 25, 2022
version 1
00a2e737
1 commit,
Oct 24, 2022
2 files
+
18
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
src/main/java/nl/tudelft/tam/service/ApplicationService.java
+
16
−
0
View file @ 9200f736
Edit in single-file editor
Open in Web IDE
Show full file
@@ -34,6 +34,7 @@ import nl.tudelft.tam.dto.view.details.ApplicationDetailsPersonDTO;
import
nl.tudelft.tam.dto.view.details.JobOfferDetailsDTO
;
import
nl.tudelft.tam.dto.view.summary.ApplicationStatusSummaryDTO
;
import
nl.tudelft.tam.dto.view.summary.ApplicationSummaryDTO
;
import
nl.tudelft.tam.dto.view.summary.JobOfferSummaryDTO
;
import
nl.tudelft.tam.enums.Status
;
import
nl.tudelft.tam.exception.ApplicationStatusException
;
import
nl.tudelft.tam.model.Application
;
@@ -638,4 +639,19 @@ public class ApplicationService {
return
!
previousRoles
.
isEmpty
();
}
/**
* Checks whether there are no valid student actions at the moment
*
* @param editionOffers The offers for an edition
* @param map Map which maps offer ids to a status summary
* @return Checks whether all offers of an edition require no more student actions
*/
public
boolean
checkEditionCollapsable
(
List
<
JobOfferSummaryDTO
>
editionOffers
,
Map
<
Long
,
ApplicationStatusSummaryDTO
>
offerStatusMap
)
{
var
collapsableFilter
=
Set
.
of
(
Status
.
ACCEPTED
,
Status
.
REJECTED_BY_TEACHER
);
return
editionOffers
.
stream
().
allMatch
(
offer
->
offer
.
getHiringMessage
()
==
null
)
&&
editionOffers
.
stream
().
map
(
offer
->
offerStatusMap
.
get
(
offer
.
getId
()))
.
allMatch
(
offer
->
offer
.
exists
()
&&
collapsableFilter
.
contains
(
offer
.
getStatus
()));
}
}
Loading