Merge branch 'dev' into 'master'

Dev

See merge request romanov73/ng-tracker!27
This commit is contained in:
Anton Romanov 2019-03-04 10:04:02 +00:00
commit 13131186bf
10 changed files with 37 additions and 28 deletions

View File

@ -31,7 +31,7 @@ deploy:
script:
- sh deploy/gdccloud/deploy.sh
only:
- master
- dev
cache:
key: "$CI_PROJECT_ID"
policy: pull

View File

@ -8,6 +8,6 @@
3. Получить платформу для обкатки научных проектов магистрантов по созданию интеллектуальны систем.
4. Получить проект для обучения бакалавров современым технологиям разработки.
[Демо версия доступна здесь](https://193.110.3.124:8080)
[Демо версия доступна здесь](http://193.110.3.124:8080)
[Для разворачивания проекта и ведения разработки ознакомьтесь с wiki](https://gitlab.com/romanov73/ng-tracker/wikis/home)

View File

@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.deadline.model.DeadlineDto;
import ru.ulstu.grant.model.Grant;
import ru.ulstu.project.model.ProjectDto;
import java.util.ArrayList;
@ -56,13 +55,17 @@ public class GrantDto {
return id;
}
public void setId(Integer id) {this.id = id;}
public void setId(Integer id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {this.title = title;}
public void setTitle(String title) {
this.title = title;
}
public Grant.GrantStatus getStatus() {
return status;
@ -84,18 +87,23 @@ public class GrantDto {
return comment;
}
public void setComment(String comment) {this.comment = comment;}
public void setComment(String comment) {
this.comment = comment;
}
public ProjectDto getProject() {
return project;
}
public void setProject(ProjectDto project) {this.project = project;}
public void setProject(ProjectDto project) {
this.project = project;
}
public String getApplicationFileName() {
return applicationFileName;
}
public void setApplicationFileName(String applicationFileName) {
this.applicationFileName = applicationFileName;}
this.applicationFileName = applicationFileName;
}
}

View File

@ -107,11 +107,11 @@ public class GrantService {
}
@Transactional
public Grant create(String title, Project project_id, Date deadlineDate) {
public Grant create(String title, Project projectId, Date deadlineDate) {
Grant grant = new Grant();
grant.setTitle(title);
grant.setComment("Комментарий к гранту 1");
grant.setProject(project_id);
grant.setProject(projectId);
grant.setStatus(APPLICATION);
grant.getDeadlines().add(new Deadline(deadlineDate, "первый дедлайн"));
grant = grantRepository.save(grant);

View File

@ -65,7 +65,7 @@ public class PaperController {
public String save(@Valid PaperDto paperDto, Errors errors) throws IOException {
filterEmptyDeadlines(paperDto);
if (paperDto.getDeadlines().isEmpty()) {
errors.rejectValue("deadlines", "errorCode","Не может быть пустым");
errors.rejectValue("deadlines", "errorCode", "Не может быть пустым");
}
if (errors.hasErrors()) {
return "/papers/paper";
@ -103,7 +103,7 @@ public class PaperController {
@ModelAttribute("allYears")
public List<Integer> getAllYears() {
List<Integer> years = new ArrayList<>();
for (int i = Calendar.getInstance().get(Calendar.YEAR); i > 2010; i-- ) {
for (int i = Calendar.getInstance().get(Calendar.YEAR); i > 2010; i--) {
years.add(i);
}
return years;

View File

@ -37,7 +37,7 @@ public class PaperRestController {
}
@GetMapping("/{paper-id}")
public Response<PaperDto> getPaper(@PathVariable("paper-id") Integer paperId){
public Response<PaperDto> getPaper(@PathVariable("paper-id") Integer paperId) {
return new Response(paperService.findById(paperId));
}

View File

@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.deadline.model.DeadlineDto;
import ru.ulstu.project.model.Project;
import java.util.ArrayList;
import java.util.List;
@ -19,7 +18,8 @@ public class ProjectDto {
private List<DeadlineDto> deadlines = new ArrayList<>();
public ProjectDto() {}
public ProjectDto() {
}
public ProjectDto(String title) {
this.title = title;
@ -45,22 +45,23 @@ public class ProjectDto {
return id;
}
public String getTitle() {
return title;
}
public void setId(Integer id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public void setDeadlines(List<DeadlineDto> deadlines) {
this.deadlines = deadlines;
}
public List<DeadlineDto> getDeadlines() {
return deadlines;
}
public void setDeadlines(List<DeadlineDto> deadlines) {
this.deadlines = deadlines;
}
}

View File

@ -10,7 +10,7 @@
Уважаемый(ая) <span th:text="${user.firstName + ' ' + user.lastName}">Ivan Ivanov</span>
</p>
<p>
Приближается дедлайн статьи <b>"<span th:text="${paper.title}">Title</span>"</b>.
Приближается дедлайн статьи "<a th:href="@{|${baseUrl}/papers/paper?id=${paper.id}|}"><span th:text="${paper.title}">Title</span></a>".
</p>
<p>
Срок исполнения: <b><span th:text="${#dates.format(paper.nextDeadline.get().date, 'dd.MM.yyyy')}"></span></b>.

View File

@ -10,7 +10,7 @@
Уважаемый(ая) <span th:text="${user.firstName + ' ' + user.lastName}">Ivan Ivanov</span>
</p>
<p>
Статья "<span th:text="${paper.title}">Title</span>" провалена.
Статья "<a th:href="@{|${baseUrl}/papers/paper?id=${paper.id}|}"><span th:text="${paper.title}">Title</span></a>" провалена.
Предыдущий статус - "<span th:text="${oldStatus.statusName}">oldStatus</span>".
</p>
<p>

View File

@ -10,7 +10,7 @@
Уважаемый(ая) <span th:text="${user.firstName + ' ' + user.lastName}">Ivan Ivanov</span>
</p>
<p>
Статус статьи "<span th:text="${paper.title}">Title</span>" сменился с
Статус статьи "<a th:href="@{|${baseUrl}/papers/paper?id=${paper.id}|}"><span th:text="${paper.title}">Title</span></a>" сменился с
"<span th:text="${oldStatus.statusName}">oldStatus</span>" на "<span th:text="${paper.status.statusName}">newStatus</span>".
</p>
<p>