corrected subject notes manipulation

This commit is contained in:
Jottyfan
2023-12-16 20:53:04 +01:00
parent bff5d1e54f
commit 5356e51f09
4 changed files with 63 additions and 23 deletions

View File

@@ -26,6 +26,7 @@ public class ThemeController extends CommonController {
@GetMapping("/theme")
public String getThemeManipulationBySlotId(@RequestParam("slotId") Integer slotId, Model model) {
model.addAttribute("slotId", slotId);
model.addAttribute("day", service.getSlotDay(slotId));
model.addAttribute("list", service.getThemeManipulation(slotId));
model.addAttribute("themes", service.getAllThemes());
model.addAttribute("lesson", service.getLesson(slotId));
@@ -49,6 +50,6 @@ public class ThemeController extends CommonController {
@PostMapping("/theme/update")
public String updateLesson(@RequestParam("slotId") Integer slotId, @ModelAttribute("lesson") TLessonRecord bean) {
service.updateLesson(bean);
return "redirect:/theme?slotId=" + bean.getFkSlot();
return "redirect:/theme?slotId=" + slotId;
}
}