diff --git a/src/components/ChatSettingsComponent.vue b/src/components/ChatSettingsComponent.vue index cfb48b6..6db68f9 100644 --- a/src/components/ChatSettingsComponent.vue +++ b/src/components/ChatSettingsComponent.vue @@ -16,7 +16,7 @@ - + @@ -67,8 +67,10 @@ import { computed, ref } from 'vue'; import ProfileCardComponent from './ProfileCardComponent.vue'; import { useUserStore } from 'src/stores/user-store'; -import { profilePicture } from 'src/models'; +import { profilePicture, responseModel } from 'src/models'; import { useChatStore } from 'src/stores/chat-store'; +import { useQuasar } from 'quasar'; +import { sendNotification } from 'src/utils'; const showDialog = ref(true); const userStore = useUserStore(); @@ -92,6 +94,19 @@ import { useChatStore } from 'src/stores/chat-store'; const selectProfilePicture = (image: profilePicture) => { props.chat!.profilepicture = image.url; } + + const $q = useQuasar(); + + const removeUser = (keycloakID : string) => { + chatStore.removeUserFromChat(keycloakID, props.chat!.id).then((response : responseModel) => { + reloadChats(); + sendNotification(response.message, response.success); + }); + } + + const reloadChats = async() => { + await chatStore.loadChatsByUser(); + };