Browse Source

chore(gui-v2): remove `alias` prop of view which is no longer exist

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3057/head
Pranav C 2 years ago
parent
commit
85debd814f
  1. 2
      packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue
  2. 5
      packages/nc-gui-v2/components/smartsheet/sidebar/MenuTop.vue
  3. 1
      packages/nocodb-sdk/src/lib/Api.ts

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

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

5
packages/nc-gui-v2/components/smartsheet/sidebar/MenuTop.vue

@ -66,7 +66,7 @@ function validate(value?: string) {
return 'View name is required' return 'View name is required'
} }
if (views.value.every((v1) => ((v1 as GridType | KanbanType | GalleryType).alias || v1.title) !== value)) { if (views.value.every((v1) => v1.title !== value)) {
return 'View name should be unique' return 'View name should be unique'
} }
@ -134,10 +134,9 @@ const initSortable = (el: HTMLElement) => {
onMounted(() => menuRef && initSortable(menuRef.$el)) onMounted(() => menuRef && initSortable(menuRef.$el))
// todo: fix view type, alias is missing for some reason?
/** Navigate to view by changing url param */ /** Navigate to view by changing url param */
function changeView(view: { id: string; alias?: string; title?: string; type: ViewTypes }) { function changeView(view: { id: string; alias?: string; title?: string; type: ViewTypes }) {
router.push({ params: { viewTitle: (view.alias ?? view.title) || '' } }) router.push({ params: { viewTitle: view.title || '' } })
} }
/** Rename a view */ /** Rename a view */

1
packages/nocodb-sdk/src/lib/Api.ts

@ -163,6 +163,7 @@ export interface TableReqType {
pinned?: boolean; pinned?: boolean;
deleted?: boolean; deleted?: boolean;
order?: number; order?: number;
mm?: boolean;
columns?: ColumnType[]; columns?: ColumnType[];
} }

Loading…
Cancel
Save