diff --git a/data.mv.db b/data.mv.db
index 17aec51..6ef2fa8 100644
Binary files a/data.mv.db and b/data.mv.db differ
diff --git a/frontend/vue-project/src/models/Subject.js b/frontend/vue-project/src/models/Subject.js
index b50996e..1b0cfd7 100644
--- a/frontend/vue-project/src/models/Subject.js
+++ b/frontend/vue-project/src/models/Subject.js
@@ -2,5 +2,6 @@ export default class Subject{
constructor(data) {
this.id = data?.id;
this.name = data?.name;
+ this.groupIds = data?.groupIds;
}
}
\ No newline at end of file
diff --git a/frontend/vue-project/src/pages/subjects.vue b/frontend/vue-project/src/pages/subjects.vue
index 1cc2c2f..da9005f 100644
--- a/frontend/vue-project/src/pages/subjects.vue
+++ b/frontend/vue-project/src/pages/subjects.vue
@@ -19,11 +19,15 @@
|
+
+
+ |
+
+
+
diff --git a/src/main/java/ru/IP_LabWorks/IP/University/Contoller/DTO/SubjectDTO.java b/src/main/java/ru/IP_LabWorks/IP/University/Contoller/DTO/SubjectDTO.java
index 67f772e..a3f851b 100644
--- a/src/main/java/ru/IP_LabWorks/IP/University/Contoller/DTO/SubjectDTO.java
+++ b/src/main/java/ru/IP_LabWorks/IP/University/Contoller/DTO/SubjectDTO.java
@@ -2,16 +2,20 @@ package ru.IP_LabWorks.IP.University.Contoller.DTO;
import ru.IP_LabWorks.IP.University.Model.Subject;
+import java.util.List;
+import java.util.stream.Collectors;
+
public class SubjectDTO {
private long id;
private String name;
-
+ private List groupIds;
public SubjectDTO(){
}
public SubjectDTO(Subject subject){
this.id = subject.getId();
this.name = subject.getName();
+ this.groupIds = subject.getGroupIds();
}
public Long getId(){
@@ -21,4 +25,9 @@ public class SubjectDTO {
public String getName(){
return name;
}
+
+ public List getGroupIds(){
+ return groupIds;
+ }
+
}
diff --git a/src/main/java/ru/IP_LabWorks/IP/University/Contoller/REST/SubjectController.java b/src/main/java/ru/IP_LabWorks/IP/University/Contoller/REST/SubjectController.java
index 4b7fb58..17d936c 100644
--- a/src/main/java/ru/IP_LabWorks/IP/University/Contoller/REST/SubjectController.java
+++ b/src/main/java/ru/IP_LabWorks/IP/University/Contoller/REST/SubjectController.java
@@ -8,6 +8,7 @@ import ru.IP_LabWorks.IP.University.Service.GroupService;
import ru.IP_LabWorks.IP.University.Service.SubjectService;
import java.util.List;
+import java.util.Objects;
@RestController
@RequestMapping("/subject")
@@ -44,4 +45,14 @@ public class SubjectController {
public SubjectDTO deleteSubject(@PathVariable Long id){
return new SubjectDTO(subjectService.deleteSubject(id));
}
+
+ @GetMapping("/getAllSubjectGroup")
+ public List