fix selectable columns & token refresh

This commit is contained in:
Julian Krauser 2024-12-19 12:32:02 +01:00
parent 361a1c9519
commit f9f32fc519
2 changed files with 5 additions and 2 deletions

View file

@ -10,7 +10,7 @@
*
</p>
<p
v-for="col in activeTable?.columns"
v-for="col in columns"
: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="value.includes(col.column) ? 'border-gray-600 bg-gray-200' : ''"
@ -49,6 +49,9 @@ export default defineComponent({
activeTable() {
return this.tableMetas.find((tm) => tm.tableName == this.table);
},
columns() {
return this.activeTable?.columns?.filter((c) => !this.foreignColumns?.includes(c.column));
},
foreignColumns() {
return this.activeTable?.relations.map((r) => r.column);
},

View file

@ -38,7 +38,7 @@ http.interceptors.response.use(
return response;
},
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);
}