|
|
@ -32,8 +32,12 @@ const activeCell = inject(ActiveCellInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const basesStore = useBases() |
|
|
|
const basesStore = useBases() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const baseStore = useBase() |
|
|
|
|
|
|
|
|
|
|
|
const { basesUser } = storeToRefs(basesStore) |
|
|
|
const { basesUser } = storeToRefs(basesStore) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { idUserMap } = storeToRefs(baseStore) |
|
|
|
|
|
|
|
|
|
|
|
const baseUsers = computed(() => (meta.value.base_id ? basesUser.value.get(meta.value.base_id) || [] : [])) |
|
|
|
const baseUsers = computed(() => (meta.value.base_id ? basesUser.value.get(meta.value.base_id) || [] : [])) |
|
|
|
|
|
|
|
|
|
|
|
// use both ActiveCellInj or EditModeInj to determine the active state |
|
|
|
// use both ActiveCellInj or EditModeInj to determine the active state |
|
|
@ -303,6 +307,11 @@ const filterOption = (input: string, option: any) => { |
|
|
|
return searchVal.toLowerCase().includes(input.toLowerCase()) |
|
|
|
return searchVal.toLowerCase().includes(input.toLowerCase()) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// check if user is part of the base |
|
|
|
|
|
|
|
const isCollaborator = (userIdOrEmail) => { |
|
|
|
|
|
|
|
return !idUserMap.value?.[userIdOrEmail]?.deleted |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -347,6 +356,7 @@ const filterOption = (input: string, option: any) => { |
|
|
|
:name="op.display_name?.trim() ? op.display_name?.trim() : ''" |
|
|
|
:name="op.display_name?.trim() ? op.display_name?.trim() : ''" |
|
|
|
:email="op.email" |
|
|
|
:email="op.email" |
|
|
|
class="!text-[0.65rem]" |
|
|
|
class="!text-[0.65rem]" |
|
|
|
|
|
|
|
:disabled="!isCollaborator(op.id)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<NcTooltip class="truncate max-w-full" show-on-truncate-only> |
|
|
|
<NcTooltip class="truncate max-w-full" show-on-truncate-only> |
|
|
@ -360,6 +370,9 @@ const filterOption = (input: string, option: any) => { |
|
|
|
whiteSpace: 'nowrap', |
|
|
|
whiteSpace: 'nowrap', |
|
|
|
display: 'inline', |
|
|
|
display: 'inline', |
|
|
|
}" |
|
|
|
}" |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
'text-gray-600': !isCollaborator(op.id || op.email), |
|
|
|
|
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
{{ op.display_name?.trim() || op.email }} |
|
|
|
{{ op.display_name?.trim() || op.email }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -408,6 +421,7 @@ const filterOption = (input: string, option: any) => { |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex-none"> |
|
|
|
<div class="flex-none"> |
|
|
|
<GeneralUserIcon |
|
|
|
<GeneralUserIcon |
|
|
|
|
|
|
|
:disabled="!isCollaborator(selectedOpt.value)" |
|
|
|
size="auto" |
|
|
|
size="auto" |
|
|
|
:name="!selectedOpt.label?.includes('@') ? selectedOpt.label.trim() : ''" |
|
|
|
:name="!selectedOpt.label?.includes('@') ? selectedOpt.label.trim() : ''" |
|
|
|
:email="selectedOpt.label" |
|
|
|
:email="selectedOpt.label" |
|
|
@ -425,6 +439,9 @@ const filterOption = (input: string, option: any) => { |
|
|
|
whiteSpace: 'nowrap', |
|
|
|
whiteSpace: 'nowrap', |
|
|
|
display: 'inline', |
|
|
|
display: 'inline', |
|
|
|
}" |
|
|
|
}" |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
'text-gray-600': !isCollaborator(selectedOpt.value), |
|
|
|
|
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
{{ selectedOpt.label }} |
|
|
|
{{ selectedOpt.label }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -540,9 +557,16 @@ const filterOption = (input: string, option: any) => { |
|
|
|
:name="!label?.includes('@') ? label.trim() : ''" |
|
|
|
:name="!label?.includes('@') ? label.trim() : ''" |
|
|
|
:email="label" |
|
|
|
:email="label" |
|
|
|
class="!text-[0.65rem]" |
|
|
|
class="!text-[0.65rem]" |
|
|
|
|
|
|
|
:disabled="!isCollaborator(val)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{ label }} |
|
|
|
<span |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
'text-gray-600': !isCollaborator(val), |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ label }} |
|
|
|
|
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</a-tag> |
|
|
|
</a-tag> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|