Skip to content

Commit e0be1de

Browse files
committed
fix: prefill mail in mentorship drawer
1 parent 163e5b0 commit e0be1de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/people/skill/MentorshipContactDrawer.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ import { email, helpers, required } from '@vuelidate/validators'
7272
import FieldErrors from '@/components/base/form/FieldErrors.vue'
7373
import { askMentorship, offerMentorship } from '@/api/skill.service.ts'
7474
import useOrganizationsStore from '@/stores/useOrganizations.ts'
75+
import useUsersStore from '@/stores/useUsers.ts'
7576
export function defaultForm() {
7677
return {
7778
title: '',
@@ -109,10 +110,12 @@ export default {
109110
setup() {
110111
const toaster = useToasterStore()
111112
const organizationsStore = useOrganizationsStore()
113+
const usersStore = useUsersStore()
112114
113115
return {
114116
toaster,
115117
organizationsStore,
118+
usersStore,
116119
}
117120
},
118121
data() {
@@ -161,6 +164,8 @@ export default {
161164
isOpen() {
162165
this.v$.$reset()
163166
this.form = defaultForm()
167+
// this.form.reply_to = this.usersStore.user?.email || '' // thhis is keycloak contact mail
168+
this.form.reply_to = this.usersStore.userFromApi?.email || '' // this the login mail
164169
},
165170
},
166171

0 commit comments

Comments
 (0)