#98 project statuses edited

pull/201/head
a.vasin 5 years ago
parent 7388e12e3f
commit eb87c6d52f

@ -27,11 +27,11 @@ import java.util.Set;
public class Project extends BaseEntity implements UserContainer {
public enum ProjectStatus {
APPLICATION("Заявка"),
ON_COMPETITION("Отправлен на конкурс"),
SUCCESSFUL_PASSAGE("Успешное прохождение"),
TT("ТЗ"),
OPEN("Открыт"),
IN_WORK("В работе"),
COMPLETED("Завершен"),
CERTIFICATE_ISSUED("Оформление свидетельства"),
CLOSED("Закрыт"),
FAILED("Провалены сроки");
private String statusName;
@ -49,7 +49,7 @@ public class Project extends BaseEntity implements UserContainer {
private String title;
@Enumerated(value = EnumType.STRING)
private ProjectStatus status = ProjectStatus.APPLICATION;
private ProjectStatus status = ProjectStatus.TT;
@NotNull
private String description;

@ -19,7 +19,7 @@ import java.util.List;
import static org.springframework.util.ObjectUtils.isEmpty;
import static ru.ulstu.core.util.StreamApiUtils.convert;
import static ru.ulstu.project.model.Project.ProjectStatus.APPLICATION;
import static ru.ulstu.project.model.Project.ProjectStatus.TT;
@Service
public class ProjectService {
@ -89,7 +89,7 @@ public class ProjectService {
private Project copyFromDto(Project project, ProjectDto projectDto) throws IOException {
project.setDescription(projectDto.getDescription());
project.setStatus(projectDto.getStatus() == null ? APPLICATION : projectDto.getStatus());
project.setStatus(projectDto.getStatus() == null ? TT : projectDto.getStatus());
project.setTitle(projectDto.getTitle());
if (projectDto.getGrant() != null && projectDto.getGrant().getId() != null) {
project.setGrant(grantRepository.findOne(projectDto.getGrant().getId()));

@ -6,19 +6,19 @@
<body>
<span th:fragment="projectStatus (projectStatus)" class="fa-stack fa-1x">
<th:block th:switch="${projectStatus.name()}">
<div th:case="'APPLICATION'">
<div th:case="'TT'">
<i class="fa fa-circle fa-stack-2x text-draft"></i>
</div>
<div th:case="'ON_COMPETITION'">
<div th:case="'OPEN'">
<i class="fa fa-circle fa-stack-2x text-review"></i>
</div>
<div th:case="'SUCCESSFUL_PASSAGE'">
<div th:case="'IN_WORK'">
<i class="fa fa-circle fa-stack-2x text-accepted"></i>
</div>
<div th:case="'IN_WORK'">
<div th:case="'CERTIFICATE_ISSUED'">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
</div>
<div th:case="'COMPLETED'">
<div th:case="'CLOSED'">
<i class="fa fa-circle fa-stack-2x text-success"></i>
</div>
<div th:case="'FAILED'">

Loading…
Cancel
Save