Browse Source

fix(gui): show not found if shared view deleted

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/679/head
Pranav C 3 years ago
parent
commit
cf1bfa6a40
  1. 18
      packages/nc-gui/components/project/spreadsheet/public/xcTable.vue

18
packages/nc-gui/components/project/spreadsheet/public/xcTable.vue

@ -1,5 +1,16 @@
<template> <template>
<v-container class="h-100 j-excel-container pa-0 ma-0" fluid> <v-container
class="h-100 j-excel-container "
:class="{
'pa-0 ma-0': ! notFound
}"
fluid
>
<v-alert v-if="notFound" type="warning" class="mx-auto mt-10" outlined max-width="300">
Not found
</v-alert>
<template v-else>
<div v-if="viewName" class="model-name text-capitalize"> <div v-if="viewName" class="model-name text-capitalize">
<span class="font-weight-bold"> {{ viewName }}</span> <span class="font-weight-regular ml-1" /> <span class="font-weight-bold"> {{ viewName }}</span> <span class="font-weight-regular ml-1" />
</div> </div>
@ -149,7 +160,7 @@
<!-- </div>--> <!-- </div>-->
</div> </div>
</div> </div>
</template>
<v-dialog v-model="showPasswordModal" width="400"> <v-dialog v-model="showPasswordModal" width="400">
<v-card width="400" class="backgroundColor"> <v-card width="400" class="backgroundColor">
<v-container fluid> <v-container fluid>
@ -201,6 +212,7 @@ export default {
relationPrimaryValue: [String, Number] relationPrimaryValue: [String, Number]
}, },
data: () => ({ data: () => ({
notFound: false,
viewName: null, viewName: null,
viewType: null, viewType: null,
columnsWidth: {}, columnsWidth: {},
@ -371,7 +383,9 @@ export default {
async mounted() { async mounted() {
try { try {
await this.loadMetaData() await this.loadMetaData()
if (!this.showPasswordModal && !this.notFound) {
await this.loadTableData() await this.loadTableData()
}
// const {list, count} = await this.api.paginatedList(this.queryParams); // const {list, count} = await this.api.paginatedList(this.queryParams);
// this.count = count; // this.count = count;
// this.data = list.map(row => ({ // this.data = list.map(row => ({

Loading…
Cancel
Save