|
|
|
@ -5,9 +5,7 @@ import { isEeUI } from '#imports'
|
|
|
|
|
|
|
|
|
|
const basesStore = useBases() |
|
|
|
|
|
|
|
|
|
const { getBaseUsers } = basesStore |
|
|
|
|
|
|
|
|
|
const { openedProject, activeProjectId, baseUserCount } = storeToRefs(basesStore) |
|
|
|
|
const { openedProject, activeProjectId, basesUser } = storeToRefs(basesStore) |
|
|
|
|
const { activeTables } = storeToRefs(useTablesStore()) |
|
|
|
|
const { activeWorkspace, workspaceUserCount } = storeToRefs(useWorkspace()) |
|
|
|
|
|
|
|
|
@ -32,24 +30,9 @@ const { isMobileMode } = useGlobal()
|
|
|
|
|
|
|
|
|
|
const baseSettingsState = ref('') |
|
|
|
|
|
|
|
|
|
const userCount = isEeUI ? workspaceUserCount : baseUserCount |
|
|
|
|
|
|
|
|
|
const updateBaseUserCount = async () => { |
|
|
|
|
if (!baseUserCount || !isUIAllowed('newUser')) return |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
const { totalRows } = await getBaseUsers({ |
|
|
|
|
baseId: activeProjectId.value!, |
|
|
|
|
page: 1, |
|
|
|
|
searchText: undefined, |
|
|
|
|
limit: 20, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
baseUserCount.value = totalRows |
|
|
|
|
} catch (e: any) { |
|
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
const userCount = computed(() => |
|
|
|
|
isEeUI ? workspaceUserCount : activeProjectId.value ? basesUser.value.get(activeProjectId.value)?.length : 0, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => route.value.query?.page, |
|
|
|
@ -82,16 +65,6 @@ watch(projectPageTab, () => {
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => route.value.params.baseId, |
|
|
|
|
(newVal, oldVal) => { |
|
|
|
|
if (newVal && oldVal === undefined) { |
|
|
|
|
updateBaseUserCount() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ immediate: true }, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => openedProject.value?.title, |
|
|
|
|
() => { |
|
|
|
|