|
|
@ -25,7 +25,7 @@ interface Users { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { show, selectedUser } = defineProps<Props>() |
|
|
|
const { show, selectedUser } = defineProps<Props>() |
|
|
|
const emits = defineEmits(['closed']) |
|
|
|
const emit = defineEmits(['closed', 'reload']) |
|
|
|
const toast = useToast() |
|
|
|
const toast = useToast() |
|
|
|
|
|
|
|
|
|
|
|
const { project } = useProject() |
|
|
|
const { project } = useProject() |
|
|
@ -75,11 +75,13 @@ const saveUser = async () => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (selectedUser?.id) { |
|
|
|
if (selectedUser?.id) { |
|
|
|
await $api.auth.projectUserUpdate(project.value.id, selectedUser.id, { |
|
|
|
await $api.auth.projectUserUpdate(project.value.id, selectedUser.id, { |
|
|
|
roles: selectedUser.roles, |
|
|
|
roles: usersData.role, |
|
|
|
email: selectedUser.email, |
|
|
|
email: selectedUser.email, |
|
|
|
project_id: project.value.id, |
|
|
|
project_id: project.value.id, |
|
|
|
projectName: project.value.title, |
|
|
|
projectName: project.value.title, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
emit('reload') |
|
|
|
|
|
|
|
emit('closed') |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const res = await $api.auth.projectUserAdd(project.value.id, { |
|
|
|
const res = await $api.auth.projectUserAdd(project.value.id, { |
|
|
|
roles: usersData.role, |
|
|
|
roles: usersData.role, |
|
|
@ -120,11 +122,11 @@ const clickInviteMore = () => { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-modal :footer="null" centered :visible="show" :closable="false" width="max(50vw, 44rem)" @cancel="emits('closed')"> |
|
|
|
<a-modal :footer="null" centered :visible="show" :closable="false" width="max(50vw, 44rem)" @cancel="emit('closed')"> |
|
|
|
<div class="flex flex-col"> |
|
|
|
<div class="flex flex-col"> |
|
|
|
<div class="flex flex-row justify-between items-center pb-1.5 mb-2 border-b-1 w-full"> |
|
|
|
<div class="flex flex-row justify-between items-center pb-1.5 mb-2 border-b-1 w-full"> |
|
|
|
<a-typography-title class="select-none" :level="4"> Share: {{ project.title }} </a-typography-title> |
|
|
|
<a-typography-title class="select-none" :level="4"> Share: {{ project.title }} </a-typography-title> |
|
|
|
<a-button type="text" class="!rounded-md mr-1 -mt-1.5" @click="emits('closed')"> |
|
|
|
<a-button type="text" class="!rounded-md mr-1 -mt-1.5" @click="emit('closed')"> |
|
|
|
<template #icon> |
|
|
|
<template #icon> |
|
|
|
<CloseIcon class="flex mx-auto" /> |
|
|
|
<CloseIcon class="flex mx-auto" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|