diff --git a/src/main/frontend/admin/pages/user/ViewUsers.ts b/src/main/frontend/admin/pages/user/ViewUsers.ts index d377bee..dc3372d 100644 --- a/src/main/frontend/admin/pages/user/ViewUsers.ts +++ b/src/main/frontend/admin/pages/user/ViewUsers.ts @@ -64,7 +64,7 @@ export async function viewUsers(authToken: string) { { text: "New User", action: () => { - log.error("Not implemented yet"); + window.location.assign("/admin/users?mode=new"); }, }, ], diff --git a/src/main/java/org/ros/chatto/controller/AdminController.java b/src/main/java/org/ros/chatto/controller/AdminController.java index da79f87..16faec1 100644 --- a/src/main/java/org/ros/chatto/controller/AdminController.java +++ b/src/main/java/org/ros/chatto/controller/AdminController.java @@ -11,6 +11,7 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.server.ResponseStatusException; import lombok.RequiredArgsConstructor; @@ -37,7 +38,13 @@ public class AdminController { } @GetMapping("/users") - public String usersPage() { + public String usersPage(@RequestParam Optional mode) { + if (mode.isPresent()) { + switch (mode.get()) { + case "new": + return "admin/new-user"; + } + } return "admin/users"; } diff --git a/src/main/resources/templates/admin/new-user.html b/src/main/resources/templates/admin/new-user.html new file mode 100644 index 0000000..aecea7d --- /dev/null +++ b/src/main/resources/templates/admin/new-user.html @@ -0,0 +1,86 @@ + + + + +
+ New User +
+ + + + + + + + + + + + + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + +
+

Dashboard

+
+ + +
+ +
+ + +
+
+
New User
+
+
+ page under construction +
+
+ +
+
+ +
+ + +
+ + +
+ +
+ + +
+ + + +
+ +
+ + + + \ No newline at end of file