Browse Source

fix: XcTable formatting

pull/2552/head
Wing-Kam Wong 3 years ago
parent
commit
dfd83437fb
  1. 42
      packages/nc-gui/components/project/spreadsheet/public/XcTable.vue

42
packages/nc-gui/components/project/spreadsheet/public/XcTable.vue

@ -122,14 +122,14 @@
<script> <script>
/* eslint-disable camelcase */ /* eslint-disable camelcase */
import { ErrorMessages, SqlUiFactory } from 'nocodb-sdk' import { ErrorMessages, SqlUiFactory } from 'nocodb-sdk';
import spreadsheet from '../mixins/spreadsheet' import spreadsheet from '../mixins/spreadsheet';
import ApiFactory from '../apis/apiFactory' import ApiFactory from '../apis/apiFactory';
import FieldsMenu from '../components/FieldsMenu' import FieldsMenu from '../components/FieldsMenu';
import SortListMenu from '../components/SortListMenu' import SortListMenu from '../components/SortListMenu';
import ColumnFilterMenu from '../components/ColumnFilterMenu' import ColumnFilterMenu from '../components/ColumnFilterMenu';
import XcGridView from '../views/GridView' import XcGridView from '../views/GridView';
import MoreActions from '~/components/project/spreadsheet/components/MoreActions' import MoreActions from '~/components/project/spreadsheet/components/MoreActions';
export default { export default {
name: 'XcTable', name: 'XcTable',
@ -404,19 +404,19 @@ export default {
try { try {
this.viewMeta = await this.$api.public.sharedViewMetaGet(this.$route.params.id, { this.viewMeta = await this.$api.public.sharedViewMetaGet(this.$route.params.id, {
headers: { headers: {
'xc-password': this.password 'xc-password': this.password,
} },
})) });
this.tableMeta = this.viewMeta.model this.tableMeta = this.viewMeta.model;
this.meta = { ...this.viewMeta.model } this.meta = { ...this.viewMeta.model };
this.meta.columns = this.meta.columns.filter(c => c.show) this.meta.columns = this.meta.columns.filter(c => c.show);
this.metas = this.viewMeta.relatedMetas this.metas = this.viewMeta.relatedMetas;
this.showSystemFields = this.viewMeta.show_system_fields this.showSystemFields = this.viewMeta.show_system_fields;
this.sorts = this.viewMeta.sorts this.sorts = this.viewMeta.sorts;
this.viewName = this.viewMeta.title this.viewName = this.viewMeta.title;
this.client = this.viewMeta.client this.client = this.viewMeta.client;
this.allowCSVDownload = JSON.parse(this.viewMeta.meta).allowCSVDownload this.allowCSVDownload = JSON.parse(this.viewMeta.meta).allowCSVDownload;
} catch (e) { } catch (e) {
if (e.response && e.response.status === 404) { if (e.response && e.response.status === 404) {
this.notFound = true; this.notFound = true;

Loading…
Cancel
Save