Browse Source

fix(nc-gui): pr review changes

pull/7855/head
Ramesh Mane 8 months ago
parent
commit
491e8f3cac
  1. 5
      packages/nc-gui/components/project/ShareBaseDlg.vue
  2. 2
      packages/nc-gui/components/workspace/CollaboratorsList.vue
  3. 5
      packages/nc-gui/components/workspace/InviteSection.vue

5
packages/nc-gui/components/project/ShareBaseDlg.vue

@ -1,4 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { RoleLabels } from 'nocodb-sdk'
import { OrderedProjectRoles, ProjectRoles } from 'nocodb-sdk' import { OrderedProjectRoles, ProjectRoles } from 'nocodb-sdk'
import type { User } from '#imports' import type { User } from '#imports'
const props = defineProps<{ const props = defineProps<{
@ -211,6 +212,8 @@ const inviteProjectCollaborator = async () => {
singleEmailValue.value = '' singleEmailValue.value = ''
} }
} }
const onRoleChange = (role: keyof typeof RoleLabels) => (inviteData.roles = role as ProjectRoles)
</script> </script>
<template> <template>
@ -269,7 +272,7 @@ const inviteProjectCollaborator = async () => {
class="nc-invite-role-selector" class="nc-invite-role-selector"
:role="inviteData.roles" :role="inviteData.roles"
:roles="allowedRoles" :roles="allowedRoles"
:on-role-change="(role) => (inviteData.roles = role as ProjectRoles)" :on-role-change="onRoleChange"
:description="false" :description="false"
/> />
</div> </div>

2
packages/nc-gui/components/workspace/CollaboratorsList.vue

@ -118,7 +118,7 @@ onMounted(async () => {
:roles="accessibleRoles" :roles="accessibleRoles"
:description="false" :description="false"
class="cursor-pointer" class="cursor-pointer"
:on-role-change="(role) => updateCollaborator(collab, role as WorkspaceUserRoles)" :on-role-change="(role) => updateCollaborator(collab, role)"
/> />
</div> </div>
</template> </template>

5
packages/nc-gui/components/workspace/InviteSection.vue

@ -1,5 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onKeyStroke } from '@vueuse/core' import { onKeyStroke } from '@vueuse/core'
import type { RoleLabels } from 'nocodb-sdk'
import { OrderedWorkspaceRoles, WorkspaceUserRoles } from 'nocodb-sdk' import { OrderedWorkspaceRoles, WorkspaceUserRoles } from 'nocodb-sdk'
import { extractSdkResponseErrorMsg, useWorkspace } from '#imports' import { extractSdkResponseErrorMsg, useWorkspace } from '#imports'
import { validateEmail } from '~/utils/validation' import { validateEmail } from '~/utils/validation'
@ -192,6 +193,8 @@ const onPaste = (e: ClipboardEvent) => {
}) })
inviteData.email = '' inviteData.email = ''
} }
const onRoleChange = (role: keyof typeof RoleLabels) => (inviteData.roles = role as WorkspaceUserRoles)
</script> </script>
<template> <template>
@ -242,7 +245,7 @@ const onPaste = (e: ClipboardEvent) => {
class="px-1 min-w-[152px] nc-invite-role-selector" class="px-1 min-w-[152px] nc-invite-role-selector"
:role="inviteData.roles" :role="inviteData.roles"
:roles="allowedRoles" :roles="allowedRoles"
:on-role-change="(role) => (inviteData.roles = role as WorkspaceUserRoles)" :on-role-change="onRoleChange"
:description="true" :description="true"
/> />

Loading…
Cancel
Save