From 56fea5eeb35d836756876b47e0e9ca1b82b84075 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 15 Apr 2025 23:51:58 +0400 Subject: [PATCH] #21 -- Fix new report indicators --- src/main/java/ru/ulstu/report/service/ReportService.java | 5 +++++ src/main/resources/templates/report/editReportValue.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/report/service/ReportService.java b/src/main/java/ru/ulstu/report/service/ReportService.java index 0341a26..4fbdcbd 100644 --- a/src/main/java/ru/ulstu/report/service/ReportService.java +++ b/src/main/java/ru/ulstu/report/service/ReportService.java @@ -42,6 +42,11 @@ public class ReportService { Report report; if (reportDto.getId() == null || reportDto.getId() == 0) { report = new Report(); + report.setValues(aspirantService.getCurrentAspirantIndicators().stream().map(i -> { + ReportValue rv = new ReportValue(); + rv.setIndicator(i); + return rv; + }).toList()); } else { report = getReportById(reportDto.getId()); } diff --git a/src/main/resources/templates/report/editReportValue.html b/src/main/resources/templates/report/editReportValue.html index 9496c09..21ab4b7 100644 --- a/src/main/resources/templates/report/editReportValue.html +++ b/src/main/resources/templates/report/editReportValue.html @@ -65,7 +65,7 @@ -
+