From 4bab980f624d8ac8ec24400aa544b2e5daeb48dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B0=D1=81=D0=B8=D0=BD=20=D0=90=D0=BD=D1=82=D0=BE?= =?UTF-8?q?=D0=BD?= Date: Mon, 6 May 2019 20:17:10 +0300 Subject: [PATCH] #98 deadline model and service edited --- .../ru/ulstu/deadline/model/Deadline.java | 4 +--- .../deadline/service/DeadlineService.java | 4 ++++ .../resources/templates/projects/project.html | 19 ++++++++++++------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/ru/ulstu/deadline/model/Deadline.java b/src/main/java/ru/ulstu/deadline/model/Deadline.java index 9ab9acd..5a05ea1 100644 --- a/src/main/java/ru/ulstu/deadline/model/Deadline.java +++ b/src/main/java/ru/ulstu/deadline/model/Deadline.java @@ -66,9 +66,7 @@ public class Deadline extends BaseEntity { return executor; } - public void setExecutor(String executor) { - this.executor = executor; - } + public void setExecutor(String executor) { this.executor = executor; } public Boolean getDone() { return done; diff --git a/src/main/java/ru/ulstu/deadline/service/DeadlineService.java b/src/main/java/ru/ulstu/deadline/service/DeadlineService.java index 0ef8a4f..6002c86 100644 --- a/src/main/java/ru/ulstu/deadline/service/DeadlineService.java +++ b/src/main/java/ru/ulstu/deadline/service/DeadlineService.java @@ -29,6 +29,8 @@ public class DeadlineService { Deadline updateDeadline = deadlineRepository.findOne(deadline.getId()); updateDeadline.setDate(deadline.getDate()); updateDeadline.setDescription(deadline.getDescription()); + updateDeadline.setExecutor(deadline.getExecutor()); + updateDeadline.setDone(deadline.getDone()); deadlineRepository.save(updateDeadline); return updateDeadline; } @@ -38,6 +40,8 @@ public class DeadlineService { Deadline newDeadline = new Deadline(); newDeadline.setDate(deadline.getDate()); newDeadline.setDescription(deadline.getDescription()); + newDeadline.setExecutor(deadline.getExecutor()); + newDeadline.setDone(deadline.getDone()); newDeadline = deadlineRepository.save(newDeadline); return newDeadline; } diff --git a/src/main/resources/templates/projects/project.html b/src/main/resources/templates/projects/project.html index cd49319..2a0b7cf 100644 --- a/src/main/resources/templates/projects/project.html +++ b/src/main/resources/templates/projects/project.html @@ -71,20 +71,17 @@
-