Browse Source

fix: user field in shared view

pull/7401/head
Pranav C 11 months ago
parent
commit
f818f1960e
  1. 12
      packages/nc-gui/components/cell/User.vue

12
packages/nc-gui/components/cell/User.vue

@ -82,6 +82,18 @@ const { isUIAllowed } = useRoles()
const options = computed<UserFieldRecordType[]>(() => {
const collaborators: UserFieldRecordType[] = []
// todo: it's a temporary fix to display users in shared view based on the modelValue. Usually it should be rendered based on the baseUsers but at the moment baseUsers not avail in shared view
if (!baseUsers.value?.length && readOnly.value && modelValue) {
collaborators.push(
...(((Array.isArray(modelValue) ? modelValue : [modelValue]) as any[]).map((user) => ({
id: user.id,
email: user.email,
display_name: user.display_name,
})) as any),
)
return collaborators
}
collaborators.push(
...(baseUsers.value?.map((user: any) => ({
id: user.id,

Loading…
Cancel
Save