#42 rename variables
This commit is contained in:
parent
506fa01fab
commit
e284298200
@ -30,8 +30,8 @@ public class GrantDto {
|
|||||||
private Set<UserDto> authors;
|
private Set<UserDto> authors;
|
||||||
private Integer leaderId;
|
private Integer leaderId;
|
||||||
private boolean wasLeader;
|
private boolean wasLeader;
|
||||||
private boolean birthDate;
|
private boolean hasAge;
|
||||||
private boolean degree;
|
private boolean hasDegree;
|
||||||
|
|
||||||
public GrantDto() {
|
public GrantDto() {
|
||||||
deadlines.add(new Deadline());
|
deadlines.add(new Deadline());
|
||||||
@ -48,8 +48,8 @@ public class GrantDto {
|
|||||||
@JsonProperty("authors") Set<UserDto> authors,
|
@JsonProperty("authors") Set<UserDto> authors,
|
||||||
@JsonProperty("leader") Integer leaderId,
|
@JsonProperty("leader") Integer leaderId,
|
||||||
@JsonProperty("wasLeader") boolean wasLeader,
|
@JsonProperty("wasLeader") boolean wasLeader,
|
||||||
@JsonProperty("birthDate") boolean birthDate,
|
@JsonProperty("hasAge") boolean hasAge,
|
||||||
@JsonProperty("degree") boolean degree) {
|
@JsonProperty("hasDegree") boolean hasDegree) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
@ -60,8 +60,8 @@ public class GrantDto {
|
|||||||
this.authors = authors;
|
this.authors = authors;
|
||||||
this.leaderId = leaderId;
|
this.leaderId = leaderId;
|
||||||
this.wasLeader = wasLeader;
|
this.wasLeader = wasLeader;
|
||||||
this.birthDate = birthDate;
|
this.hasAge = hasAge;
|
||||||
this.degree = degree;
|
this.hasDegree = hasDegree;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GrantDto(Grant grant) {
|
public GrantDto(Grant grant) {
|
||||||
@ -76,8 +76,8 @@ public class GrantDto {
|
|||||||
this.authors = convert(grant.getAuthors(), UserDto::new);
|
this.authors = convert(grant.getAuthors(), UserDto::new);
|
||||||
this.leaderId = grant.getLeader().getId();
|
this.leaderId = grant.getLeader().getId();
|
||||||
this.wasLeader = false;
|
this.wasLeader = false;
|
||||||
this.birthDate = false;
|
this.hasAge = false;
|
||||||
this.degree = false;
|
this.hasDegree = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
@ -175,19 +175,19 @@ public class GrantDto {
|
|||||||
this.wasLeader = wasLeader;
|
this.wasLeader = wasLeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBirthDate() {
|
public boolean isHasAge() {
|
||||||
return birthDate;
|
return hasAge;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBirthDate(boolean birthDate) {
|
public void setHasAge(boolean hasAge) {
|
||||||
this.birthDate = birthDate;
|
this.hasAge = hasAge;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDegree() {
|
public boolean isHasDegree() {
|
||||||
return degree;
|
return hasDegree;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDegree(boolean degree) {
|
public void setHasDegree(boolean hasDegree) {
|
||||||
this.degree = degree;
|
this.hasDegree = hasDegree;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ public class GrantService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<User> getGrantAuthors(GrantDto grantDto) {
|
public List<User> getGrantAuthors(GrantDto grantDto) {
|
||||||
List<User> filteredUsers = userService.filterByAgeAndDegree(grantDto.isBirthDate(), grantDto.isDegree());
|
List<User> filteredUsers = userService.filterByAgeAndDegree(grantDto.isHasAge(), grantDto.isHasDegree());
|
||||||
if (grantDto.isWasLeader()) {
|
if (grantDto.isWasLeader()) {
|
||||||
filteredUsers = filteredUsers
|
filteredUsers = filteredUsers
|
||||||
.stream()
|
.stream()
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-controls="collapse-filter">Фильтр рабочей группы
|
aria-controls="collapse-filter">Фильтр рабочей группы
|
||||||
</label>
|
</label>
|
||||||
<div th:class="${grantDto.wasLeader || grantDto.birthDate || grantDto.degree} ?
|
<div th:class="${grantDto.wasLeader || grantDto.hasAge || grantDto.hasDegree} ?
|
||||||
'form-check' : 'form-check collapse'" id="collapse-filter">
|
'form-check' : 'form-check collapse'" id="collapse-filter">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
@ -97,14 +97,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input class="form-check-input" type="checkbox" id="f2"
|
<input class="form-check-input" type="checkbox" id="f2"
|
||||||
th:field="*{birthDate}" th:onclick="|$('#filter').click();|"/>
|
th:field="*{hasAge}" th:onclick="|$('#filter').click();|"/>
|
||||||
<label class="form-check-label" for="f2">Младше 35 лет</label>
|
<label class="form-check-label" for="f2">Младше 35 лет</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input class="form-check-input" type="checkbox" id="f3"
|
<input class="form-check-input" type="checkbox" id="f3"
|
||||||
th:field="*{degree}" th:onclick="|$('#filter').click();|"/>
|
th:field="*{hasDegree}" th:onclick="|$('#filter').click();|"/>
|
||||||
<label class="form-check-label" for="f3">Cтепень к.т.н.</label>
|
<label class="form-check-label" for="f3">Cтепень к.т.н.</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
Loading…
Reference in New Issue
Block a user