From 074486a270916573a1325019a6a61eb3780935db Mon Sep 17 00:00:00 2001 From: chia <58979857+chia030@users.noreply.github.com> Date: Wed, 2 Jun 2021 03:53:37 +0200 Subject: [PATCH] Done! --- .../Controller/ReportController.java | 10 +-- .../templates/logging/secretary-landing.html | 84 ++++++------------- 2 files changed, 32 insertions(+), 62 deletions(-) diff --git a/src/main/java/com/cpd/coronapreventiondivision/Controller/ReportController.java b/src/main/java/com/cpd/coronapreventiondivision/Controller/ReportController.java index f20ab3a..1af605d 100644 --- a/src/main/java/com/cpd/coronapreventiondivision/Controller/ReportController.java +++ b/src/main/java/com/cpd/coronapreventiondivision/Controller/ReportController.java @@ -142,12 +142,12 @@ public void setMissing(boolean update) { @PostMapping("update-appointment-report") @ResponseBody - public void updateResult(@RequestParam(required = false) Integer appointment_id, @RequestParam(required = false) String result) { - if (result == null || appointment_id == null) { - return; - } + public void updateResult(@RequestParam(required = false) Integer appointment_id, @RequestParam(required = false) String status) { +// if (result == null || appointment_id == null) { +// return; +// } - reportService.updateAppointment(Appointment.Result.valueOf(result), appointment_id); + reportService.updateAppointment(Appointment.Result.valueOf(status), appointment_id); } diff --git a/src/main/resources/templates/logging/secretary-landing.html b/src/main/resources/templates/logging/secretary-landing.html index 35c2b9d..bca8da8 100644 --- a/src/main/resources/templates/logging/secretary-landing.html +++ b/src/main/resources/templates/logging/secretary-landing.html @@ -44,7 +44,7 @@