Merge branch 'master' into 46-mvc

# Conflicts:
#	src/main/java/ru/ulstu/paper/controller/PaperController.java
#	src/main/java/ru/ulstu/paper/model/Paper.java
#	src/main/java/ru/ulstu/paper/model/PaperDto.java
#	src/main/resources/public/js/papers.js
#	src/main/resources/templates/papers/paper.html
#	src/main/resources/templates/papers/papers.html
This commit is contained in:
Anton Romanov 2018-12-14 16:00:46 +04:00
parent ac569ed9a9
commit 54ea705890
3 changed files with 8 additions and 11 deletions

View File

@ -1,20 +1,14 @@
package ru.ulstu.paper.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import ru.ulstu.deadline.model.DeadlineDto;
import ru.ulstu.deadline.model.DeadlineDto;
import ru.ulstu.user.model.UserDto;
import javax.validation.constraints.Future;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import static ru.ulstu.core.util.StreamApiUtils.convert;
@ -26,7 +20,7 @@ public class PaperDto {
private Paper.PaperStatus status;
private Date createDate;
private Date updateDate;
private final List<DeadlineDto> deadlines;
private List<DeadlineDto> deadlines;
private String comment;
private Boolean locked;
private String tmpFileName;
@ -35,6 +29,10 @@ public class PaperDto {
private Date fileCreateDate;
private Set<Integer> authors;
public PaperDto() {
}
@JsonCreator
public PaperDto(@JsonProperty("id") Integer id,
@JsonProperty("title") String title,

View File

@ -58,8 +58,8 @@
<div class="form-group">
<label>Дедлайн:</label>
<input type="date" class="form-control" name="deadline" th:field="*{deadlineDate}"/>
<p th:if="${#fields.hasErrors('deadlineDate')}" th:errors="*{deadlineDate}"
<input type="date" class="form-control" name="deadline" th:field="*{nextDeadline}"/>
<p th:if="${#fields.hasErrors('nextDeadline')}" th:errors="*{nextDeadline}"
class="alert alert-danger">Incorrect title</p>
</div>

View File

@ -90,7 +90,6 @@
$(paperRow).css("background-color", "white");
$(paperRow).closest(".paper-row").find(".remove-paper").addClass("d-none");
});
showPapers("#paper-list", ".paper-row");
jQuery('.filter').on('change','#year',function(){
filterPapers("#paper-list", ".paper-row",'1','2018');