From 5e35fd0f7de87830da9413cfdb7abee0600f9274 Mon Sep 17 00:00:00 2001 From: mayar osama Date: Wed, 3 Apr 2024 16:06:07 +0200 Subject: [PATCH 1/2] Fixing user image on update --- client/src/components/UpdateUser.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/components/UpdateUser.vue b/client/src/components/UpdateUser.vue index 6d52b9dd..f7e237d4 100644 --- a/client/src/components/UpdateUser.vue +++ b/client/src/components/UpdateUser.vue @@ -80,8 +80,10 @@ - + Update @@ -116,7 +118,6 @@ import { listUsers } from '@/utils' import { useAsyncState } from '@vueuse/core' -import { ApiClientBase } from '@/clients/api/base' export default { name: 'UpdateUser', @@ -139,6 +140,7 @@ export default { const supervisors = ref([]) const image = ref() const imageUrl = ref() + const imageSrc = window.env.SERVER_DOMAIN_NAME_API.replace('api', '') const selectedUser = ref() const reporting_to = ref() const userIsActive = ref(selectedUser.value?.is_active) @@ -251,7 +253,7 @@ export default { selectedUser.value.user_type = selectedUser.value.user_type === "Team Lead" ? "Supervisor" : selectedUser.value.user_type await $api.myprofile.update(selectedUser.value.id, { ...selectedUser.value, - image: imageUrl.value ? imageUrl.value : null, + image: imageUrl.value ? imageUrl.value : selectedUser.value.image, location: selectedUser.value.location.id, filename: image.value ? image.value[0].name : null, reporting_to: reporting_to.value ? [reporting_to.value.id] : [] @@ -273,6 +275,7 @@ export default { joiningDate, image, imageUrl, + imageSrc, supervisors, officeUsers, selectedUser, From 4618d697b06acd543859d5580e05cce0351bc2df Mon Sep 17 00:00:00 2001 From: mayar osama Date: Thu, 4 Apr 2024 11:51:59 +0200 Subject: [PATCH 2/2] Adding margins to image --- client/src/components/UpdateUser.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/UpdateUser.vue b/client/src/components/UpdateUser.vue index f7e237d4..ca57482e 100644 --- a/client/src/components/UpdateUser.vue +++ b/client/src/components/UpdateUser.vue @@ -83,7 +83,7 @@ + class="justify-center mb-5"> Update