Skip to content

Commit

Permalink
fix: broken select of redirect site when inviting member
Browse files Browse the repository at this point in the history
  • Loading branch information
albanm committed Jan 9, 2025
1 parent c4b895c commit b86ce63
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ui/src/components/add-member-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
:disabled="mainPublicUrl.host !== host"
label="Site de redirection"
:items="redirects"
item-value="value"
item-title="title"
name="host"
required
density="compact"
Expand Down Expand Up @@ -146,24 +148,24 @@ const defaultRedirect = computed(() => {
})
const inviteForm = ref<InstanceType<typeof VForm>>()
const newInvitation = {
const createInvitation = () => ({
id: orga.id,
name: orga.name,
email: '',
role: null,
department,
redirect: defaultRedirect.value
}
const invitation = ref({ ...newInvitation })
redirect: defaultRedirect.value?.value
})
const invitation = ref<ReturnType<typeof createInvitation>>()
const validInvitation = ref(false)
const link = ref('')
const menu = ref(false)
watch(menu, async () => {
if (!menu) return
invitation.value = { ...newInvitation }
link.value = ''
if ($uiConfig.manageSites) await sitesFetch.refresh()
invitation.value = createInvitation()
link.value = ''
inviteForm.value?.reset()
})
Expand Down

0 comments on commit b86ce63

Please sign in to comment.