diff --git a/Api/Users.go b/Api/Users.go
index 6174792..324ba3b 100644
--- a/Api/Users.go
+++ b/Api/Users.go
@@ -105,6 +105,7 @@ func createUser(w http.ResponseWriter, r *http.Request) {
var (
userData Models.User
requestBody []byte
+ returnJson []byte
err error
)
@@ -157,8 +158,15 @@ func createUser(w http.ResponseWriter, r *http.Request) {
return
}
+ returnJson, err = json.MarshalIndent(userData, "", " ")
+ if err != nil {
+ Util.JsonReturn(w, 500, "An error occured")
+ return
+ }
+
// Return updated json
w.WriteHeader(http.StatusOK)
+ w.Write(returnJson)
}
func updateUser(w http.ResponseWriter, r *http.Request) {
diff --git a/Frontend/vue/src/components/admin/users/AdminUsersCreate.vue b/Frontend/vue/src/components/admin/users/AdminUsersCreate.vue
new file mode 100644
index 0000000..6e3d097
--- /dev/null
+++ b/Frontend/vue/src/components/admin/users/AdminUsersCreate.vue
@@ -0,0 +1,165 @@
+
+
+
+
+
diff --git a/Frontend/vue/src/components/admin/users/AdminUsersForm.vue b/Frontend/vue/src/components/admin/users/AdminUsersForm.vue
index a4dc4de..d3e1766 100644
--- a/Frontend/vue/src/components/admin/users/AdminUsersForm.vue
+++ b/Frontend/vue/src/components/admin/users/AdminUsersForm.vue
@@ -91,8 +91,7 @@
v-model="user.last_login"
format="dd/MM/yyyy, HH:mm"
disabled="disabled"
- id="last_login"
- :month-year-component="monthYear"/>
+ id="last_login"/>
diff --git a/Frontend/vue/src/components/admin/users/AdminUsersList.vue b/Frontend/vue/src/components/admin/users/AdminUsersList.vue
index 004ed68..b2f0996 100644
--- a/Frontend/vue/src/components/admin/users/AdminUsersList.vue
+++ b/Frontend/vue/src/components/admin/users/AdminUsersList.vue
@@ -29,13 +29,15 @@
-
+
+
+
diff --git a/Frontend/vue/src/router/index.js b/Frontend/vue/src/router/index.js
index 1884dc2..b2a86ac 100644
--- a/Frontend/vue/src/router/index.js
+++ b/Frontend/vue/src/router/index.js
@@ -3,6 +3,7 @@ import HelloWorld from "@/components/HelloWorld.vue";
import AdminLogin from "@/components/admin/AdminLogin.vue";
import AdminSignup from "@/components/admin/AdminSignup.vue";
import AdminUsersList from "@/components/admin/users/AdminUsersList.vue";
+import AdminUsersCreate from "@/components/admin/users/AdminUsersCreate.vue";
import AdminUsersForm from "@/components/admin/users/AdminUsersForm.vue";
import admin from '@/store/admin/index.js'
@@ -31,6 +32,14 @@ const routes = [
requiresAuth: true,
},
},
+ {
+ path: '/admin/users/new',
+ name: 'AdminUsersCreate',
+ component: AdminUsersCreate,
+ meta: {
+ requiresAuth: true,
+ },
+ },
{
path: '/admin/users/:id',
name: 'AdminUsersForm',