Browse Source

fix/fixed rebase regressions

pull/3083/head
Muhammed Mustafa 2 years ago
parent
commit
23cbd6fe98
  1. 4
      packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue
  2. 2
      packages/nc-gui-v2/composables/useViewData.ts
  3. 2
      packages/nc-gui-v2/composables/useViewFilters.ts
  4. 11
      packages/nc-gui-v2/composables/useViewSorts.ts

4
packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue

@ -15,8 +15,8 @@ const {
parentId,
autoSave = true,
hookId = null,
modelValue: Filter[]
} = defineProps<{ nested?: boolean; parentId?: string; autoSave: boolean; hookId?: string }>()
modelValue,
} = defineProps<{ nested?: boolean; parentId?: string; autoSave: boolean; hookId?: string; modelValue?: Filter[] }>()
const emit = defineEmits(['update:filtersLength'])

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

@ -107,7 +107,7 @@ export function useViewData(
if ((!project?.value?.id || !meta?.value?.id || !viewMeta?.value?.id) && !isPublic.value) return
const response = !isPublic.value
? await $api.dbViewRow.list('noco', project.value.id, meta.value.id, viewMeta.value.id, {
? await $api.dbViewRow.list('noco', project.value.id!, meta.value.id!, viewMeta!.value.id, {
...params,
where: where?.value,
})

2
packages/nc-gui-v2/composables/useViewFilters.ts

@ -86,7 +86,7 @@ export function useViewFilters(
}
}
}
}
reloadData?.()
}

11
packages/nc-gui-v2/composables/useViewSorts.ts

@ -68,17 +68,12 @@ export function useViewSorts(
const deleteSort = async (sort: SortType, i: number) => {
// TOOD:
// if (!this.shared && sort.id && this._isUIAllowed('sortSync')) {
if (isPublic.value) {
sorts.value.splice(i, 1)
sorts.value = [...sorts.value]
return
}
if (isUIAllowed('sortSync') && sort.id) {
if (isUIAllowed('sortSync') && sort.id && !isPublic.value) {
await $api.dbTableSort.delete(sort.id)
} else {
sorts.value.splice(i, 1)
}
sorts.value.splice(i, 1)
sorts.value = [...sorts.value]
}
return { sorts, loadSorts, addSort, deleteSort, saveOrUpdate }
}

Loading…
Cancel
Save