21-rating #22

Merged
romanov73 merged 33 commits from 21-rating into aspir 2025-04-15 23:18:30 +04:00
3 changed files with 17 additions and 3 deletions
Showing only changes of commit 8e74e8911c - Show all commits

View File

@ -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;
}
}

View File

@ -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);
}

View File

@ -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">