diff --git a/pom.xml b/pom.xml index 4628205..8a7a104 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,11 @@ junit test - + + org.springframework.boot + spring-boot-starter-thymeleaf + + diff --git a/src/main/java/com/production/ehayvanbackendapi/Controllers/VeterinarianController.java b/src/main/java/com/production/ehayvanbackendapi/Controllers/VeterinarianController.java index 5e1df4a..13b9480 100644 --- a/src/main/java/com/production/ehayvanbackendapi/Controllers/VeterinarianController.java +++ b/src/main/java/com/production/ehayvanbackendapi/Controllers/VeterinarianController.java @@ -1,5 +1,7 @@ package com.production.ehayvanbackendapi.Controllers; - +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; import com.production.ehayvanbackendapi.DTO.VeterinarianDTO; import com.production.ehayvanbackendapi.DTO.request.CreateOrUpdateVeterinarianDTO; import com.production.ehayvanbackendapi.Services.VeterinarianService; @@ -8,7 +10,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -@RestController +@Controller @RequestMapping("/api/veterinarians") public class VeterinarianController { private final VeterinarianService veterinarianService; @@ -84,6 +86,13 @@ public ResponseEntity> getAllVeterinarians() { } } + @GetMapping("/desktop") + public String desktop(Model model) { + List veterinarians = veterinarianService.getAllVeterinarians(); + model.addAttribute("veterinarians", veterinarians); + return "desktop"; + } + // Other controller methods for updating, deleting veterinarians, etc. } diff --git a/src/main/Frontend/Images/Icon.png b/src/main/resources/static/images/Icon.png similarity index 100% rename from src/main/Frontend/Images/Icon.png rename to src/main/resources/static/images/Icon.png diff --git a/src/main/Frontend/Images/Union.png b/src/main/resources/static/images/Union.png similarity index 100% rename from src/main/Frontend/Images/Union.png rename to src/main/resources/static/images/Union.png diff --git a/src/main/Frontend/Images/logout.png b/src/main/resources/static/images/logout.png similarity index 100% rename from src/main/Frontend/Images/logout.png rename to src/main/resources/static/images/logout.png diff --git a/src/main/Frontend/Images/newdog.png b/src/main/resources/static/images/newdog.png similarity index 100% rename from src/main/Frontend/Images/newdog.png rename to src/main/resources/static/images/newdog.png diff --git a/src/main/Frontend/desktop.html b/src/main/resources/templates/desktop.html similarity index 85% rename from src/main/Frontend/desktop.html rename to src/main/resources/templates/desktop.html index 15114bc..1524bd9 100644 --- a/src/main/Frontend/desktop.html +++ b/src/main/resources/templates/desktop.html @@ -1,5 +1,5 @@ - + @@ -30,11 +30,11 @@
E-H
- Logo + Logo
YV
- Logo + Logo
N
@@ -52,7 +52,7 @@
Esther
- Logout Icon + Logout Icon
@@ -69,14 +69,23 @@ - - - - - - -
NameClinic NameDelete
- + + + + + + + + + + + + + + +
NameClinic NameDelete
+ +