Browse Source

refactor(nc-gui): cast ProjectUserReqType and add comments

pull/5307/head
Wing-Kam Wong 2 years ago
parent
commit
8d84531d66
  1. 10
      packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue

10
packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue

@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Input } from 'ant-design-vue' import type { Input } from 'ant-design-vue'
import type { ProjectUserReqType } from 'nocodb-sdk'
import { import {
Form, Form,
computed, computed,
@ -107,10 +108,11 @@ const saveUser = async () => {
const res = await $api.auth.projectUserAdd(project.value.id, { const res = await $api.auth.projectUserAdd(project.value.id, {
roles: usersData.role, roles: usersData.role,
email: usersData.emails, email: usersData.emails,
project_id: project.value.id, } as ProjectUserReqType)
projectName: project.value.title,
}) // for inviting one user, invite_token will only be returned when invitation email fails to send
usersData.invitationToken = res.invite_token // for inviting multiple users, invite_token will be returned anyway
usersData.invitationToken = res?.invite_token
} }
emit('reload') emit('reload')

Loading…
Cancel
Save