|
|
@ -5,9 +5,7 @@ import { isEeUI } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const basesStore = useBases() |
|
|
|
const basesStore = useBases() |
|
|
|
|
|
|
|
|
|
|
|
const { getBaseUsers } = basesStore |
|
|
|
const { openedProject, activeProjectId, basesUser } = storeToRefs(basesStore) |
|
|
|
|
|
|
|
|
|
|
|
const { openedProject, activeProjectId, baseUserCount } = storeToRefs(basesStore) |
|
|
|
|
|
|
|
const { activeTables } = storeToRefs(useTablesStore()) |
|
|
|
const { activeTables } = storeToRefs(useTablesStore()) |
|
|
|
const { activeWorkspace, workspaceUserCount } = storeToRefs(useWorkspace()) |
|
|
|
const { activeWorkspace, workspaceUserCount } = storeToRefs(useWorkspace()) |
|
|
|
|
|
|
|
|
|
|
@ -32,24 +30,9 @@ const { isMobileMode } = useGlobal() |
|
|
|
|
|
|
|
|
|
|
|
const baseSettingsState = ref('') |
|
|
|
const baseSettingsState = ref('') |
|
|
|
|
|
|
|
|
|
|
|
const userCount = isEeUI ? workspaceUserCount : baseUserCount |
|
|
|
const userCount = computed(() => |
|
|
|
|
|
|
|
isEeUI ? workspaceUserCount : activeProjectId.value ? basesUser.value.get(activeProjectId.value)?.length : 0, |
|
|
|
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)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
watch( |
|
|
|
() => route.value.query?.page, |
|
|
|
() => 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( |
|
|
|
watch( |
|
|
|
() => openedProject.value?.title, |
|
|
|
() => openedProject.value?.title, |
|
|
|
() => { |
|
|
|
() => { |
|
|
|