Skip to content

Commit

Permalink
[refactor] 활동중인 팀 페이지 합류한 팀원 팀장 포함 집계로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
emilywin825 committed Nov 22, 2023
1 parent 6b21dae commit 93e5e04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public static TeamDetailResponseDto of(Team team, User leader, List<User> teamMe
.leaderInfo(new ResponseTeamMemeberDto(leader))
.leaderMessage(team.getLeaderMessage())
.max(max)
.cur(cur)
.cur(cur+1) //팀장 포함
.location(LocationType.ofCode(team.getLocation().getLocationType()).getValue())
.endDate(formattedDate)
.notice(team.getNotice())
.leftMember(max - cur)
.leftMember(max - cur -1)
.teamMemeberInfos(teamMemeberInfos.stream().map(ResponseTeamMemeberDto::new).collect(Collectors.toList()))
.status(status)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
@Getter
@Builder
public class TeamIWorkedResponseDto {
private Long teamId;
private String contestId;
private String contestTitle;
private String endDate;
Expand All @@ -27,6 +28,7 @@ public static TeamIWorkedResponseDto of(Team team, Contest contest, User leader,
String formattedDate = sdFormat.format(team.getReviewDate());

return TeamIWorkedResponseDto.builder()
.teamId(team.getId())
.contestId(contest.getId())
.contestTitle(contest.getTitle())
.endDate(formattedDate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static TeamIappliedResponseDto of(Team team, int teamMemberSize,Contest c
.status(manufactureStatus(status))
.leaderMessage(team.getLeaderMessage())
.max(team.getHeadCount())
.cur(teamMemberSize)
.cur(teamMemberSize+1) //+1 : 팀장포함
.location(LocationType.ofCode(team.getLocation().getLocationType()).getValue())
.endDate(formatDate(team.getReviewDate()))
.build();
Expand Down

0 comments on commit 93e5e04

Please sign in to comment.