Browse Source

fix(gui-v2): includeM2M

pull/3157/head
Wing-Kam Wong 2 years ago
parent
commit
832f565a2e
  1. 6
      packages/nc-gui-v2/components/dashboard/settings/Misc.vue
  2. 3
      packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue
  3. 3
      packages/nc-gui-v2/composables/useProject.ts

6
packages/nc-gui-v2/components/dashboard/settings/Misc.vue

@ -1,5 +1,11 @@
<script setup lang="ts">
const { includeM2M } = useGlobal()
const { loadTables } = useProject()
watch(
includeM2M,
async () => await loadTables()
)
</script>
<template>

3
packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue

@ -32,7 +32,8 @@ async function loadTableList() {
isLoading = true
tables = await $api.project.modelVisibilityList(project.value?.id, {
includeM2M: includeM2M.value,
// FIXME: type
includeM2M: includeM2M.value || '',
})
} catch (e) {
console.error(e)

3
packages/nc-gui-v2/composables/useProject.ts

@ -29,7 +29,8 @@ export function useProject(projectId?: MaybeRef<string>) {
async function loadTables() {
if (project.value.id) {
const tablesResponse = await $api.dbTable.list(project.value.id, {
includeM2M: includeM2M.value,
// FIXME: type
includeM2M: includeM2M.value || '',
})
if (tablesResponse.list) tables.value = tablesResponse.list
}

Loading…
Cancel
Save