Browse Source

refactor/gui-v2-Share view minor cleanup

pull/3083/head
Muhammed Mustafa 2 years ago
parent
commit
c2d4b6619b
  1. 5
      packages/nc-gui-v2/composables/useViewData.ts

5
packages/nc-gui-v2/composables/useViewData.ts

@ -37,7 +37,7 @@ export function useViewData(
// todo: missing properties on FormType (success_msg, show_blank_form, // todo: missing properties on FormType (success_msg, show_blank_form,
const formViewData = ref<FormType & { success_msg?: string; show_blank_form?: boolean }>() const formViewData = ref<FormType & { success_msg?: string; show_blank_form?: boolean }>()
let isPublic = inject(IsPublicInj, ref(false)) const isPublic = inject(IsPublicInj, ref(false))
const { project } = useProject() const { project } = useProject()
const { fetchSharedViewData, paginationData: sharedPaginationData } = useSharedView() const { fetchSharedViewData, paginationData: sharedPaginationData } = useSharedView()
const { $api } = useNuxtApp() const { $api } = useNuxtApp()
@ -102,8 +102,7 @@ export function useViewData(
} }
} }
const loadData = async (params: Parameters<Api<any>['dbViewRow']['list']>[4] = {}, isPublicMode = false) => { const loadData = async (params: Parameters<Api<any>['dbViewRow']['list']>[4] = {}) => {
isPublic = isPublic ?? ref(isPublicMode)
if ((!project?.value?.id || !meta?.value?.id || !viewMeta?.value?.id) && !isPublic.value) return if ((!project?.value?.id || !meta?.value?.id || !viewMeta?.value?.id) && !isPublic.value) return
const response = !isPublic.value const response = !isPublic.value

Loading…
Cancel
Save