21-rating #22
@ -1,5 +1,18 @@
|
||||
package ru.ulstu.report.model;
|
||||
|
||||
public enum ReportStatus {
|
||||
NEW, REVIEW, CHECKING, APPROVED
|
||||
NEW("новый"),
|
||||
REVIEW("проверка руководителем"),
|
||||
CHECKING("проверка в отделе аспирантуры"),
|
||||
APPROVED("подтвержден");
|
||||
|
||||
private final String title;
|
||||
|
||||
ReportStatus(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class ReportService {
|
||||
}
|
||||
report.setAspirant(aspirantService.getAspirantByUser(userService.getCurrentUser()));
|
||||
report.setCreateDate(reportDto.getCreateDate());
|
||||
//TODO: add status
|
||||
report.setStatus(reportDto.getStatus());
|
||||
return reportRepository.save(report);
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
<th scope="col">Аспирант</th>
|
||||
<th scope="col">Дата создания</th>
|
||||
<th scope="col">Статус</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -49,7 +50,7 @@
|
||||
<td th:text="${#calendars.format(r.reportPeriod.startDate, 'dd.MM.yyyy') + ' - ' + #calendars.format(r.reportPeriod.endDate, 'dd.MM.yyyy')}"></td>
|
||||
<td th:text="${r.aspirant.surname + ' '+ r.aspirant.name + ' '+ r.aspirant.patronymic }"></td>
|
||||
<td th:text="${#calendars.format(r.createDate, 'dd.MM.yyyy HH:mm')}"></td>
|
||||
<td th:text="${r.status}"></td>
|
||||
<td th:text="${r.status.title}"></td>
|
||||
<td>
|
||||
<!-- Ссылка на редактирование -->
|
||||
<a th:href="@{'/report/edit-report/' + ${r.id}}" class="btn btn-sm btn-primary">
|
||||
|
Loading…
x
Reference in New Issue
Block a user