fix selectable columns & token refresh
This commit is contained in:
parent
361a1c9519
commit
f9f32fc519
2 changed files with 5 additions and 2 deletions
|
@ -10,7 +10,7 @@
|
||||||
*
|
*
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
v-for="col in activeTable?.columns"
|
v-for="col in columns"
|
||||||
:key="col.column"
|
:key="col.column"
|
||||||
class="rounded-md shadow-sm relative block w-fit px-3 py-2 border border-gray-300 text-gray-900 rounded-b-md sm:text-sm"
|
class="rounded-md shadow-sm relative block w-fit px-3 py-2 border border-gray-300 text-gray-900 rounded-b-md sm:text-sm"
|
||||||
:class="value.includes(col.column) ? 'border-gray-600 bg-gray-200' : ''"
|
:class="value.includes(col.column) ? 'border-gray-600 bg-gray-200' : ''"
|
||||||
|
@ -49,6 +49,9 @@ export default defineComponent({
|
||||||
activeTable() {
|
activeTable() {
|
||||||
return this.tableMetas.find((tm) => tm.tableName == this.table);
|
return this.tableMetas.find((tm) => tm.tableName == this.table);
|
||||||
},
|
},
|
||||||
|
columns() {
|
||||||
|
return this.activeTable?.columns?.filter((c) => !this.foreignColumns?.includes(c.column));
|
||||||
|
},
|
||||||
foreignColumns() {
|
foreignColumns() {
|
||||||
return this.activeTable?.relations.map((r) => r.column);
|
return this.activeTable?.relations.map((r) => r.column);
|
||||||
},
|
},
|
||||||
|
|
|
@ -38,7 +38,7 @@ http.interceptors.response.use(
|
||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
async (error) => {
|
async (error) => {
|
||||||
if (!error.config.url.includes("/admin") || !error.config.url.includes("/user")) {
|
if (!error.config.url.includes("/admin") && !error.config.url.includes("/user")) {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue