diff --git a/web/components.d.ts b/web/components.d.ts
index c278089..ed14298 100644
--- a/web/components.d.ts
+++ b/web/components.d.ts
@@ -16,6 +16,7 @@ declare module 'vue' {
LoginPage: typeof import('./src/components/loginPage.vue')['default']
MainPage: typeof import('./src/components/MainPage.vue')['default']
UpdateDialog: typeof import('./src/components/UpdateDialog.vue')['default']
+ UsersAddDialog: typeof import('./src/components/NavBarIcons/UsersAddDialog.vue')['default']
UsersDeleteActions: typeof import('./src/components/NavBarIcons/UsersDeleteActions.vue')['default']
UsersDialog: typeof import('./src/components/NavBarIcons/UsersDialog.vue')['default']
UsersEditActions: typeof import('./src/components/NavBarIcons/UsersEditActions.vue')['default']
diff --git a/web/src/components/HeaderBar.vue b/web/src/components/HeaderBar.vue
index eb10b99..d3036e3 100644
--- a/web/src/components/HeaderBar.vue
+++ b/web/src/components/HeaderBar.vue
@@ -6,7 +6,9 @@
-
+
+
+
@@ -206,8 +208,10 @@ import { SubmitEventPromise } from "vuetify";
import { ref } from "vue";
import { Plus, LogOut, FolderPlus } from "lucide-vue-next";
import { useQuery, useMutation, useQueryClient } from "@tanstack/vue-query";
+import UsersDialog from "./NavBarIcons/UsersDialog.vue";
+import UsersEditActions from "./NavBarIcons/UsersEditActions.vue";
import { axiosInstance } from "@/client";
-import { LicenseGroup, CreateLicenseDto, CreateGroupDto } from "@/types";
+import { LicenseGroup, CreateLicenseDto, CreateGroupDto, User } from "@/types";
const queryClient = useQueryClient();
@@ -227,6 +231,14 @@ const { data } = useQuery({
},
});
+const { data: user } = useQuery({
+ queryKey: ["user"],
+ queryFn: async () => {
+ const res = await axiosInstance.get
("/users/me");
+ return res.data;
+ },
+});
+
const { mutate: licenseMutate } = useMutation({
mutationFn: async (newLicense: CreateLicenseDto) => {
await axiosInstance.post("/licenses", newLicense);
diff --git a/web/src/components/NavBarIcons/UsersAddDialog.vue b/web/src/components/NavBarIcons/UsersAddDialog.vue
new file mode 100644
index 0000000..993e366
--- /dev/null
+++ b/web/src/components/NavBarIcons/UsersAddDialog.vue
@@ -0,0 +1,149 @@
+
+
+
+ Add User
+
+
+
+
+
+ Add User
+
+
+ Add an User to the database
+
+
+
+
+
+
+
+
+ all fields marked with * are required
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web/src/components/NavBarIcons/UsersDialog.vue b/web/src/components/NavBarIcons/UsersDialog.vue
index d7d0dcb..e12d255 100644
--- a/web/src/components/NavBarIcons/UsersDialog.vue
+++ b/web/src/components/NavBarIcons/UsersDialog.vue
@@ -16,16 +16,16 @@
:items="data ?? []"
:items-per-page="10"
item-key="name"
- class="elevation-5"
+ class="elevation-5 mb-5"
>
-
+
+
-
Close
@@ -37,9 +37,10 @@
diff --git a/web/src/types.ts b/web/src/types.ts
index afb1735..083d761 100644
--- a/web/src/types.ts
+++ b/web/src/types.ts
@@ -32,6 +32,13 @@ export interface User {
admin: boolean;
}
+export interface CreateUserDto {
+ name: string;
+ email: string;
+ password: string;
+ admin: boolean;
+}
+
export type CreateGroupDto = Omit;
export type UpdateLicenseDto = Omit;