From 2d178d348129400a6f8e213cb0befe6772ad0152 Mon Sep 17 00:00:00 2001 From: CodeNamedRobin Date: Fri, 23 Aug 2024 22:02:48 +0200 Subject: [PATCH 01/14] feat(dashboard/admin/single-user-view): Added new user details form card --- apps/dashboard/src/components/InputSpan.vue | 3 - apps/dashboard/src/main.ts | 1 + .../components/users/AdminUserInfoCard.vue | 67 ++++++++++ .../components/users/forms/UserEditForm.vue | 120 ++++++++++++++++++ .../admin/views/AdminSingleUserView.vue | 2 + apps/dashboard/src/utils/validation-schema.ts | 11 ++ 6 files changed, 201 insertions(+), 3 deletions(-) create mode 100644 apps/dashboard/src/modules/admin/components/users/AdminUserInfoCard.vue create mode 100644 apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue diff --git a/apps/dashboard/src/components/InputSpan.vue b/apps/dashboard/src/components/InputSpan.vue index 5ff9abea..f43b0210 100644 --- a/apps/dashboard/src/components/InputSpan.vue +++ b/apps/dashboard/src/components/InputSpan.vue @@ -28,7 +28,6 @@ :placeholder="placeholder" v-model="internalValue as number" :disabled="disabled"/> - - -
diff --git a/apps/dashboard/src/main.ts b/apps/dashboard/src/main.ts index 8dcb4687..71c4c433 100644 --- a/apps/dashboard/src/main.ts +++ b/apps/dashboard/src/main.ts @@ -81,6 +81,7 @@ app.component('ToggleButton', ToggleButton); app.component('Steps', Steps); app.component('Calendar', Calendar); app.component('ConfirmDialog', ConfirmDialog); +app.component('InputSwitch', InputSwitch); populateStoresFromToken(apiService).then(() => { app.mount('#app'); diff --git a/apps/dashboard/src/modules/admin/components/users/AdminUserInfoCard.vue b/apps/dashboard/src/modules/admin/components/users/AdminUserInfoCard.vue new file mode 100644 index 00000000..f6a798c9 --- /dev/null +++ b/apps/dashboard/src/modules/admin/components/users/AdminUserInfoCard.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue b/apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue new file mode 100644 index 00000000..8ef95c55 --- /dev/null +++ b/apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue b/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue index 1cf9b5d7..7c76c693 100644 --- a/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue +++ b/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue @@ -66,6 +66,7 @@
+ diff --git a/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue b/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue index 7c76c693..591292a9 100644 --- a/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue +++ b/apps/dashboard/src/modules/admin/views/AdminSingleUserView.vue @@ -6,109 +6,47 @@
- -
- {{ t('profile.notManagedThroughSudoSOS') }} -
- - - {{ errors.firstName }} -
-
- - - {{ errors.lastName }} -
-
- - -
-
- - -
-
- - - {{ errors.userType }} -
-
- - -
-
- - - {{ errors.ofAge }} -
-
- - - {{ errors.canGoIntoDebt }} -
-
- -
-
-
+ - - - + + +
From ffc79bf934f2433d85f7d0f3b2ebb23282e2f4cc Mon Sep 17 00:00:00 2001 From: CodeNamedRobin Date: Mon, 26 Aug 2024 21:27:58 +0200 Subject: [PATCH 05/14] fix(dashboard/admin-single-user-view): fixed a v-if breaking the entire page --- .../modules/admin/components/users/forms/UserEditForm.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue b/apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue index 915ba1fe..f9da789c 100644 --- a/apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue +++ b/apps/dashboard/src/modules/admin/components/users/forms/UserEditForm.vue @@ -22,7 +22,8 @@ :disabled="!edit" id="name" placeholder="Nick" type="text" /> - Date: Mon, 26 Aug 2024 21:57:12 +0200 Subject: [PATCH 06/14] feat(dashboard/admin-single-user-view): form now auto fills user info --- apps/dashboard/src/components/FormCard.vue | 2 +- .../components/users/AdminUserInfoCard.vue | 26 ++++++++++--------- .../components/users/forms/UserEditForm.vue | 6 ----- .../admin/views/AdminSingleUserView.vue | 2 -- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/apps/dashboard/src/components/FormCard.vue b/apps/dashboard/src/components/FormCard.vue index cbdabce1..b5fde183 100644 --- a/apps/dashboard/src/components/FormCard.vue +++ b/apps/dashboard/src/components/FormCard.vue @@ -1,7 +1,7 @@